linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: Shaohua Li <shli@fb.com>, linux-raid@vger.kernel.org
Subject: Re: [PATCH 2/3] md: MD_RECOVERY_NEEDED is set for mddev->recovery
Date: Fri, 09 Dec 2016 15:31:58 +1100	[thread overview]
Message-ID: <87r35h205d.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <8c8e0b996b721fb9747fb7b7d312d59dbba3b4c4.1481240632.git.shli@fb.com>

[-- Attachment #1: Type: text/plain, Size: 989 bytes --]

On Fri, Dec 09 2016, Shaohua Li wrote:

> Signed-off-by: Shaohua Li <shli@fb.com>
> ---
>  drivers/md/md.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 84dc891..5e66648 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -6856,7 +6856,7 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
>  		/* need to ensure recovery thread has run */
>  		wait_event_interruptible_timeout(mddev->sb_wait,
>  						 !test_bit(MD_RECOVERY_NEEDED,
> -							   &mddev->flags),
> +							   &mddev->recovery),
>  						 msecs_to_jiffies(5000));
>  	if (cmd == STOP_ARRAY || cmd == STOP_ARRAY_RO) {
>  		/* Need to flush page cache, and ensure no-one else opens
> -- 
> 2.9.3

That was careless!

It would be good to add

Fixes: 90f5f7ad4f38 ("md: Wait for md_check_recovery before attempting device removal.")

to this.

Reviewed-by: NeilBrown <neilb@suse.com>

Thanks,
NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2016-12-09  4:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-08 23:48 [PATCH 0/3] md: fix mddev->flags issues Shaohua Li
2016-12-08 23:48 ` [PATCH 1/3] md: takeover should clear unrelated bits Shaohua Li
2016-12-09  4:41   ` NeilBrown
2016-12-09  5:15     ` Shaohua Li
2016-12-08 23:48 ` [PATCH 2/3] md: MD_RECOVERY_NEEDED is set for mddev->recovery Shaohua Li
2016-12-09  4:31   ` NeilBrown [this message]
2016-12-08 23:48 ` [PATCH 3/3] md: separate flags for superblock changes Shaohua Li
2016-12-09  4:43   ` NeilBrown
2016-12-09  5:16     ` Shaohua Li

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=87r35h205d.fsf@notabene.neil.brown.name \
    --to=neilb@suse.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=shli@fb.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).