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 2/2] imsm: Do not mark resync during reshape
Date: Mon, 3 Oct 2011 10:31:57 +1100	[thread overview]
Message-ID: <20111003103157.76dc2714@notabene.brown> (raw)
In-Reply-To: <20110929154545.22094.64680.stgit@gklab-128-013.igk.intel.com>

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

On Thu, 29 Sep 2011 17:45:45 +0200 Adam Kwolek <adam.kwolek@intel.com> wrote:

> During reshape, resync/rebuild in the same container is not possible
> due to fact that all arrays in container has to share the same disks set.
> 
> Block new resync/rebuild process initialization and setting resync_start
> to 0 while any reshape in container is active. This avoids breaking
> container reshape and doesn't allow for starting multiple processes
> /resync/rebuild and reshape/ at the same time in md.
> 
> Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
> ---
> 
>  super-intel.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/super-intel.c b/super-intel.c
> index 5504c17..4c546ac 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -2375,8 +2375,9 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info,
>  
>  	info->reshape_progress = 0;
>  	info->resync_start = MaxSector;
> -	if (map_to_analyse->map_state == IMSM_T_STATE_UNINITIALIZED ||
> -	    dev->vol.dirty) {
> +	if ((map_to_analyse->map_state == IMSM_T_STATE_UNINITIALIZED ||
> +	    dev->vol.dirty) &&
> +	    imsm_reshape_blocks_arrays_changes(super) == 0) {
>  		info->resync_start = 0;
>  	}
>  	if (dev->vol.migr_state) {
> @@ -6232,7 +6233,8 @@ static int imsm_set_array_state(struct active_array *a, int consistent)
>  			super->updates_pending++;
>  			a->last_checkpoint = 0;
>  		}
> -	} else if (!is_resyncing(dev) && !failed) {
> +	} else if ((!is_resyncing(dev) && !failed) &&
> +		   (imsm_reshape_blocks_arrays_changes(super) == 0)) {
>  		/* mark the start of the init process if nothing is failed */
>  		dprintf("imsm: mark resync start\n");
>  		if (map->map_state == IMSM_T_STATE_UNINITIALIZED)

Applied.  Thanks,

NeilBrown


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

      reply	other threads:[~2011-10-02 23:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-29 15:45 [PATCH 0/2] Do not allow for resync during reshape Adam Kwolek
2011-09-29 15:45 ` [PATCH 1/2] imsm: FIX: Do not allow for spare disk activation " Adam Kwolek
2011-10-02 23:31   ` NeilBrown
2011-09-29 15:45 ` [PATCH 2/2] imsm: Do not mark resync " Adam Kwolek
2011-10-02 23: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=20111003103157.76dc2714@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).