From 921d9e164fd3f6203d1b0cf2424b793043afd001 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Thu, 4 Feb 2010 12:02:09 +1100 Subject: Assemble: fix --force assembly of v1.x arrays which are recovering. 1.x metadata allows a device to be a member of the array while it is still recoverying. So it is a working member, but is not completely in-sync. mdadm/assemble does not understand this distinction and assumes that a work member is fully in-sync for the purpose of determining if there are enough in-sync devices for the array to be functional. So collect the 'recovery_start' value from the metadata and use it in assemble when determining how useful a given device is. Reported-by: Mikael Abrahamsson Signed-off-by: NeilBrown --- super-intel.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'super-intel.c') diff --git a/super-intel.c b/super-intel.c index 91479a2..bbdcb51 100644 --- a/super-intel.c +++ b/super-intel.c @@ -1452,6 +1452,7 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info) info->data_offset = __le32_to_cpu(map->pba_of_lba0); info->component_size = __le32_to_cpu(map->blocks_per_member); memset(info->uuid, 0, sizeof(info->uuid)); + info->recovery_start = MaxSector; if (map->map_state == IMSM_T_STATE_UNINITIALIZED || dev->vol.dirty) { info->resync_start = 0; @@ -1559,6 +1560,7 @@ static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info) info->disk.number = -1; info->disk.state = 0; info->name[0] = 0; + info->recovery_start = MaxSector; if (super->disks) { __u32 reserved = imsm_reserved_sectors(super, super->disks); -- cgit