linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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] imsm: FIX: Just created redundant array is not in uninitialized state
Date: Tue, 6 Dec 2011 11:56:36 +1100	[thread overview]
Message-ID: <20111206115636.1282d44e@notabene.brown> (raw)
In-Reply-To: <20111205082652.18395.98414.stgit@gklab-128-013.igk.intel.com>

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

On Mon, 05 Dec 2011 09:26:52 +0100 Adam Kwolek <adam.kwolek@intel.com> wrote:

> When redundant array (e.g. raid5) is created metadata shows it is in
> normal state. Initialization process is showed in metadata as rebuild from normal
> to normal state. Redundant array should be initially in uninitialized state
> before it's initialization.
> 
> Add code to put array in uninitialized state upon array creation.
> 
> Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
> ---
> 
>  super-intel.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/super-intel.c b/super-intel.c
> index a0672bf..b8abea0 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -4289,7 +4289,11 @@ static int init_super_imsm_volume(struct supertype *st, mdu_array_info_t *info,
>  	map->blocks_per_member = __cpu_to_le32(info_to_blocks_per_member(info));
>  	map->blocks_per_strip = __cpu_to_le16(info_to_blocks_per_strip(info));
>  	map->failed_disk_num = ~0;
> -	map->map_state = info->failed_disks ? IMSM_T_STATE_DEGRADED : IMSM_T_STATE_NORMAL;
> +	if (info->level > 0)
> +		map->map_state = IMSM_T_STATE_UNINITIALIZED;
> +	else
> +		map->map_state = info->failed_disks ? IMSM_T_STATE_FAILED :
> +						      IMSM_T_STATE_NORMAL;
>  	map->ddf = 1;
>  
>  	if (info->level == 1 && info->raid_disks > 2) {

Applied, thanks.

NeilBrown


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

      reply	other threads:[~2011-12-06  0:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-05  8:26 [PATCH] imsm: FIX: Just created redundant array is not in uninitialized state Adam Kwolek
2011-12-06  0:56 ` 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=20111206115636.1282d44e@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).