Linux RAID subsystem development
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Pawel Baldysiak <pawel.baldysiak@intel.com>
Cc: linux-raid@vger.kernel.org, maciej.patelczyk@intel.com,
	lukasz.dorau@intel.com
Subject: Re: [PATCH] imsm: monitor: do not finish migration if there are no failed disks
Date: Mon, 22 Apr 2013 16:21:55 +1000	[thread overview]
Message-ID: <20130422162155.6a832c64@notabene.brown> (raw)
In-Reply-To: <20130418085136.8837.86343.stgit@localhost.localdomain>

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

On Thu, 18 Apr 2013 10:51:37 +0200 Pawel Baldysiak
<pawel.baldysiak@intel.com> wrote:

> From: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
> 
> Transition from "degraded" to "recovery" made in OROM is slightly different
> than the same transision in mdadm. Missing disk is not removed from list of
> raid devices, but just from map. Therefore mdadm should not end migration
> basing on existence of list of missing disks but should rely on count of
> failed disks.
> 
> Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
> Tested-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
> ---
>  super-intel.c |    9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/super-intel.c b/super-intel.c
> index 24016b7..3f15b0f 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -6886,6 +6886,12 @@ static void handle_missing(struct intel_super *super, struct imsm_dev *dev)
>  	if (!super->missing)
>  		return;
>  
> +	/* When orom adds replacement for missing disk it does
> +	 * not remove entry of missing disk, but just updates map with
> +	 * new added disk. So it is not enough just to test if there is
> +	 * any missing disk, we have to look if there are any failed disks
> +	 * in map to stop migration */
> +
>  	dprintf("imsm: mark missing\n");
>  	/* end process for initialization and rebuild only
>  	 */
> @@ -6896,7 +6902,8 @@ static void handle_missing(struct intel_super *super, struct imsm_dev *dev)
>  		failed = imsm_count_failed(super, dev, MAP_0);
>  		map_state = imsm_check_degraded(super, dev, failed, MAP_0);
>  
> -		end_migration(dev, super, map_state);
> +		if (failed)
> +			end_migration(dev, super, map_state);
>  	}
>  	for (dl = super->missing; dl; dl = dl->next)
>  		mark_missing(dev, &dl->disk, dl->index);
> 

applied, thanks.

NeilBrown

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

      parent reply	other threads:[~2013-04-22  6:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-18  8:51 [PATCH] imsm: monitor: do not finish migration if there are no failed disks Pawel Baldysiak
2013-04-18 11:26 ` Dorau, Lukasz
2013-04-22  6:21 ` 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=20130422162155.6a832c64@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=lukasz.dorau@intel.com \
    --cc=maciej.patelczyk@intel.com \
    --cc=pawel.baldysiak@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