summaryrefslogtreecommitdiffstats
path: root/super-intel.c
diff options
context:
space:
mode:
authorAdam Kwolek <adam.kwolek@intel.com>2011-01-31 09:59:22 +0100
committerNeilBrown <neilb@suse.de>2011-02-01 00:17:06 +0100
commitd098291aec0152a52b4f80d7cb4486b5abe1e0d4 (patch)
tree45349978cc9b454744e9d13e7a4dc90ffcfa01ea /super-intel.c
parentGrow: make sure to break out of the backup loop when finished. (diff)
downloadmdadm-d098291aec0152a52b4f80d7cb4486b5abe1e0d4.tar.xz
mdadm-d098291aec0152a52b4f80d7cb4486b5abe1e0d4.zip
imsm:FIX: change arrays reshape order
Reshape is started from second array, so it causes imsm incompatibility and problems during second array start. Reshape should be started in arrays metadata order. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super-intel.c')
-rw-r--r--super-intel.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/super-intel.c b/super-intel.c
index f578057d..8484df65 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -5848,6 +5848,7 @@ static int apply_reshape_container_disks_update(struct imsm_update_reshape *u,
int devices_to_reshape = 1;
struct imsm_super *mpb = super->anchor;
int ret_val = 0;
+ unsigned int dev_id;
dprintf("imsm: imsm_process_update() for update_reshape\n");
@@ -5877,11 +5878,17 @@ static int apply_reshape_container_disks_update(struct imsm_update_reshape *u,
" mpb->num_raid_devs = %i\n", mpb->num_raid_devs);
/* manage changes in volume
*/
- for (id = super->devlist ; id; id = id->next) {
+ for (dev_id = 0; dev_id < mpb->num_raid_devs; dev_id++) {
void **sp = *space_list;
struct imsm_dev *newdev;
struct imsm_map *newmap, *oldmap;
+ for (id = super->devlist ; id; id = id->next) {
+ if (id->index == dev_id)
+ break;
+ }
+ if (id == NULL)
+ break;
if (!sp)
continue;
*space_list = *sp;