9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] QID reference
@ 2001-11-04 19:19 forsyth
  0 siblings, 0 replies; 4+ messages in thread
From: forsyth @ 2001-11-04 19:19 UTC (permalink / raw)
  To: 9fans

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

it is discussed by intro(5):

			... The qid
          represents the server's unique identification for the file
          being accessed: two files on the same server hierarchy are
          the same if and only if their qids are the same.  (The
          client may have multiple fids pointing to a single file on a
          server and hence having a single qid.)  The eight-byte qid
          fields represent two four-byte unsigned integers: first the
          qid path, then the qid version. The path is an integer
          unique among all files in the hierarchy.  If a file is
          deleted and recreated with the same name in the same direc-
          tory, the old and new path components of the qids should be
          different.  Directories always have the CHDIR bit
          (0x80000000) set in their qid path.  The version is a ver-
          sion number for a file; typically, it is incremented every
          time the file is modified.

it's quite important that Qid.path be unique for active
files in the same hierarchy (identified by type and dev),
otherwise bind and mount will malfunction because they ultimately
depend on Qid values via the mount table.  for that reason,
exportfs(4) resolves qid.path clashes that can occur when it
exports a hierarchy with binds and mounts within it.
(the importing system will expect Qid.path to be unique
in the hierarchy it sees, but the original type and dev
that separated the Qid.path spaces on the exporting system
are not seen on the importing system.)

Qid.vers is less critical but is used by the kernel
file cache for mounted file systems, and by cfs(4) and others.
devices often don't maintain it; support elsewhere is a little patchy,
but kfs and the file server kernel do support it, as does env(3).

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

To: 9fans@cse.psu.edu
Subject: [9fans] QID reference
Date: Sat, 3 Nov 2001 15:37:08 -0500
Message-ID: <20011103203528.558E5199B5@mail.cse.psu.edu>

What's the idea behind the vers/path in the 9P qid?  Is path
just a serial number?  Is there a reference to the literature?

  Brantley Coile

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

* Re: [9fans] QID reference
@ 2001-11-04  6:20 rob pike
  0 siblings, 0 replies; 4+ messages in thread
From: rob pike @ 2001-11-04  6:20 UTC (permalink / raw)
  To: 9fans

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

The version number increments on each modification.
The path is unique on that file system; no other specification
is made.

-rob


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

From: bwc@borf.com
To: 9fans@cse.psu.edu
Subject: [9fans] QID reference
Date: Sat, 3 Nov 2001 15:37:08 -0500
Message-ID: <20011103203528.558E5199B5@mail.cse.psu.edu>

What's the idea behind the vers/path in the 9P qid?  Is path
just a serial number?  Is there a reference to the literature?

  Brantley Coile

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

* Re: [9fans] QID reference
  2001-11-03 20:37 bwc
@ 2001-11-03 21:15 ` Boyd Roberts
  0 siblings, 0 replies; 4+ messages in thread
From: Boyd Roberts @ 2001-11-03 21:15 UTC (permalink / raw)
  To: 9fans

> What's the idea behind the vers/path in the 9P qid?  Is path
> just a serial number?  Is there a reference to the literature?

As one with the knowledge and magic of the source -- Yes




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

* [9fans] QID reference
@ 2001-11-03 20:37 bwc
  2001-11-03 21:15 ` Boyd Roberts
  0 siblings, 1 reply; 4+ messages in thread
From: bwc @ 2001-11-03 20:37 UTC (permalink / raw)
  To: 9fans

What's the idea behind the vers/path in the 9P qid?  Is path
just a serial number?  Is there a reference to the literature?

  Brantley Coile


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

end of thread, other threads:[~2001-11-04 19:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-04 19:19 [9fans] QID reference forsyth
  -- strict thread matches above, loose matches on Subject: below --
2001-11-04  6:20 rob pike
2001-11-03 20:37 bwc
2001-11-03 21:15 ` Boyd Roberts

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).