]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Assemble: fix assembly in the delta_disks > max_degraded case
authorDan Williams <dan.j.williams@intel.com>
Thu, 18 Nov 2010 09:22:01 +0000 (10:22 +0100)
committerNeilBrown <neilb@suse.de>
Tue, 23 Nov 2010 04:10:01 +0000 (15:10 +1100)
Incremental assembly works on such an array because the kernel sees the
disk as in-sync and that the array is reshaping.  Teach Assemble() the
same assumptions.

This is only needed on kernels that do not initialize ->recovery_offset
when activating spares for reshape.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Assemble.c

index 607f2afc0a89ea3503cc740d75519c4f4caa1d1f..a152d656d8049d96c5497b6ee5176b2507cbbbc5 100644 (file)
@@ -868,7 +868,9 @@ int Assemble(struct supertype *st, char *mddev,
                    devices[most_recent].i.events) {
                        devices[j].uptodate = 1;
                        if (i < content->array.raid_disks) {
-                               if (devices[j].i.recovery_start == MaxSector) {
+                               if (devices[j].i.recovery_start == MaxSector ||
+                                   (content->reshape_active &&
+                                    j >= content->array.raid_disks - content->delta_disks)) {
                                        okcnt++;
                                        avail[i]=1;
                                } else