Comment 7 for bug 1402834

Revision history for this message
Seth Forshee (sforshee) wrote :

Note that it's also possible to do this without namespaces at all, and it definitely seems to be force unmount which makes it happen.

$ fuseext2 ext2.img /tmp/d
$ sudo mount --bind /tmp/d mount
$ sudo umount -f mount
$ ls /tmp/d
ls: cannot access /tmp/d: Transport endpoint is not connected

Other filesystems which implement umount_begin such as nfs also seem to start tearing down their connections in the callback, so I suspect they might behave similarly in this scenario. I'm going to test with nfs to verify.

I don't really think that fuse can detect this situation. It seems like do_umount potentially needs to handle this differently in the case of a bind mount, but I'm not actually sure whether or not the behavior here is actually what's expected to happen.

The other question is whether or not lxc acutally needs to use MNT_FORCE when unmounting. What's the reason for doing so?