From: NeilBrown <neilb@suse.de>
To: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
Cc: linux-raid@vger.kernel.org, dan.j.williams@intel.com,
marcin.labun@intel.com, ed.ciechanowski@intel.com
Subject: Re: [PATCH] imsm: always use set_migr_type to set type of migration
Date: Thu, 6 Oct 2011 14:54:27 +1100 [thread overview]
Message-ID: <20111006145427.19017f19@notabene.brown> (raw)
In-Reply-To: <20111005095949.28631.81041.stgit@gklab-128-081.igk.intel.com>
[-- Attachment #1: Type: text/plain, Size: 2517 bytes --]
On Wed, 05 Oct 2011 11:59:50 +0200 Przemyslaw Czarnowski
<przemyslaw.hawrylewicz.czarnowski@intel.com> wrote:
> For 'resync' besides the update of migration type (imsm_vol.migr_type
> structure) additionally status (imsm_dev.status) flag is set to
> DEV_VERIFY_AND_FIX. In order to clean up after migration, status flag
> must be cleared. For this reason, migration type shouldn't be set
> directly but via set_migr_type(). Otherwise status does not reflect
> the state of array.
>
> Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
> ---
> super-intel.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/super-intel.c b/super-intel.c
> index 3185e91..216ec21 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -3112,7 +3112,7 @@ static void end_migration(struct imsm_dev *dev, __u8 map_state)
> }
>
> dev->vol.migr_state = 0;
> - dev->vol.migr_type = 0;
> + set_migr_type(dev, 0);
> dev->vol.curr_migr_unit = 0;
> map->map_state = map_state;
> }
> @@ -6124,7 +6124,7 @@ static void imsm_progress_container_reshape(struct intel_super *super)
> map->num_members = prev_disks;
> dev->vol.migr_state = 1;
> dev->vol.curr_migr_unit = 0;
> - dev->vol.migr_type = MIGR_GEN_MIGR;
> + set_migr_type(dev, MIGR_GEN_MIGR);
> for (i = prev_num_members;
> i < map->num_members; i++)
> set_imsm_ord_tbl_ent(map, i, i);
> @@ -6174,7 +6174,7 @@ static int imsm_set_array_state(struct active_array *a, int consistent)
> if (0) {
> struct imsm_map *map2 = get_imsm_map(dev, 1);
> dev->vol.migr_state = 0;
> - dev->vol.migr_type = 0;
> + set_migr_type(dev, 0);
> dev->vol.curr_migr_unit = 0;
> memcpy(map, map2, sizeof_imsm_map(map2));
> super->updates_pending++;
> @@ -7053,7 +7053,7 @@ static int apply_reshape_container_disks_update(struct imsm_update_reshape *u,
> devices_to_reshape--;
> newdev->vol.migr_state = 1;
> newdev->vol.curr_migr_unit = 0;
> - newdev->vol.migr_type = MIGR_GEN_MIGR;
> + set_migr_type(newdev, MIGR_GEN_MIGR);
> newmap->num_members = u->new_raid_disks;
> for (i = 0; i < delta_disks; i++) {
> set_imsm_ord_tbl_ent(newmap,
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Applied, thanks.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
prev parent reply other threads:[~2011-10-06 3:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-05 9:59 [PATCH] imsm: always use set_migr_type to set type of migration Przemyslaw Czarnowski
2011-10-06 3:54 ` 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=20111006145427.19017f19@notabene.brown \
--to=neilb@suse.de \
--cc=dan.j.williams@intel.com \
--cc=ed.ciechanowski@intel.com \
--cc=linux-raid@vger.kernel.org \
--cc=marcin.labun@intel.com \
--cc=przemyslaw.hawrylewicz.czarnowski@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).