All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shaohua Li <shli@kernel.org>
To: NeilBrown <neilb@suse.com>
Cc: Shaohua Li <shli@fb.com>, linux-raid@vger.kernel.org
Subject: Re: [PATCH 3/3] md: separate flags for superblock changes
Date: Thu, 8 Dec 2016 21:16:41 -0800	[thread overview]
Message-ID: <20161209051641.gfo46pcu2g6zuiyo@kernel.org> (raw)
In-Reply-To: <87lgvp1zld.fsf@notabene.neil.brown.name>

On Fri, Dec 09, 2016 at 03:43:58PM +1100, Neil Brown wrote:
> On Fri, Dec 09 2016, Shaohua Li wrote:
> 
> > The mddev->flags are used for different purposes. There are a lot of
> > places we check/change the flags without masking unrelated flags, we
> > could check/change unrelated flags. These usage are most for superblock
> > write, so spearate superblock related flags. This should make the code
> > clearer and also fix real bugs.
> >
> > Signed-off-by: Shaohua Li <shli@fb.com>
> 
> That real bug would be:
> 
> >  		md_wakeup_thread(mddev->thread);
> > -		wait_event(mddev->sb_wait, mddev->flags == 0 ||
> > +		wait_event(mddev->sb_wait, mddev->sb_flags == 0 ||
> >  			   test_bit(MD_RECOVERY_INTR, &mddev->recovery));

Yes, for the reshape hang.

> 
> mddev->flags used to be called mddev->sb_dirty, before
> Commit: 850b2b420cd5 ("[PATCH] md: replace magic numbers in sb_dirty with well defined bit flags")
> 
> Then we added lots of other flags.  Now we are going back to the same
> idea :-)
> 
> Reviewed-by: NeilBrown <neilb@suse.com>
> 
> Thanks,
> NeilBrown



      reply	other threads:[~2016-12-09  5:16 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
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 [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=20161209051641.gfo46pcu2g6zuiyo@kernel.org \
    --to=shli@kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.