[PATCH 0/1] IMSM do not assume prev + current map in same state means reshape

[PATCH 0/1] IMSM do not assume prev + current map in same state means reshape

am 17.10.2011 22:40:14 von Jes.Sorensen

From: Jes Sorensen

Hi,

I believe there is a bug in the current IMSM code. It makes the
assumption that if the state of the previous map and the current map
are the same, it means we are trying to reshape the array. However if
you have a large array and just installed on it, and it was still
resyncing when you rebooted, it will come up in the same state and
'mdadm -Aa' will fail with an error that it is lacking a resync file.

This is what prevents an update Fedora 15 system from booting, such as
https://bugzilla.redhat.com/show_bug.cgi?id=736387

If I am missing something here, I'd appreciate to hear about it.

Thanks,
Jes

Jes Sorensen (1):
IMSM only run reshape if number of disks has changed

super-intel.c | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)

--
1.7.6.4

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 1/1] IMSM only run reshape if number of disks has changed

am 17.10.2011 22:40:15 von Jes.Sorensen

From: Jes Sorensen

The IMSM code incorrectly made the assumption that reshape also meant
resync, and used 1 to indicate resync and 2 to indicate a reshape.

Signed-off-by: Jes Sorensen
---
super-intel.c | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/super-intel.c b/super-intel.c
index 62ccd15..426721d 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -1766,18 +1766,14 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info,
info->custom_array_size = __le32_to_cpu(dev->size_high);
info->custom_array_size <<= 32;
info->custom_array_size |= __le32_to_cpu(dev->size_low);
- if (prev_map && map->map_state == prev_map->map_state) {
+ info->delta_disks = 0;
+ if (prev_map)
+ info->delta_disks = map->num_members - prev_map->num_members;
+ if (info->delta_disks) {
info->reshape_active = 1;
info->new_level = get_imsm_raid_level(map);
info->new_layout = imsm_level_to_layout(info->new_level);
info->new_chunk = __le16_to_cpu(map->blocks_per_strip) << 9;
- info->delta_disks = map->num_members - prev_map->num_members;
- if (info->delta_disks) {
- /* this needs to be applied to every array
- * in the container.
- */
- info->reshape_active = 2;
- }
/* We shape information that we give to md might have to be
* modify to cope with md's requirement for reshaping arrays.
* For example, when reshaping a RAID0, md requires it to be
@@ -1812,7 +1808,6 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info,
info->new_level = UnSet;
info->new_layout = UnSet;
info->new_chunk = info->array.chunk_size;
- info->delta_disks = 0;
}
info->disk.major = 0;
info->disk.minor = 0;
--
1.7.6.4

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

RE: [PATCH 0/1] IMSM do not assume prev + current map in same statemeans reshape

am 18.10.2011 09:09:32 von adam.kwolek

Re: [PATCH 0/1] IMSM do not assume prev + current map in same statemeans reshape

am 18.10.2011 09:36:24 von Jes.Sorensen