From mboxrd@z Thu Jan 1 00:00:00 1970 From: presotto@plan9.bell-labs.com Message-Id: <200007041320.JAA23671@cse.psu.edu> Subject: re: [9fans] bind -ac B A Date: Tue, 4 Jul 2000 09:20:02 -0400 To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: d3493b2c-eac8-11e9-9e20-41e7f4b1d025 In answer to kenji's paradox... Perhaps this will help explain: % mkdir A % mkdir B % bind -a B A % touch A/x touch: A/x: cannot create: mounted directory forbids creation % unmount A % bind -c A A % bind -ac B A % touch A/x % unmount A % ls -l A B --rw-rw-r-- M 6 presotto presotto 0 Jul 4 08:52 A/x % A mount point is an ordered list of binds and mounts. If you do % bind -a B A onto an A that isn't already a mount point, then there's no list of mount/bind's to chain this one after. Therfore, the kernel does an implicit bind of A onto A to be the first mount point in the list. It then appends the bind of B onto A to the list. That first inplicit bind doesn't have the create bit set so B is the first thing in the list with create priviledge. The original version of plan 9 actually required you to explicitly bind A onto itself before letting you bind B onto A. That was a bit awkward so we made it automatic. Unfortunately, we may also make it counterintuitive but I like not typing all those gratuitous extra binds.