Re: Floppy Handling

From: James Sutherland (jas88@cam.ac.uk)
Date: Wed Jun 14 2000 - 13:52:18 EST


On Wed, 14 Jun 2000, Jacques Richer wrote:
> James Sutherland wrote:
> > On Wed, 14 Jun 2000, Jacques Richer wrote:
> >
> > > There may be an issue with using a virtual block device with floppy
> > > recognition code used to identify "which disk". The main issue I can see
> > > is the following scenario:
> > > 1. Joe user inserts a floppy disk in his linux box and creates a
> > > file.
> > > 2. Same user gives disk to Jane user, who updates the file.
> > > 3. Jane user gives disk back to Joe user, who works on these
> > > updates...
> > >
> > > Unless there is a "timestamp" on updates, there is no way for the kernel
> > > level code to know about the changes between steps 1 and 3. esult:
> > > probable file system corruption.
> >
> > ISTR we should get a "disk changed" indication from the drive, which will
> > indicate that?
> >
> > James.
>
> If you are cacheing disk data on either a) disk or b) virtual memory for
> multiple instances of "floppy disk", there is the possibility this case would
> arise. One of the previous approaches called for the kernel algorithm to check
> to see if it "recognied the disk" - in which case it would use cached data.
> This strikes me as being unsafe.

Nononono. Not "It's not the last disk we saw", but "the disk we had in
previously has been removed, and there's a disk there now - but it might
be another one". This means we need to invalidate the cache.

> Stability is more important than speed, especially with floppies - which are
> accepted as being slow be everyone _I_ work with.

Agreed.

James.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:34 EST