]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid5: Fix livelock when array is both resyncing and degraded.
authorNeilBrown <neilb@suse.de>
Wed, 18 Feb 2015 00:35:14 +0000 (11:35 +1100)
committerNeilBrown <neilb@suse.de>
Wed, 18 Feb 2015 00:35:14 +0000 (11:35 +1100)
commit56c1313c4c8e52ffe2f410e52b113dd52eac326d
tree1ec992f01a3873c7c033c6b41633cbdeb5dec0dc
parent6d8f97480c138df6cff2c4baec52f1b55c6814f9
md/raid5: Fix livelock when array is both resyncing and degraded.

Commit 11ddc644965ee781d63fa2247cc5b2a9bfe41783:
  md: When RAID5 is dirty, force reconstruct-write instead of read-modify-write.

Causes an RCW cycle to be forced even when the array is degraded.
A degraded array cannot support RCW as that requires reading all data
blocks, and one may be missing.

Forcing an RCW when it is not possible causes a live-lock and the code
spins, repeatedly deciding to do something that cannot succeed.

So change the condition to only force RCW on non-degraded arrays.

Reported-by: Manibalan P <pmanibalan@amiindia.co.in>
Bisected-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Tested-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Fixes: 11ddc644965ee781d63fa2247cc5b2a9bfe41783
Cc: stable@vger.kernel.org (v3.7+)
drivers/md/raid5.c