From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] unique identity to virtual files From: "Russ Cox" Date: Tue, 15 Jan 2008 09:35:36 -0500 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20080115143538.0E9A81E8C1C@holo.morphisms.net> Topicbox-Message-UUID: 2e8c4006-ead3-11e9-9d60-3106f5b1d025 > 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