* re: [9fans] bind -ac B A
@ 2000-07-04 13:20 presotto
0 siblings, 0 replies; 2+ messages in thread
From: presotto @ 2000-07-04 13:20 UTC (permalink / raw)
To: 9fans
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [9fans] bind -ac B A
@ 2000-07-04 10:11 arisawa
0 siblings, 0 replies; 2+ messages in thread
From: arisawa @ 2000-07-04 10:11 UTC (permalink / raw)
To: 9fans
Hello,
I wonder about the following result:
term% pwd
/usr/arisawa/T
term% ls -l *
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 A/a1
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 A/a2
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 A/c
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 B/b1
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 B/b2
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 B/c
term% bind -ac B A
term% ls -l *
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 A/a1
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 A/a2
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 A/b1
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 A/b2
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 A/c
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 A/c
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 B/b1
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 B/b2
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 B/c
term% touch A/x
term% ls -l *
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 A/a1
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 A/a2
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 A/b1
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 A/b2
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 A/c
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 A/c
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:45 A/x
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 B/b1
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 B/b2
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 B/c
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:45 B/x
term% unmount A
term% ls -l *
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 A/a1
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 A/a2
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 A/c
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 B/b1
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 B/b2
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:15 B/c
--rw-rw-r-- M 3 arisawa arisawa 0 Jul 4 16:52 B/x
I think the file x should be created in A.
Thanks,
Kenji Arisawa
E-mail: arisawa@aichi-u.ac.jp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-07-04 13:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-04 13:20 [9fans] bind -ac B A presotto
-- strict thread matches above, loose matches on Subject: below --
2000-07-04 10:11 arisawa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).