public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Bind mount bug?
@ 2007-11-11 10:06 Frans Pop
  2007-11-11 10:22 ` Frans Pop
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Frans Pop @ 2007-11-11 10:06 UTC (permalink / raw)
  To: linux-kernel

I'm not sure whether this is a bug or expected behavior.
Suppose I create a "looped" bind mount situation as follows.

# mkdir test
# touch test/foo
# mkdir bindtest
# touch bindtest/bar
# mkdir bindtest/test
# mount --bind test/ bindtest/test/
# ls bindtest/test/
foo
# mount --bind bindtest/ test/
# ls test/
bar  test
# ls test/test/
#

I'd expected the last command to list "foo", but it shows an empty dir.
Shouldn't it also show the original contents of test (as they were before 
the first bind mount)?

# mount | grep test
/root/test on /root/bindtest/test type none (rw,bind)
/root/bindtest on /root/test type none (rw,bind)

Cheers,
Frans Pop

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-11-11 23:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-11 10:06 Bind mount bug? Frans Pop
2007-11-11 10:22 ` Frans Pop
2007-11-11 22:00 ` Roland Kuhn
2007-11-11 22:40   ` Frans Pop
2007-11-11 22:29 ` Jan Engelhardt
2007-11-11 23:42   ` Frans Pop

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox