Linux RAID subsystem development
 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: Limit migration record operation by disk slot not by index
Date: Mon, 12 Dec 2011 16:17:05 +1100	[thread overview]
Message-ID: <20111212161705.1a13cdbc@notabene.brown> (raw)
In-Reply-To: <20111208084655.7455.66462.stgit@gklab-128-013.igk.intel.com>

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

On Thu, 08 Dec 2011 09:46:56 +0100 Adam Kwolek <adam.kwolek@intel.com> wrote:

> imsm should store migration record in to 2 first disks in array.
> This should be evaluated based on disk slots, not on disks index.
> It is not guaranteed that indexes are equal to slots.
> 
> Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
> ---
...

> @@ -2200,11 +2245,37 @@ static int write_imsm_migr_rec(struct supertype *st)
>  	struct dl *sd;
>  	int len;
>  	struct imsm_update_general_migration_checkpoint *u;
> +	struct imsm_dev *dev;
> +	struct imsm_map *map = NULL;
> +
> +	/* find map under migration */
> +	dev = imsm_get_device_during_migration(super);
> +	/* if no migration, write buffer anyway to clear migr_record
> +	 * on disk based on first available device
> +	*/
> +	if (dev == NULL) {
> +		int vol;
> +
> +		if (super->current_vol >= 0)
> +			vol = super->current_vol;
> +		else
> +			vol = 0;
> +		dev = get_imsm_dev(super, super->current_vol);
> +	}

'vol' is unused here.  Should it be:
                dev = get_imsm_dev(super, vol);
??

NeilBrown



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

  reply	other threads:[~2011-12-12  5:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-08  8:46 [PATCH] imsm: FIX: Limit migration record operation by disk slot not by index Adam Kwolek
2011-12-12  5:17 ` NeilBrown [this message]
2011-12-12  8:14   ` 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=20111212161705.1a13cdbc@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