9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Russ Cox" <rsc@swtch.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] unique identity to virtual files
Date: Tue, 15 Jan 2008 09:35:36 -0500	[thread overview]
Message-ID: <20080115143538.0E9A81E8C1C@holo.morphisms.net> (raw)
In-Reply-To: <eff0484811b6fbdca820c1b64e274510@quintile.net>

> I have a program (A) I have written, it can optionally run atop of a
> a synthetic filesystem (B) which expands some files into directories
> of files.
> 
> The A needs to be able to tell the difference between a
> 'real' directory and one generated by B.

the usual answer is "don't do that."  i.e. if you want to use A,
then run it on a name space where B isn't around.
you can't use the dev/type fields because devmnt will
set those to things like M 123123 over which B has
no control.  you could use the qid but exportfs
might fiddle with those.

using the uid/gid would make the most sense to me,
in that it would be the least unexpected.  for example,
since their file systems don't contain user and group info,
dossrv sets uid & gid to bill & trog, while 9660srv sets the
uid & gid (when the cd doesn't contain those)
to cdrom & iso9660/joliet/ridge etc.  it would in that
context make a little sense for your expander file system to
set the uid/gid on files it has created, and then a little less
sense for your program (A) to treat those specially.

really the right answer is to run A in a tree where B has
not been mounted, though.

russ


  parent reply	other threads:[~2008-01-15 14:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-15 13:09 Steve Simon
2008-01-15 13:20 ` erik quanstrom
2008-01-15 14:35 ` Russ Cox [this message]
2008-01-15 15:55   ` roger peppe
2008-01-15 16:29 ` Gary Wright
2008-01-15 17:21   ` 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=20080115143538.0E9A81E8C1C@holo.morphisms.net \
    --to=rsc@swtch.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).