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, ed.ciechanowski@intel.com,
	maciej.patelczyk@intel.com
Subject: Re: [PATCH] fix: imsm: do not accept too small sizes
Date: Thu, 20 Sep 2012 12:31:44 +1000	[thread overview]
Message-ID: <20120920123144.26ea1089@notabene.brown> (raw)
In-Reply-To: <20120914142030.19105.28984.stgit@gklab-128-085.igk.intel.com>

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

On Fri, 14 Sep 2012 16:20:31 +0200 Lukasz Dorau <lukasz.dorau@intel.com>
wrote:

> Inappriopriate error messages (e.g. mdadm: platform does not support
> raid5 with 0 disk) have been displayed when too small size was given.
> This patch fixes it.
> 
> Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
> ---
>  super-intel.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/super-intel.c b/super-intel.c
> index 1d36613..107550f 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -9744,6 +9744,13 @@ enum imsm_reshape_type imsm_analyze_change(struct supertype *st,
>  				    get_imsm_raid_level(dev->vol.map),
>  				    chunk * 1024,
>  				    geo->size * 2);
> +		if (geo->size == 0) {
> +			pr_err("Error. Size expansion is " \
> +				   "supported only (current size is %llu, " \
> +				   "requested size /rounded/ is 0).\n",
> +				   current_size);
> +			goto analyse_change_exit;
> +		}
>  	}
>  
>  	if ((current_size != geo->size) && (geo->size > 0)) {

Applied, thanks.

NeilBrown

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

      reply	other threads:[~2012-09-20  2:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14 14:20 [PATCH] fix: imsm: do not accept too small sizes Lukasz Dorau
2012-09-20  2:31 ` 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=20120920123144.26ea1089@notabene.brown \
    --to=neilb@suse.de \
    --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).