linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] raid5: wakeup raid5d when R5_ALLOC_MORE is set
@ 2015-05-29  0:33 Shaohua Li
  2015-05-29  0:33 ` [PATCH 2/4] raid5: grown at least NR_STRIPE_HASH_LOCKS stripes Shaohua Li
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Shaohua Li @ 2015-05-29  0:33 UTC (permalink / raw)
  To: linux-raid; +Cc: neilb

The run time stripe allocation is done at raid5d. When we set the
R5_ALLOC_MORE flag, we should notify raid5d to handle it

Signed-off-by: Shaohua Li <shli@fb.com>
---
 drivers/md/raid5.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 61e8e04..bfa2042 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -674,9 +674,11 @@ get_active_stripe(struct r5conf *conf, sector_t sector,
 			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))
+				    !test_bit(R5_DID_ALLOC, &conf->cache_state)) {
 					set_bit(R5_ALLOC_MORE,
 						&conf->cache_state);
+					md_wakeup_thread(conf->mddev->thread);
+				}
 			}
 			if (noblock && sh == NULL)
 				break;
-- 
1.8.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-05-29  5:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-29  0:33 [PATCH 1/4] raid5: wakeup raid5d when R5_ALLOC_MORE is set Shaohua Li
2015-05-29  0:33 ` [PATCH 2/4] raid5: grown at least NR_STRIPE_HASH_LOCKS stripes Shaohua Li
2015-05-29  5:07   ` NeilBrown
2015-05-29  0:33 ` [PATCH 3/4] raid5: ignore released_stripes check Shaohua Li
2015-05-29  5:16   ` NeilBrown
2015-05-29  0:33 ` [PATCH 4/4] raid5: fix wakeup condition Shaohua Li
2015-05-29  5:23   ` NeilBrown
2015-05-29  5:42     ` Shaohua Li
2015-05-29  5:42   ` Yuanhan Liu
2015-05-29  5:02 ` [PATCH 1/4] raid5: wakeup raid5d when R5_ALLOC_MORE is set NeilBrown
2015-05-29  5:33   ` Shaohua Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).