Re: Loopback (dir->dir) mounting (NOT -o loop)

From: Andries Brouwer (aeb@veritas.com)
Date: Fri Jun 02 2000 - 07:02:50 EST


On Fri, Jun 02, 2000 at 07:22:37AM +0200, almesber@lrc.di.epfl.ch wrote:
> Chris Wedgwood wrote:
> > On Thu, Jun 01, 2000 at 04:03:15PM -0700, H. Peter Anvin wrote:
> [...]
> > mount -t bind /home/user /home/user/again
> [...]
> > No it won't. /home/user/again is be empty. Try it.
>
> I had a quick look at the code but couldn't quite figure out how
> it accomplishes this,

It is not that /home/user/again will be empty. The old situation
is lifted to the new directory. Thus, in /home/user/again you'll
find what was in /home/user before the mount. In particular, if
/home/user/again was empty, then now /home/user/again/again will
be empty. Putting something in again/again/foo does not change
again, but after the umount there now is foo in again. All as expected.

Andries

-
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/



This archive was generated by hypermail 2b29 : Wed Jun 07 2000 - 21:00:15 EST