diff options
author | Guoqing Jiang <gqjiang@suse.com> | 2017-04-17 17:11:05 +0800 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2017-04-20 09:55:52 -0700 |
commit | cf25ae78fc50010f66b9be945017796da34c434d (patch) | |
tree | 68a4aa1d5cbf900d124db9bc951b1511988b5102 /drivers/md/raid10.c | |
parent | fc6d2a3ca59d5656d5b0ac3b25ecf493e4614abd (diff) | |
download | linux-stable-cf25ae78fc50010f66b9be945017796da34c434d.tar.gz linux-stable-cf25ae78fc50010f66b9be945017796da34c434d.tar.bz2 linux-stable-cf25ae78fc50010f66b9be945017796da34c434d.zip |
md/raid10: wait up frozen array in handle_write_completed
Since nr_queued is changed, we need to call wake_up here
if the array is already frozen and waiting for condition
"nr_pending == nr_queued + extra" to be true.
And commit 824e47daddbf ("RAID1: avoid unnecessary spin
locks in I/O barrier code") which has already added the
wake_up for raid1.
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r-- | drivers/md/raid10.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 4167091eff9a..acb3f46f522f 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -2704,6 +2704,11 @@ static void handle_write_completed(struct r10conf *conf, struct r10bio *r10_bio) list_add(&r10_bio->retry_list, &conf->bio_end_io_list); conf->nr_queued++; spin_unlock_irq(&conf->device_lock); + /* + * In case freeze_array() is waiting for condition + * nr_pending == nr_queued + extra to be true. + */ + wake_up(&conf->wait_barrier); md_wakeup_thread(conf->mddev->thread); } else { if (test_bit(R10BIO_WriteError, |