Commit 713bc5c2 authored by Shaohua Li's avatar Shaohua Li Committed by NeilBrown

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: default avatarShaohua Li <shli@fb.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent e9e4c377
...@@ -681,8 +681,8 @@ get_active_stripe(struct r5conf *conf, sector_t sector, ...@@ -681,8 +681,8 @@ get_active_stripe(struct r5conf *conf, sector_t sector,
if (!sh) { if (!sh) {
if (!test_bit(R5_INACTIVE_BLOCKED, &conf->cache_state)) { if (!test_bit(R5_INACTIVE_BLOCKED, &conf->cache_state)) {
sh = get_free_stripe(conf, hash); sh = get_free_stripe(conf, hash);
if (!sh && llist_empty(&conf->released_stripes) && if (!sh && !test_bit(R5_DID_ALLOC,
!test_bit(R5_DID_ALLOC, &conf->cache_state)) &conf->cache_state))
set_bit(R5_ALLOC_MORE, set_bit(R5_ALLOC_MORE,
&conf->cache_state); &conf->cache_state);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment