From: NeilBrown Date: Tue, 17 Nov 2009 01:31:10 +0000 (+1100) Subject: Assemble/super0: allow non-in-sync devices to be assembled without complaint. X-Git-Tag: mdadm-3.1.1~11 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fmdadm.git;a=commitdiff_plain;h=672ca1b7272c69ea3055aeb746a77b8408e5f3ed Assemble/super0: allow non-in-sync devices to be assembled without complaint. Other metadata formats already did not worry about whether 'sync' was missing or not. super0 needs that now, but only for 0.91 metadata that is undergoing reshape. Signed-off-by: NeilBrown --- diff --git a/super0.c b/super0.c index 69fb4606..9f78b945 100644 --- a/super0.c +++ b/super0.c @@ -478,7 +478,14 @@ static int update_super0(struct supertype *st, struct mdinfo *info, if (strcmp(update, "assemble")==0) { int d = info->disk.number; int wonly = sb->disks[d].state & (1<disks[d].state & ~(1<minor_version >= 91) + /* During reshape we don't insist on everything + * being marked 'sync' + */ + add = (1<disks[d].state & ~mask) | add) != info->disk.state) { sb->disks[d].state = info->disk.state | wonly; rv = 1;