Re: Floppy Handling

From: Jacques Richer (jricher@bankri.com)
Date: Wed Jun 14 2000 - 14:00:52 EST


James Sutherland wrote:

> 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.

Not to open a can of worms, but this looks like a job for a user mode filesystem. I
realize that there aren't any hooks for this in the existing kernel, but it may be
more productive to write these hooks, and implement the code as a daemon than it
would be to try to shoehorn this thing into the kernel.

--
  Jacques
--
The packet goes out the card, into the copper,
 out the router, onto the fiber, across the world,
 through the copper......
             NOTHING BUT NET!

- 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:32 EST