]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md/raid5: avoid an extra write when writing to a known-bad-block.
authorNeilBrown <neilb@suse.de>
Mon, 4 Mar 2013 02:29:41 +0000 (13:29 +1100)
committerNeilBrown <neilb@suse.de>
Wed, 27 Mar 2013 06:14:55 +0000 (17:14 +1100)
commit4ae242b16a1a7aaf2e6dd0bb7dc014d96bbb6af8
tree098da3e97e160a47e26212e815209379029041fd
parent1ce71785356295b267cc02f1ff4e70fd5612cc55
md/raid5: avoid an extra write when writing to a known-bad-block.

If we write to a known-bad-block it will be flags as having
a ReadError by analyse_stripe, but the write will proceed anyway
(as it should).  Then the read-error handling will kick in an
write again, then re-read.

We don't need that 'write-again', so set R5_ReWrite so it looks like
it has already been done.  Then we will just get the re-read, which we
want.

Reported-by: majianpeng <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid5.c