Re: [patch] floppy: suspend/resume fix

Pavel Machek
2006-11-14T11:10:15Z

Hi!

> > > Nevertheless, I give you two options:
> > >
> > > 1. Abort all IO do inserted floppy disk after resume.
> > > 2. Corrupt replaced floppy disk after resume.
> > >
> > > You have to pick one and exactly one. Which is inherently less risky
> > > to the end user?
> >
> > this isnt about in-flight IO (suspend doesnt succeed if IO is in flight
> > anyway).
>
> I wasn't talking about in-flight IO. Take a moment to think about it.
>
> - You have a floppy inserted and mounted.

Notice that Ingo is not talking about floppy being mounted.

> - You write a file to it, and then suspend the machine.
> *** No IO was in progress when the suspend occurred.
> - You remove the floppy disk and insert a different disk
> - You resume
> - The kernel submits the dirty buffers for writing out to the disk.
>
> That would lead to a corrupted floppy disk.

Suspending with mounted floppy is a user error. Write tarball to a
floppy, suspend, resume, write another tarball to a floppy is not, and
we want to fix that.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html