Skip to content

Commit

Permalink
md/raid5: ignore released_stripes check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shaohua Li authored and NeilBrown committed Jun 17, 2015
1 parent e9e4c37 commit 713bc5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,8 @@ get_active_stripe(struct r5conf *conf, sector_t sector,
if (!sh) {
if (!test_bit(R5_INACTIVE_BLOCKED, &conf->cache_state)) {
sh = get_free_stripe(conf, hash);
if (!sh && llist_empty(&conf->released_stripes) &&
!test_bit(R5_DID_ALLOC, &conf->cache_state))
if (!sh && !test_bit(R5_DID_ALLOC,
&conf->cache_state))
set_bit(R5_ALLOC_MORE,
&conf->cache_state);
}
Expand Down

0 comments on commit 713bc5c

Please sign in to comment.