>>> A) suppose we have a bunch of filesystems union-mounted on
>>> /foo/bar. We do chdir("/foo/bar"), what should become busy? Variants:
>>> mountpoint, first element, last element, all of them.
>>
>> The key question, presumably, is which FSs can we unmount from the union
>> without /foo/bar breaking? If all the FSs can be unmounted safely, none
>> should be busy.
This is right. Being "busy" is a traditional UNIX flaw.
> There is only one tricky situation: when we umount everything but the last
> element (and thus union-mount degenerates into the plain mount) && there
> is something standing on the mountpoint && aside of that mounted fs is not
> busy. Then current code will refuse to umount the thing, but the new one
> (for consistency) probably ought to (see the (E)). Yes, we can umount
> anything without breakage.
So the behavior of umount changes. No problem, since it really ought
to produce a result just like directory removal.
One could argue that that behavior is broken too. The VFS could supply
an empty path leading up to the now-missing root, so getcwd would work.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/