> I think the issue is what does "mount F over directory D" mean?
> 
> Does it mean to mount F immediately over D, in spite of anything that 
> might be stacked above D right now?  Or does it mean to throw F onto the 
> stack which is currently sitting over D?  Your analysis assumes it's the 
> former, whereas what Linux does is consistent with the latter.

In fact those two are indistinguishable.  What linux does is an
internal implementation detail.  The semantics are simple: if you
mount over a directory, that mount will be visible (no matter what was
previously visible) on lookup of that directory.

> Neither of them actually makes sense.  mount over "." simply doesn't make 
> sense.  Mount is a namespace operation.  "mount over D" says, "when 
> someone looks up name D, ignore what's really in the directory and instead 
> give him this other filesystem object."  "Mount over /mnt/cdrom" doesn't 
> mean mount over the directory /mnt/cdrom.  It means mount under the name 
> "cdrom" in the directory /mnt.  So "mount over '.'" means any future 
> lookup of "." in that directory should hyperjump to the other mount. 
> That's clearly not what anyone wants, so mount ought to recognize the 
> special nature of the "." directory entry and not allow mounts over it.

Well, mounting over '.' may not be perfect in the mathematical sense
of namespace operations, but it does make some practical sense.  I bet
you anything that some script/tool/person out there depends on it.

Miklos
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to