diff options
author | NeilBrown <neilb@suse.de> | 2011-07-28 11:39:22 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-07-28 11:39:22 +1000 |
commit | 31c176ecdf3563140e6395249eda51a18130d9f6 (patch) | |
tree | 5ad7dba363214e9d36fa921c221316d2597078ef /ipc/Makefile | |
parent | 62096bce231b3760882ed91205fc84682d6b0529 (diff) |
md/raid5: avoid reading from known bad blocks.
There are two times that we might read in raid5:
1/ when a read request fits within a chunk on a single
working device.
In this case, if there is any bad block in the range of
the read, we simply fail the cache-bypass read and
perform the read though the stripe cache.
2/ when reading into the stripe cache. In this case we
mark as failed any device which has a bad block in that
strip (1 page wide).
Note that we will both avoid reading and avoid writing.
This is correct (as we will never read from the block, there
is no point writing), but not optimal (as writing could 'fix'
the error) - that will be addressed later.
If we have not seen any write errors on the device yet, we treat a bad
block like a recent read error. This will encourage an attempt to fix
the read error which will either generate a write error, or will
ensure good data is stored there. We don't yet forget the bad block
in that case. That comes later.
Now that we honour bad blocks when reading we can allow devices with
bad blocks into the array.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'ipc/Makefile')
0 files changed, 0 insertions, 0 deletions