From: Dan Williams Date: Thu, 10 Dec 2009 22:03:34 +0000 (-0700) Subject: imsm: fix spare promotion X-Git-Tag: mdadm-3.1.2~64^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ac6449bee9b40b0e8131005dc0cbe2d91a070ae2;p=thirdparty%2Fmdadm.git imsm: fix spare promotion When associating a spare take on the target's metadata version number to satisfy future compare_super checks. Signed-off-by: Dan Williams --- diff --git a/super-intel.c b/super-intel.c index 4372ab4f..39a29857 100644 --- a/super-intel.c +++ b/super-intel.c @@ -1566,6 +1566,7 @@ static int compare_super_imsm(struct supertype *st, struct supertype *tst) first->anchor->num_raid_devs = sec->anchor->num_raid_devs; first->anchor->orig_family_num = sec->anchor->orig_family_num; first->anchor->family_num = sec->anchor->family_num; + memcpy(first->anchor->sig, sec->anchor->sig, MAX_SIGNATURE_LENGTH); for (i = 0; i < sec->anchor->num_raid_devs; i++) imsm_copy_dev(get_imsm_dev(first, i), get_imsm_dev(sec, i)); }