9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: northern snowfall <dbailey27@ameritech.net>
To: 9fans@cse.psu.edu
Cc: andrey mirtchovski <mirtchov@cpsc.ucalgary.ca>, dbailey27@ameritech.net
Subject: Re: [9fans] bind -c[ab] -- what am I doing wrong?
Date: Thu, 17 Jul 2003 12:42:27 -0500	[thread overview]
Message-ID: <3F16E003.3040806@ameritech.net> (raw)
In-Reply-To: <Pine.LNX.4.44.0307171007500.7478-100000@fbsd.cpsc.ucalgary.ca>

>
>
>who's to blame?
>
You are! Binds make a list of directories like a linked
list chain. Our operations on these directories can always
be considered one of two primaries: read or write. Respectively,
we can think as the first link in the chain as the link we
Read from:
    cpu% cd
    cpu% mkdir testme
    cpu% cat > testme/u.h << EOF
        hello!
        EOF
    cpu% bind -bc testme /386/include
    cpu% wc -l /386/include/u.h
          1 /386/include/u.h
    cpu% cat /386/include/u.h
    hello!
    cpu% unmount /386/include

Or, we Read from the first bound directory that contains the
file we've requested access to. So, if 'testme' didn't contain
an u.h, the Read would return /386/include/u.h, despite testme
being bound 'before' /386/include/u.h.

Writes always take effect in the first directory we have permission
to write to in the chain. Most often this is the last link in the
chain:
    cpu% bind -ac testme /386/include/
    cpu% touch /386/include/foo
    cpu% ls -l testme/foo
    --rw-rw-r-- M 2265 snowfall snowfall 0 Jul 17 11:35 testme/foo
    cpu% unmount /386/include
    cpu%

So, if multiple directories we can write to were bound 'after'
our primary unwritable, we write to the first:
    cpu% bind -ac /tmp /386/include
    cpu% bind -ac testme /386/include
    cpu% touch /386/include/foo2
    cpu% ls -l /tmp/foo2
    --rw-rw-r-- M 2265 snowfall snowfall 0 Jul 17 11:38 /tmp/foo2
    cpu%

Hope that helps!
Don

http://www.7f.no-ip.com/~north_







>



  reply	other threads:[~2003-07-17 17:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-17 16:13 andrey mirtchovski
2003-07-17 17:42 ` northern snowfall [this message]
2003-07-17 17:10   ` andrey mirtchovski
2003-07-17 17:18     ` boyd, rounin
2003-07-17 17:34       ` andrey mirtchovski
2003-07-17 17:37         ` David Presotto
2003-07-17 17:45         ` boyd, rounin
2003-07-17 18:07           ` andrey mirtchovski
2003-07-17 19:29             ` [9fans] Laptop and VM software vdharani
2003-07-17 18:34               ` jmk
2003-07-18  4:21                 ` Adrian Tritschler
2003-07-18  9:07                   ` vdharani
2003-07-18  8:24                     ` Adrian Tritschler
2003-07-18 11:52                   ` C H Forsyth
2003-07-19 17:28                 ` Russ Cox
2003-07-17 17:35       ` [9fans] bind -c[ab] -- what am I doing wrong? David Presotto
2003-07-17 17:30 Richard C Bilson
2003-07-17 20:09 northern snowfall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F16E003.3040806@ameritech.net \
    --to=dbailey27@ameritech.net \
    --cc=9fans@cse.psu.edu \
    --cc=mirtchov@cpsc.ucalgary.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).