linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
To: Xiao Ni <xni@redhat.com>
Cc: ncroxon@redhat.com, linux-raid@vger.kernel.org
Subject: Re: [PATCH 01/10] mdadm/Grow: Update new level when starting reshape
Date: Mon, 2 Sep 2024 12:10:37 +0200	[thread overview]
Message-ID: <20240902121037.000066e9@linux.intel.com> (raw)
In-Reply-To: <20240902115013.00006343@linux.intel.com>

On Mon, 2 Sep 2024 11:50:13 +0200
Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> wrote:

> Hi Xiao,
> Thanks for patches.
> 
> On Wed, 28 Aug 2024 10:11:41 +0800
> Xiao Ni <xni@redhat.com> wrote:
> 
> > Reshape needs to specify a backup file when it can't update data offset
> > of member disks. For this situation, first, it starts reshape and then
> > it kicks off mdadm-grow-continue service which does backup job and
> > monitors the reshape process. The service is a new process, so it needs
> > to read superblock from member disks to get information.  
> 
> Looks like kernel is fine with reset the same level so I don't see a risk in
> this change for other scenarios but please mention that.
> 

Sorry, I didn't notice that it is new field. We should not update it if it
doesn't exist. Perhaps, we should print message that kernel patch is needed? 

> > 
> > But in the first step, it doesn't update new level in superblock. So
> > it can't change level after reshape finishes, because the new level is
> > not right. So records the new level in the first step.  
> 
> > 
> > Signed-off-by: Xiao Ni <xni@redhat.com>
> > ---
> >  Grow.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/Grow.c b/Grow.c
> > index 5810b128aa99..97e48d86a33f 100644
> > --- a/Grow.c
> > +++ b/Grow.c
> > @@ -2946,6 +2946,9 @@ static int impose_reshape(struct mdinfo *sra,
> >  		if (!err && sysfs_set_num(sra, NULL, "layout",
> >  					  reshape->after.layout) < 0)
> >  			err = errno;
> > +		if (!err && sysfs_set_num(sra, NULL, "new_level",
> > +					info->new_level) < 0)
> > +			err = errno;  
> 
> Please add empty line before and after and please merge if statement to one
> line (we support up to 100).
> 
> 
> >  		if (!err && subarray_set_num(container, sra, "raid_disks",
> >  					     reshape->after.data_disks +
> >  					     reshape->parity) < 0)  
> 
> 
> Thanks,
> Mariusz
> 


  reply	other threads:[~2024-09-02 10:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-28  2:11 [PATCH 00/10] mdadm tests fix Xiao Ni
2024-08-28  2:11 ` [PATCH 01/10] mdadm/Grow: Update new level when starting reshape Xiao Ni
2024-09-02  9:50   ` Mariusz Tkaczyk
2024-09-02 10:10     ` Mariusz Tkaczyk [this message]
2024-09-03  0:34       ` Xiao Ni
2024-09-03  7:34         ` Mariusz Tkaczyk
2024-09-03 10:11           ` Xiao Ni
2024-09-03  0:32     ` Xiao Ni
2024-08-28  2:11 ` [PATCH 02/10] mdadm/Grow: Update reshape_progress to need_back after reshape finishes Xiao Ni
2024-09-02  9:55   ` Mariusz Tkaczyk
2024-08-28  2:11 ` [PATCH 03/10] mdadm/Grow: Can't open raid when running --grow --continue Xiao Ni
2024-09-02 10:00   ` Mariusz Tkaczyk
2024-08-28  2:11 ` [PATCH 04/10] mdadm/Grow: sleep a while after removing disk in impose_level Xiao Ni
     [not found]   ` <20240902121359.00007a84@linux.intel.com>
2024-09-03  0:53     ` Xiao Ni
2024-09-03  7:22       ` Mariusz Tkaczyk
2024-09-11  8:42         ` Xiao Ni
2024-08-28  2:11 ` [PATCH 05/10] mdadm/tests: wait until level changes Xiao Ni
2024-08-28  2:11 ` [PATCH 06/10] mdadm/tests: 07changelevels fix Xiao Ni
2024-08-28  2:11 ` [PATCH 07/10] mdadm/tests: Remove 07reshape5intr.broken Xiao Ni
2024-08-28  2:11 ` [PATCH 08/10] mdadm/tests: 07testreshape5 fix Xiao Ni
2024-08-28  2:11 ` [PATCH 09/10] mdadm/tests: remove 09imsm-assemble.broken Xiao Ni
2024-08-28  2:11 ` [PATCH 10/10] mdadm/Manage: record errno Xiao Ni

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=20240902121037.000066e9@linux.intel.com \
    --to=mariusz.tkaczyk@linux.intel.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=ncroxon@redhat.com \
    --cc=xni@redhat.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).