linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shaohua Li <shli@kernel.org>
To: Guoqing Jiang <gqjiang@suse.com>
Cc: linux-raid@vger.kernel.org, neilb@suse.com
Subject: Re: [PATCH] md/raid10: wait up frozen array in handle_write_completed
Date: Thu, 20 Apr 2017 09:55:31 -0700	[thread overview]
Message-ID: <20170420165531.b46ibngthgcrn4fi@kernel.org> (raw)
In-Reply-To: <20170417091105.27180-1-gqjiang@suse.com>

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@suse.com>
> ---
>  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
> 

      parent reply	other threads:[~2017-04-20 16:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-17  9:11 [PATCH] md/raid10: wait up frozen array in handle_write_completed Guoqing Jiang
2017-04-17 23:04 ` NeilBrown
2017-04-20 16:55 ` Shaohua Li [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170420165531.b46ibngthgcrn4fi@kernel.org \
    --to=shli@kernel.org \
    --cc=gqjiang@suse.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).