From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <1a2be9d78c2e736fb1319f7dd41b765c@quanstro.net> From: erik quanstrom Date: Sun, 30 Nov 2008 10:18:20 -0500 To: 9fans@9fans.net In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Dir->type & Dir->dev Topicbox-Message-UUID: 53c55e88-ead4-11e9-9d60-3106f5b1d025 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