> remember something similar to what Eric remembers: qid.vers of zero
> means `don't cache'.  It might not be written down; it may have just
> been oral folklore at the labs.

when the 9p2000 man pages were initially posted to this list for discussion,
i made a suggestion to that effect, and i seem to recall rob
saying "not a bad idea, but we haven't done it yet".

it's still not done (or documented, at any rate), but i'm still not
sure it's a bad idea.

> this is not true of devsd devices.  the version is used to deal with
> removable devices.  if you have a cd open and the media is changed,
> i/o to the device will return Echange.

using qid.version to indicate the status of the underlying device
rather than of the file data seems to me like an abuse of the system.
surely a status file would be a better way of indicating media change?

> Why don“t add a QTCTL bit to Qid.type?

if we ignore concurrent usage  (which is, after all, a rare case),
one big issue is idempotency - can i read twice at
the same offset and get the same result; can i write two blocks
at different offsets out of order (a la fcp) and end up with the same file?

there are many possible ways that the read and write operations
can be used in the construction of interesting file systems, but
perhaps the semantics of "regular" files are sufficiently common and
useful that it would be
worth knowing whether a given file adheres to them.

those semantics being something like:
- read or write twice at the same offset will yield the same result
(modulo concurrent writers)
- read or write of several sequential items of data is the same
as one read or write of all the data.
- write, followed by a read at the same offset yields the same data
(modulo concurrent writers again)

so i guess i'd argue for a QTREGULAR (QTDATA?) bit rather than a QTCTL bit.
that way, we could start off by adding that bit to those files that
definitely observed the given semantics, and avoid arguing about
which files were or were not "control" files. (and qid.version==0 could
still be useful as a "treat this file as if it always had a new version number
signifier). (and QTAPPEND is still useful to signify a modification, but
not a complete discarding of the given semantics).

Reply via email to