9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "roger peppe" <rogpeppe@gmail.com>
To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu>
Subject: Re: device-specific qid.version behaviour (was Re: [9fans] QTCTL?)
Date: Mon,  5 Nov 2007 16:10:20 +0000	[thread overview]
Message-ID: <df49a7370711050810g1cc9391eq40aa251d26bbe795@mail.gmail.com> (raw)
In-Reply-To: <ddefa1eee98e5145d9a10204e18c8f86@quanstro.net>

On 11/5/07, erik quanstrom <quanstro@quanstro.net> wrote:
> i think something's lost in the translation here.
>
> the client is not responsible for checking the qid.version.  the
> server (e.g. devsd, devaoe or devfloppy) does the qid checking
> itself.

i'm sorry? the server is the one *generating* the qid, surely?
for instance, in the case of cdfs, the version number comes from the
scsi(2) library function, and doesn't have any necessary correspondence with
qid.vers as found in the data file served by cdfs. so strictly speaking,
the server isn't doing any qid checking at all - it's just looking at
its own data structures.

> using a seperate file to detect media change introduces a
> race.  with network-attached media this might be a problem.

there's a race anyway if you're doing the stat in a separate process.
if you're not, then it's the same either way, no?

> the fact is, you can't deal with a physical disk like /dev/sdE0/data
> in the same way you can deal with a regular fileserver.

perhaps not. but by putting device-specific information in qid.vers,
you run the risk that you can't treat a file on a regular fileserver
as if it was a physical disk, and i really like being able to do that.

and i'm afraid i really disagree with the following:

> seriously, the fewer rigid rules we make for 9p,
> the more adaptable it will be.

i feel that real adaptability comes from having a few, well-defined
rules, and freedom within those rules. that way you get
good interoperability, but also flexibility, because the rules
aren't really that restrictive. for me, 9p's unwritten rule seems
to be "if you do it, do it right", whether you're talking
about versions, sizes, read/write offsets, or whatever.

> try doing ls -lt /mail/fs/mbox.

i wish this worked!


  reply	other threads:[~2007-11-05 16:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-05 11:18 roger peppe
2007-11-05 13:18 ` erik quanstrom
2007-11-05 14:35   ` roger peppe
2007-11-05 15:01     ` erik quanstrom
2007-11-05 16:10       ` roger peppe [this message]
2007-11-05 16:40         ` erik quanstrom
2007-11-05 17:06           ` roger peppe
2007-11-05 17:54             ` erik quanstrom
2007-11-05 22:17               ` roger peppe
2007-11-05 23:21                 ` erik quanstrom
2007-11-06  0:53                   ` Charles Forsyth
2007-11-05 17:26           ` Skip Tavakkolian
2007-11-05 18:25             ` Eric Van Hensbergen
2007-11-05 19:52               ` Skip Tavakkolian
2007-11-05 22:12                 ` Skip Tavakkolian
2007-11-05 16:42         ` erik quanstrom
2007-11-05 15:27     ` erik quanstrom

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=df49a7370711050810g1cc9391eq40aa251d26bbe795@mail.gmail.com \
    --to=rogpeppe@gmail.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).