From: Dan Williams Date: Tue, 12 Aug 2008 09:25:49 +0000 (-0700) Subject: imsm: fix create by mdmon-update X-Git-Tag: mdadm-3.0-devel1~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a3e913ee97f23c3a2d0ac9b341ab4e26058f73a;p=thirdparty%2Fmdadm.git imsm: fix create by mdmon-update imsm_dev dynamically grows, so dev_idx needs to be moved up in the definition to avoid getting clobbered. Signed-off-by: Dan Williams --- diff --git a/super-intel.c b/super-intel.c index 2d1fc910..a66d0a3d 100644 --- a/super-intel.c +++ b/super-intel.c @@ -195,8 +195,8 @@ struct imsm_update_activate_spare { struct imsm_update_create_array { enum imsm_update_type type; - struct imsm_dev dev; int dev_idx; + struct imsm_dev dev; }; static int imsm_env_devname_as_serial(void) @@ -2652,8 +2652,8 @@ static void imsm_process_update(struct supertype *st, /* check update is next in sequence */ if (u->dev_idx != mpb->num_raid_devs) { - dprintf("%s: can not create arrays out of sequence\n", - __func__); + dprintf("%s: can not create array %d expected index %d\n", + __func__, u->dev_idx, mpb->num_raid_devs); return; }