From: NeilBrown <neilb@suse.de>
To: Adam Kwolek <adam.kwolek@intel.com>
Cc: linux-raid@vger.kernel.org, ed.ciechanowski@intel.com,
marcin.labun@intel.com, dan.j.williams@intel.com
Subject: Re: [PATCH 1/3] imsm: FIX: Chunk size migration is not possible
Date: Thu, 15 Dec 2011 15:01:59 +1100 [thread overview]
Message-ID: <20111215150159.44f8e1c9@notabene.brown> (raw)
In-Reply-To: <20111214150704.21483.66299.stgit@gklab-128-013.igk.intel.com>
[-- Attachment #1: Type: text/plain, Size: 2981 bytes --]
On Wed, 14 Dec 2011 16:07:05 +0100 Adam Kwolek <adam.kwolek@intel.com> wrote:
> Chunk size only migration for raid0 and raid5 is not possible.
> (mdadm UT 15* fails). Mdadm exits with information:
> mdadm: imsm unknown layout 0xffffffff for this raid level 0
>
> Problem was introduced in patch (2011-11-16):
> imsm: platform capabilities are not validated during level migration
>
> During chunk size migration layout variable is not set correctly.
> Set it correctly for this migration type.
>
> Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Applied, thanks.
NeilBrown
> ---
>
> super-intel.c | 19 ++++++++++++-------
> 1 files changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/super-intel.c b/super-intel.c
> index 3a34f5a..e1073ef 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -9050,8 +9050,10 @@ enum imsm_reshape_type imsm_analyze_change(struct supertype *st,
> int change = -1;
> int check_devs = 0;
> int chunk;
> - int devNumChange=0;
> - int layout = -1;
> + /* number of added/removed disks in operation result */
> + int devNumChange = 0;
> + /* imsm compatible layout value for array geometry verification */
> + int imsm_layout = -1;
>
> getinfo_super_imsm_volume(st, &info, NULL);
> if ((geo->level != info.array.level) &&
> @@ -9069,14 +9071,14 @@ enum imsm_reshape_type imsm_analyze_change(struct supertype *st,
> change = -1;
> goto analyse_change_exit;
> }
> - layout = geo->layout;
> + imsm_layout = geo->layout;
> check_devs = 1;
> devNumChange = 1; /* parity disk added */
> } else if (geo->level == 10) {
> change = CH_TAKEOVER;
> check_devs = 1;
> devNumChange = 2; /* two mirrors added */
> - layout = 0x102; /* imsm supported layout */
> + imsm_layout = 0x102; /* imsm supported layout */
> }
> break;
> case 1:
> @@ -9085,7 +9087,7 @@ enum imsm_reshape_type imsm_analyze_change(struct supertype *st,
> change = CH_TAKEOVER;
> check_devs = 1;
> devNumChange = -(geo->raid_disks/2);
> - layout = 0; /* imsm raid0 layout */
> + imsm_layout = 0; /* imsm raid0 layout */
> }
> break;
> }
> @@ -9120,8 +9122,11 @@ enum imsm_reshape_type imsm_analyze_change(struct supertype *st,
> change = -1;
> goto analyse_change_exit;
> }
> - } else
> + } else {
> geo->layout = info.array.layout;
> + if (imsm_layout == -1)
> + imsm_layout = info.array.layout;
> + }
>
> if ((geo->chunksize > 0) && (geo->chunksize != UnSet)
> && (geo->chunksize != info.array.chunk_size))
> @@ -9132,7 +9137,7 @@ enum imsm_reshape_type imsm_analyze_change(struct supertype *st,
> chunk = geo->chunksize / 1024;
> if (!validate_geometry_imsm(st,
> geo->level,
> - layout,
> + imsm_layout,
> geo->raid_disks + devNumChange,
> &chunk,
> geo->size,
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2011-12-15 4:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-14 15:06 [PATCH 0/3] Enable mdadm UT execution for imsm Adam Kwolek
2011-12-14 15:07 ` [PATCH 1/3] imsm: FIX: Chunk size migration is not possible Adam Kwolek
2011-12-15 4:01 ` NeilBrown [this message]
2011-12-14 15:07 ` [PATCH 2/3] imsm: FIX: 'UT 09imsm-assemble' fails Adam Kwolek
2011-12-14 16:27 ` Peter W. Morreale
2011-12-15 4:01 ` NeilBrown
2011-12-15 10:28 ` Kwolek, Adam
2011-12-15 11:07 ` NeilBrown
2011-12-15 15:29 ` Kwolek, Adam
2011-12-15 19:30 ` NeilBrown
2011-12-14 15:07 ` [PATCH 3/3] imsm: FIX: UT '08imsm-overlap' fails Adam Kwolek
2011-12-14 18:21 ` Williams, Dan J
2011-12-15 4:03 ` NeilBrown
[not found] ` <CABE8wwvfzxM1e2S7XOotMHWT40JF6sbRH3mW688dpuWmwoCtZQ@mail.gmail.com>
2011-12-15 8:01 ` Kwolek, Adam
2011-12-16 4:18 ` Williams, Dan J
2011-12-16 8:32 ` Kwolek, Adam
2011-12-19 23:38 ` NeilBrown
2011-12-20 8:02 ` Kwolek, Adam
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=20111215150159.44f8e1c9@notabene.brown \
--to=neilb@suse.de \
--cc=adam.kwolek@intel.com \
--cc=dan.j.williams@intel.com \
--cc=ed.ciechanowski@intel.com \
--cc=linux-raid@vger.kernel.org \
--cc=marcin.labun@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).