linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: "Czarnowska, Anna" <anna.czarnowska@intel.com>
Cc: "linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
	"Williams, Dan J" <dan.j.williams@intel.com>,
	"Ciechanowski, Ed" <ed.ciechanowski@intel.com>,
	"Kwolek, Adam" <adam.kwolek@intel.com>,
	"Neubauer, Wojciech" <Wojciech.Neubauer@intel.com>
Subject: Re: [PATCH] fix: array is reassembled inactive if stopped during resync
Date: Tue, 8 Feb 2011 11:46:38 +1100	[thread overview]
Message-ID: <20110208114638.46bb9f56@notabene.brown> (raw)
In-Reply-To: <A9DE54D0CD747C4CB06DCE5B6FA2246F010EC8FB8B@irsmsx504.ger.corp.intel.com>

On Thu, 3 Feb 2011 13:40:56 +0000 "Czarnowska, Anna"
<anna.czarnowska@intel.com> wrote:

> >From 085fade553c653f89c2b486b7ec552303a5fb9f1 Mon Sep 17 00:00:00 2001
> From: Anna Czarnowska <anna.czarnowska@intel.com>
> Date: Thu, 3 Feb 2011 14:30:43 +0100
> Subject: [PATCH] fix: array is reassembled inactive if stopped during resync
> Cc: linux-raid@vger.kernel.org, Williams, Dan J <dan.j.williams@intel.com>, Ciechanowski, Ed <ed.ciechanowski@intel.com>
> 
> If initial resync or recovery of a redundant array is not finished
> before it is stopped then during assembly md will start it as inactive.
> Writing readonly to array_state in assemble_container_content
> fails because md thinks the array is during reshape.
> 
> In fact we only have a reshape if both current and previous map
> states are the same. Otherwise we may have resync or recovery.
> Setting reshape_active in such cases causes the issue.
> 
> Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com>
> Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
> ---
>  super-intel.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/super-intel.c b/super-intel.c
> index d049cb7..59356e0 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -1772,7 +1772,8 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info,
>  		__le32_to_cpu(map_to_analyse->blocks_per_member);
>  	memset(info->uuid, 0, sizeof(info->uuid));
>  	info->recovery_start = MaxSector;
> -	info->reshape_active = (prev_map != NULL);
> +	info->reshape_active = (prev_map != NULL) &&
> +			       (map->map_state == prev_map->map_state);
>  	if (info->reshape_active)
>  		info->delta_disks = map->num_members - prev_map->num_members;
>  	else


Applied, thanks.

NeilBrown

      reply	other threads:[~2011-02-08  0:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-03 13:40 [PATCH] fix: array is reassembled inactive if stopped during resync Czarnowska, Anna
2011-02-08  0:46 ` 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=20110208114638.46bb9f56@notabene.brown \
    --to=neilb@suse.de \
    --cc=Wojciech.Neubauer@intel.com \
    --cc=adam.kwolek@intel.com \
    --cc=anna.czarnowska@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=ed.ciechanowski@intel.com \
    --cc=linux-raid@vger.kernel.org \
    /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).