linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Lukasz Dorau <lukasz.dorau@intel.com>
Cc: linux-raid@vger.kernel.org, maciej.patelczyk@intel.com,
	ed.ciechanowski@intel.com, Jacek.Danecki@intel.com
Subject: Re: [PATCH] Grow.c: change size to be unsigned and use '0' in case of 'no change'
Date: Mon, 13 Aug 2012 08:07:23 +1000	[thread overview]
Message-ID: <20120813080723.4de82932@notabene.brown> (raw)
In-Reply-To: <20120810140634.13510.1639.stgit@gklab-128-085.igk.intel.com>

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

On Fri, 10 Aug 2012 16:06:34 +0200 Lukasz Dorau <lukasz.dorau@intel.com>
wrote:

> The 'size' has been changed to be unsigned recently.
> Analogous changes should be made to reshape_super().
> '0' should be used in case of 'no change' now.
> 
> Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
> ---
>  Grow.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/Grow.c b/Grow.c
> index d13b7f3..f1ce284 100644
> --- a/Grow.c
> +++ b/Grow.c
> @@ -639,8 +639,8 @@ static void wait_reshape(struct mdinfo *sra)
>  	close(fd);
>  }
>  
> -static int reshape_super(struct supertype *st, long long size, int level,
> -			 int layout, int chunksize, int raid_disks,
> +static int reshape_super(struct supertype *st, unsigned long long size,
> +			 int level, int layout, int chunksize, int raid_disks,
>  			 int delta_disks, char *backup_file, char *dev,
>  			 int direction, int verbose)
>  {
> @@ -1987,7 +1987,7 @@ size_change_error:
>  		/* Impose these changes on a single array.  First
>  		 * check that the metadata is OK with the change. */
>  
> -		if (reshape_super(st, -1, info.new_level,
> +		if (reshape_super(st, 0, info.new_level,
>  				  info.new_layout, info.new_chunk,
>  				  info.array.raid_disks, info.delta_disks,
>  				  c->backup_file, devname, APPLY_METADATA_CHANGES,
> @@ -2672,10 +2672,10 @@ int reshape_container(char *container, char *devname,
>  	int last_devnum = -1;
>  
>  	/* component_size is not meaningful for a container,
> -	 * so pass '-1' meaning 'no change'
> +	 * so pass '0' meaning 'no change'
>  	 */
>  	if (!restart &&
> -	    reshape_super(st, -1, info->new_level,
> +	    reshape_super(st, 0, info->new_level,
>  			  info->new_layout, info->new_chunk,
>  			  info->array.raid_disks, info->delta_disks,
>  			  backup_file, devname, APPLY_METADATA_CHANGES,


Applied - thanks (and sorry for the delay).

NeilBrown

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

      reply	other threads:[~2012-08-12 22:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-10 14:06 [PATCH] Grow.c: change size to be unsigned and use '0' in case of 'no change' Lukasz Dorau
2012-08-12 22:07 ` NeilBrown [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=20120813080723.4de82932@notabene.brown \
    --to=neilb@suse.de \
    --cc=Jacek.Danecki@intel.com \
    --cc=ed.ciechanowski@intel.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=lukasz.dorau@intel.com \
    --cc=maciej.patelczyk@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 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).