All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Menzel <pmenzel@molgen.mpg.de>
To: Lukasz Florczak <lukasz.florczak@linux.intel.com>
Cc: linux-raid@vger.kernel.org, jes@trained-monkey.org, colyli@suse.de
Subject: Re: [PATCH] mdadm: Fix array size mismatch after grow
Date: Thu, 7 Apr 2022 12:59:52 +0200	[thread overview]
Message-ID: <2b3c8e52-94fd-3dac-1e92-e28aee5d8b27@molgen.mpg.de> (raw)
In-Reply-To: <20220407070202.50421-1-lukasz.florczak@linux.intel.com>

Dear Lukasz,


Thank you for your patch.

Am 07.04.22 um 09:02 schrieb Lukasz Florczak:
> imsm_fix_size_mismatch() is invoked to fix the problem, but it couldn't proceed due to migration check.
> This patch allows for intended behavior.

Please reflow for 75 characters per line.

> Additionally remove some dead code.

It’d be great if you split this out into a separate commit with a 
comment, why u_size can never be smaller than 1.


Kind regards,

Paul


> Signed-off-by: Lukasz Florczak <lukasz.florczak@linux.intel.com>
> ---
>   super-intel.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/super-intel.c b/super-intel.c
> index d5fad102..be6aec90 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -11757,7 +11757,7 @@ static int imsm_fix_size_mismatch(struct supertype *st, int subarray_index)
>   		unsigned long long d_size = imsm_dev_size(dev);
>   		int u_size;
>   
> -		if (calc_size == d_size || dev->vol.migr_type == MIGR_GEN_MIGR)
> +		if (calc_size == d_size)
>   			continue;
>   
>   		/* There is a difference, confirm that imsm_dev_size is
> @@ -11772,10 +11772,7 @@ static int imsm_fix_size_mismatch(struct supertype *st, int subarray_index)
>   		geo.size = d_size;
>   		u_size = imsm_create_metadata_update_for_size_change(st, &geo,
>   								     &update);
> -		if (u_size < 1) {
> -			dprintf("imsm: Cannot prepare size change update\n");
> -			goto exit;
> -		}
> +
>   		imsm_update_metadata_locally(st, update, u_size);
>   		if (st->update_tail) {
>   			append_metadata_update(st, update, u_size);

      reply	other threads:[~2022-04-07 11:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07  7:02 [PATCH] mdadm: Fix array size mismatch after grow Lukasz Florczak
2022-04-07 10:59 ` Paul Menzel [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=2b3c8e52-94fd-3dac-1e92-e28aee5d8b27@molgen.mpg.de \
    --to=pmenzel@molgen.mpg.de \
    --cc=colyli@suse.de \
    --cc=jes@trained-monkey.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=lukasz.florczak@linux.intel.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.