From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <5cca319e11f34574d3bf6305bd6e2fbc@quanstro.net> To: 9fans@cse.psu.edu Subject: Re: device-specific qid.version behaviour (was Re: [9fans] QTCTL?) From: erik quanstrom Date: Mon, 5 Nov 2007 08:18:10 -0500 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: e8c8b95a-ead2-11e9-9d60-3106f5b1d025 > On 11/1/07, erik quanstrom wrote: >> i think it makes sense to use the medium changes (not connections, if >> possible) to determine the version. the marvell and aoe driver >> consider a device changed if the serial# or number of sectors >> change.that is something most io clients are interested in. > > this kind of thing is fine until you want to run software that > uses the original notion of "version". for instance, i suppose it's > not inconceivable that you could run something like cfs over > such a device. > > turning things around, by providing device-specific versioning behavior, > you can end up with clients that won't work well when run over normal > files. if a client expects the version number to change only when the > media changes, then it's quite likely to be fairly surprised if > the version number changes every time it writes some data. 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. 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. 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 - erik