9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: presotto@plan9.bell-labs.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] vac merge semantics
Date: Mon, 19 Aug 2002 20:50:54 -0400	[thread overview]
Message-ID: <09174ed505404e969b0e40bc4ef95296@plan9.bell-labs.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 123 bytes --]

The mount table works by using qid's.  Start playing fast and loose
and you can end up with some very strange name spaces.

[-- Attachment #2: Type: message/rfc822, Size: 4442 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 202 bytes --]

it's probably fairly troublesome, because various things, including the
mount table, use qids for identification.  exportfs goes to a little trouble
to make its outgoing qids unique for that reason.

[-- Attachment #2.1.2: Type: message/rfc822, Size: 2669 bytes --]

From: Richard Miller <miller@hamnavoe.demon.co.uk>
To: 9fans@cse.psu.edu
Subject: [9fans] vac merge semantics
Date: Mon, 19 Aug 2002 20:37:32 0100
Message-ID: <20020819193803.27D52199EC@mail.cse.psu.edu>

When vac(1) file trees of depth > 1 are merged with 'vac -m', the resulting
tree when served by vacfs(1) can contain (?usually will contain) multiple
files with identical qid values.

Demonstration:

	cpu% mkdir one
	cpu% echo one a >one/a
	cpu% mkdir two
	cpu% echo two b >two/b
	cpu% vac -f one.vac one
	cpu% vac -f two.vac two
	cpu% vac -f both.vac -m one.vac two.vac
	cpu% vacfs -m /n/kremvax both.vac
	cpu% ls -lq /n/kremvax
	(0000000000000003 0 80) d-rwxrwxr-x M 61 miller miller 0 Aug 19 19:56 /n/kremvax/one
	(0000000000000006 0 80) d-rwxrwxr-x M 61 miller miller 0 Aug 19 19:56 /n/kremvax/two
	cpu% ls -lq /n/kremvax/*
	(0000000000000001 0 00) --rw-rw-r-- M 61 miller miller 6 Aug 19 19:56 /n/kremvax/one/a
	(0000000000000001 0 00) --rw-rw-r-- M 61 miller miller 6 Aug 19 19:56 /n/kremvax/two/b
	cpu% grep . /n/kremvax/*/*
	/n/kremvax/one/a:one a
	/n/kremvax/two/b:two b

No, I haven't got a correction for this one.  I'm wondering how much of a Bad Thing
it is.  Clearly it contradicts the specification in intro(5) that qids are unique
within a server hierarchy.  Although I've never been very clear about what qids are
used for in practice, it would seem for example that using cfs(4) to cache a merged
vacfs tree, or mounting it with '-C', would lead to serious confusion.

-- Richard Miller

             reply	other threads:[~2002-08-20  0:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-20  0:50 presotto [this message]
2002-08-20 17:58 ` Sean Quinlan
  -- strict thread matches above, loose matches on Subject: below --
2002-08-21 18:31 Richard Miller
2002-08-19 22:15 Charles Forsyth
2002-08-19 19:37 Richard Miller

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=09174ed505404e969b0e40bc4ef95296@plan9.bell-labs.com \
    --to=presotto@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /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).