]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid1: be more cautious where we read-balance during resync.
authorNeilBrown <neilb@suse.de>
Tue, 9 Sep 2014 03:49:46 +0000 (13:49 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 22 Sep 2014 00:26:41 +0000 (10:26 +1000)
commitb825499525020e42ea6feed8e4b127813ce0b0a3
tree78b0d77bf219226141bffe4be2a868aec0bbf6e3
parent4741552211f1962cae4eb651e5312cfa11f0c66a
md/raid1:  be more cautious where we read-balance during resync.

commit b718760feda718421e51ffddbcd4207d488838f2 made
it possible for reads to happen concurrently with resync.
This means that we need to be more careful where read_balancing
is allowed during resync - we can no longer be sure that any
resync that has already started will definitely finish.

So keep read_balancing to before recovery_cp, which is conservative
but safe.

This bug makes it possible to read from a device that doesn't
have up-to-date data, so it can cause data corruption.
So it is suitable for any kernel since 3.11.

Fixes: b718760feda718421e51ffddbcd4207d488838f2
cc: stable@vger.kernel.org (v3.13+)
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid1.c