Linux RAID subsystem development
 help / color / mirror / Atom feed
From: Shaohua Li <shli@kernel.org>
To: Lidong Zhong <lzhong@suse.com>
Cc: jes.sorensen@gmail.com, linux-raid@vger.kernel.org
Subject: Re: [PATCH] md: change the initialization value for a spare device spot to MD_DISK_ROLE_SPARE
Date: Thu, 15 Jun 2017 10:02:57 -0700	[thread overview]
Message-ID: <20170615170257.mvipqfor2t3rdxlg@kernel.org> (raw)
In-Reply-To: <6e1c6747-f063-a99e-8358-9b994e2e8be2@suse.com>

On Wed, Jun 14, 2017 at 11:16:43AM +0800, Lidong Zhong wrote:
> 
> 
> On 06/14/2017 01:17 AM, Shaohua Li wrote:
> > On Mon, Jun 12, 2017 at 10:45:55AM +0800, Lidong Zhong wrote:
> > > The value for spare spot of sb->dev_roles is changed from
> > > MD_DISK_ROLE_FAULTY to MD_DISK_ROLE_SPARE to keep align
> > > with the value when the superblock is firstly created in
> > > userspace.
> > 
> > Could you point out where mdadm does this?
> > 
> Hi Shaohua,
> 
> It's done in init_super1() during initialization.
> 1615memset(sb->dev_roles,0xff,
> 
> 
> 1616            MAX_SB_SIZE - sizeof(struct mdp_superblock_1));
> 
> > I'm wondering what's the impact here. If there is a disk, we will set correct
> > role at the end of super_1_sync(), otherwise faulty sounds more reasonable.
> > 
> 
> Actually there is no impact if it works fine. I found the value for
> spare slot in sb->dev_roles is changed while debugging a problem.
> That's the reason I submit this patch.

ok, let's make it consistent, applied

      reply	other threads:[~2017-06-15 17:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-12  2:45 [PATCH] md: change the initialization value for a spare device spot to MD_DISK_ROLE_SPARE Lidong Zhong
2017-06-13 17:17 ` Shaohua Li
2017-06-14  3:16   ` Lidong Zhong
2017-06-15 17:02     ` 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=20170615170257.mvipqfor2t3rdxlg@kernel.org \
    --to=shli@kernel.org \
    --cc=jes.sorensen@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=lzhong@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