mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
md/raid10: wait up frozen array in handle_write_completed
[ Upstream commitcf25ae78fc] 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 commit824e47dadd("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> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a3a9a972e2
commit
8a09ef5ba1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user