Subject: Re: fd hard errors
To: Julio Merino <jmmv@menta.net>
From: Gary Thorpe <gathorpe79@yahoo.com>
List: tech-kern
Date: 12/02/2002 09:44:11
--- Julio Merino <jmmv@menta.net> wrote:
> On Sun, 1 Dec 2002 21:15:26 -0800 (PST)
> Greywolf <greywolf@starwolf.com> wrote:
>
> > If there's no way to detect from the drive that there is no disk in
> the
> > drive, or that it's write-protected (I seem to remember
> write-protection
> > actually generating a failure on a write...), I'd say probably an
> eight-
>
> I do not know it yet, but when this problem happens, the kernel shows
> a
> message saying write_protect...
>
> > count or ten-count on that would be a good rule of thumb; i.e. if
> you're
> > failing on ten consecutive blocks, especially on a floppy, the
> floppy's
> > probably pretty well unusable.
>
> Yes, this could be another solution. But I wonder how linux manages
> this...
> IIRC, this did not happen in it (Can anybody confirm?)
>
> Thanks
>
> --
> Julio Merino (http://jmmv.dyndns.org/) <jmmv@menta.net>
I think Linux can detect when a floppy is write protected at *mount
time*. If you try to mount a write-protected disk as writeable you will
get an error and it will be mounted read-only (if I remember properly).
Neat feature (if it actually happens as I remember it).
A nice thing to add to this is to add a condition to fail all pending
writes if one encounters a write protected disk (I am fairly certain
floppy disk drives can reliably detect this).
______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca