summaryrefslogtreecommitdiff
path: root/Assemble.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2010-11-18 10:22:01 +0100
committerNeilBrown <neilb@suse.de>2010-11-23 15:10:01 +1100
commitdcc4210f58ac500701d50a5fc32869eeae3df4ea (patch)
tree306bbc4161fe7f48c6605a8781ce8660c5d41ec7 /Assemble.c
parent4411fb174984d4ce01f5e28d638bc376a4b581fc (diff)
Assemble: fix assembly in the delta_disks > max_degraded case
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>
Diffstat (limited to 'Assemble.c')
-rw-r--r--Assemble.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Assemble.c b/Assemble.c
index 607f2afc..a152d656 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -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