9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] Dir->type & Dir->dev
Date: Sun, 30 Nov 2008 10:18:20 -0500	[thread overview]
Message-ID: <1a2be9d78c2e736fb1319f7dd41b765c@quanstro.net> (raw)
In-Reply-To: <a4e6962a0811300709q67ee3f96nf599cca7f045a89a@mail.gmail.com>

On Sun Nov 30 10:12:00 EST 2008, ericvh@gmail.com wrote:
> The main pages are a little unclear as to the convention for
> assignment of dir->type & dir->dev, particularly with respect to
> synthetic file servers.  For devices I gather that type is the device
> id (ie. 'c' for cons) and that dev is the instance (ie. #I2 for an
> alternate IP stack).  Their use seems a bit more slippery when
> implementing user space file servers -- particular since type,dev,qid
> must(?) be unique per namespace.  Is there a best practices convention
> that folks follow or is this something which most ignore and we are
> just lucky most of the time?
>
>              -eric

there is a dir.type and a dir.qid.type.  i believe these are different.
the comment above dir.type in /sys/include/libc.h says that it's
system modified.  and, e.g. /mail/fs shows up as from the mount
driver.  the instance is typically pretty big.  the mount driver is
pretty careful to count instances.

; ls -l /mail/fs
--rw-rw-rw- M 105920 quanstro quanstro 0 Nov 30 10:17 /mail/fs/ctl
d-r-xr-xr-x M 105920 quanstro quanstro 0 Nov 30 10:11 /mail/fs/mbox

- erik



  reply	other threads:[~2008-11-30 15:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-30 15:09 Eric Van Hensbergen
2008-11-30 15:18 ` erik quanstrom [this message]
2008-11-30 16:26   ` Eric Van Hensbergen
2008-11-30 19:07   ` Charles Forsyth

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=1a2be9d78c2e736fb1319f7dd41b765c@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /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).