1. PIO mode
when multicount is set to non zero value the IDE driver generates
an error even if reading of a bad sector is not directly requested,
but the it is located in the
<block_requested+1>..<block_requested+multicount_value-1>
area.
2. DMA mode
when readahead is set to non zero value the the IDE driver behaviuor
is similar to the above. Error is generated if a bad bloch is located
in
<block_requested+1>..<block_requested+readahead_value-1>
area.
Such behaviour cause greater data loss (*) and filesystem problems than they
are really caused by bad blocks appearing. Reads of many sectors *before*
a real bad sector are impossible, while writes to them work OK.
I think the IDE driver *should not* generate an error (eventually a warning)
when reading of real bad block is *not* directly requested. I hope that
ide disk reports the number of sectors (on an I/O port) that have been read
during an IDE command (even if it sets simultaneously one or more error
flags).
However, I don't know the IDE specification/driver enough to implement this.
So my questions to IDE people are:
Is it technically possible to modify IDE error handling in this way?
How much would it influence the current IDE driver architecture?
Regards
Andrzej
(*) I know that bad sectors are *REALLY* bad things but sometimes
(the newer disks, the shorter lifetime...) they appear. So if
they can be handled in a better way they should be.
-- ======================================================================= Andrzej M. Krzysztofowicz ankry@mif.pg.gda.pl phone (48)(58) 347 14 61 Faculty of Applied Phys. & Math., Technical University of Gdansk--MAA01530.913463191/green.mif.pg.gda.pl--
-- ======================================================================= Andrzej M. Krzysztofowicz ankry@mif.pg.gda.pl tel. (0-58) 347 14 61 Wydz.Fizyki Technicznej i Matematyki Stosowanej Politechniki Gdanskiej--NAA01826.913465450/green.mif.pg.gda.pl--
-- ======================================================================= Andrzej M. Krzysztofowicz ankry@mif.pg.gda.pl tel. (0-58) 347 14 61 Wydz.Fizyki Technicznej i Matematyki Stosowanej Politechniki Gdanskiej- 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/