summaryrefslogtreecommitdiffstats
path: root/super-ddf.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-12-30 13:42:37 +1100
committerNeilBrown <neilb@suse.de>2009-12-30 13:42:37 +1100
commitc1e3ab8c1e76f4ae71ab23bcf5e8c2bf8bd3774e (patch)
tree29f137783fd18fa14d1f96758bba3d15212a7904 /super-ddf.c
parent076515ba5042459c17eb5718483ed09c9e567f5d (diff)
parent1e5c69836d4d0b6dcaef8fc187e6bf2841eb57f6 (diff)
downloadmdadm-c1e3ab8c1e76f4ae71ab23bcf5e8c2bf8bd3774e.tar.gz
mdadm-c1e3ab8c1e76f4ae71ab23bcf5e8c2bf8bd3774e.tar.xz
mdadm-c1e3ab8c1e76f4ae71ab23bcf5e8c2bf8bd3774e.zip
Merge branch 'master' of git://github.com/djbw/mdadm
Diffstat (limited to 'super-ddf.c')
-rw-r--r--super-ddf.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/super-ddf.c b/super-ddf.c
index 1014d81..3e30229 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -1433,7 +1433,7 @@ static void getinfo_super_ddf_bvd(struct supertype *st, struct mdinfo *info)
(ddf->virt->entries[info->container_member].init_state
& DDF_initstate_mask)
== DDF_init_full)
- info->resync_start = ~0ULL;
+ info->resync_start = MaxSector;
uuid_from_super_ddf(st, info->uuid);
@@ -2921,7 +2921,7 @@ static struct mdinfo *container_content_ddf(struct supertype *st)
this->resync_start = 0;
} else {
this->array.state = 1;
- this->resync_start = ~0ULL;
+ this->resync_start = MaxSector;
}
memcpy(this->name, ddf->virt->entries[i].name, 16);
this->name[16]=0;
@@ -2968,6 +2968,7 @@ static struct mdinfo *container_content_ddf(struct supertype *st)
dev->disk.minor = d->minor;
dev->disk.raid_disk = i;
dev->disk.state = (1<<MD_DISK_SYNC)|(1<<MD_DISK_ACTIVE);
+ dev->recovery_start = MaxSector;
dev->events = __be32_to_cpu(ddf->primary.seq);
dev->data_offset = __be64_to_cpu(vc->lba_offset[i]);
@@ -3066,7 +3067,7 @@ static int ddf_set_array_state(struct active_array *a, int consistent)
if (consistent == 2) {
/* Should check if a recovery should be started FIXME */
consistent = 1;
- if (!is_resync_complete(a))
+ if (!is_resync_complete(&a->info))
consistent = 0;
}
if (consistent)
@@ -3078,9 +3079,9 @@ static int ddf_set_array_state(struct active_array *a, int consistent)
old = ddf->virt->entries[inst].init_state;
ddf->virt->entries[inst].init_state &= ~DDF_initstate_mask;
- if (is_resync_complete(a))
+ if (is_resync_complete(&a->info))
ddf->virt->entries[inst].init_state |= DDF_init_full;
- else if (a->resync_start == 0)
+ else if (a->info.resync_start == 0)
ddf->virt->entries[inst].init_state |= DDF_init_not;
else
ddf->virt->entries[inst].init_state |= DDF_init_quick;
@@ -3088,7 +3089,7 @@ static int ddf_set_array_state(struct active_array *a, int consistent)
ddf->updates_pending = 1;
dprintf("ddf mark %d %s %llu\n", inst, consistent?"clean":"dirty",
- a->resync_start);
+ a->info.resync_start);
return consistent;
}
@@ -3547,6 +3548,7 @@ static struct mdinfo *ddf_activate_spare(struct active_array *a,
di->disk.major = dl->major;
di->disk.minor = dl->minor;
di->disk.state = 0;
+ di->recovery_start = 0;
di->data_offset = pos;
di->component_size = a->info.component_size;
di->container_member = dl->pdnum;