Re: [PATCH] md/raid10: wait up frozen array in handle_write_completed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 17, 2017 at 05:11:05PM +0800, Guoqing Jiang wrote:
> 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.

thanks, applied!
 
> Signed-off-by: Guoqing Jiang <gqjiang@xxxxxxxx>
> ---
>  drivers/md/raid10.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
> index 4167091..acb3f46 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,
> -- 
> 2.10.0
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux