md/raid1: avoid writing to known-bad blocks on known-bad drives.
authorNeilBrown <neilb@suse.de>
Thu, 28 Jul 2011 01:31:48 +0000 (11:31 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 28 Jul 2011 01:31:48 +0000 (11:31 +1000)
commit1f68f0c4b677ccd6935ff61e4e6888787505f8dc
treeaaff73efbc3fb7b6092eb2106e142e1684c4b554
parent0b7d83865cb7a60b1768212c1e60b8fd7c280506
md/raid1: avoid writing to known-bad blocks on known-bad drives.

If we have seen any write error on a drive, then don't write to
any known-bad blocks on that drive.
If necessary, we divide the write request up into pieces just
like we do for reads, so each piece is either all written or
all not written to any given drive.

Signed-off-by: NeilBrown <neilb@suse.de>
Reviewed-by: Namhyung Kim <namhyung@gmail.com>
drivers/md/raid1.c