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 14:35:31 +0000	[thread overview]
Message-ID: <df49a7370711050635v2ad1bc1cu5ea5850b9951520a@mail.gmail.com> (raw)
In-Reply-To: <5cca319e11f34574d3bf6305bd6e2fbc@quanstro.net>

On 11/5/07, erik quanstrom <quanstro@quanstro.net> wrote:
> i still don't agree that this is anomolous behavior.  when the medium
> has changed, the file has changed.  it has a new set, and possibly a different
> number of blocks.  this is exactly the case where ken's fs or fossil
> assign a new qid.vers.

i agree it's perfectly reasonable to assign a new qid.vers in this case.
but if it's going to do this, i think it should also assign a new qid.vers
when the data file has been written to.

> further, this behavior only holds for /dev/sdXX/data and a few other files, like
> /dev/fd?^(diskc ctl).  i don't see how this could break anything.
> could you give a senario that would be broken in this case?
> i can't find any programs that use the qid.version for anything except
> to infer that a file has changed if it qid.vers has changed.

i gave one scenario. to expand on it: say dossrv expected this behaviour.
it would then do an occasional stat; if the qid.vers had changed, it
would assume that the floppy had been swapped and abort with an error.
this would mean that i could no longer use dossrv on a conventional
file, because every time dossrv wrote to the file, it would then
abort, thinking that the floppy had been swapped because the version
number had changed.

as it happens, neither dossrv, nor 9660srv do check the version
number this way, as far as i can see (even though 9660srv could, without loss
of generality)

> by the way, your claim that this is new behavior is not correct.
> russ' plan9history shows that the floppy driver use the qid.vers in
> this way on 1991/0925.
>         http://swtch.com/cgi-bin/plan9history.cgi?f=pc/devfloppy.c;v=history

um, i don't think i said that it was new behaviour. i did say that i thought it
was an abuse of the semantics, and i still think so. to me the devfloppy
code you point to looks like it was just using the Chan as a
convenient place to store
the version, rather than to deliberately make the information
available publicly.
i'm probably wrong about that, but i don't think it makes a good precedent.
i still think that having a separate file representing the medium itself,
rather than the data contained within it, would be a better solution.


  reply	other threads:[~2007-11-05 14:35 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 [this message]
2007-11-05 15:01     ` erik quanstrom
2007-11-05 16:10       ` roger peppe
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=df49a7370711050635v2ad1bc1cu5ea5850b9951520a@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).