aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2015-05-28 20:33:47 -0400
committerNeilBrown <neilb@suse.de>2015-06-16 20:00:33 -0400
commit713bc5c2deb437ef40d48374ae6a57e030bd9e35 (patch)
treeff7c83d17990a4e910d29cda53c1c41d9c0b3e28
parente9e4c377e2f563892c50d1d093dd55c7d518fc3d (diff)
md/raid5: ignore released_stripes check
conf->released_stripes list isn't always related to where there are free stripes pending. Active stripes can be in the list too. And even free stripes were active very recently. Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r--drivers/md/raid5.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 9a3b143b0b68..59e44e99eef3 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -681,8 +681,8 @@ get_active_stripe(struct r5conf *conf, sector_t sector,
681 if (!sh) { 681 if (!sh) {
682 if (!test_bit(R5_INACTIVE_BLOCKED, &conf->cache_state)) { 682 if (!test_bit(R5_INACTIVE_BLOCKED, &conf->cache_state)) {
683 sh = get_free_stripe(conf, hash); 683 sh = get_free_stripe(conf, hash);
684 if (!sh && llist_empty(&conf->released_stripes) && 684 if (!sh && !test_bit(R5_DID_ALLOC,
685 !test_bit(R5_DID_ALLOC, &conf->cache_state)) 685 &conf->cache_state))
686 set_bit(R5_ALLOC_MORE, 686 set_bit(R5_ALLOC_MORE,
687 &conf->cache_state); 687 &conf->cache_state);
688 } 688 }