[PATCH] imsm: FIX: size have to be calculated based on first map

[PATCH] imsm: FIX: size have to be calculated based on first map

am 01.02.2011 15:24:54 von adam.kwolek

Before reshape finalization migration is still present in metadata.
After patch 'imsm: FIX: crash during getting map'
function get_imsm_map() returns correct value,
this means in our case from second (start) map.

We should calculate map size basing on first (final) map.
For this we should request it by setting second function parameter to '0'

Signed-off-by: Adam Kwolek
---

super-intel.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/super-intel.c b/super-intel.c
index c70d44b..4565d80 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -5188,7 +5188,7 @@ static int imsm_set_array_state(struct active_array *a, int consistent)
int used_disks;
struct mdinfo *mdi;

- used_disks = imsm_num_data_members(dev, -1);
+ used_disks = imsm_num_data_members(dev, 0);
if (used_disks > 0) {
array_blocks =
map->blocks_per_member *

--
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] imsm: FIX: size have to be calculated based on firstmap

am 03.02.2011 08:26:11 von NeilBrown

On Tue, 01 Feb 2011 15:24:54 +0100 Adam Kwolek wrote:

> Before reshape finalization migration is still present in metadata.
> After patch 'imsm: FIX: crash during getting map'
> function get_imsm_map() returns correct value,
> this means in our case from second (start) map.
>
> We should calculate map size basing on first (final) map.
> For this we should request it by setting second function parameter to '0'
>
> Signed-off-by: Adam Kwolek
> ---
>
> super-intel.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/super-intel.c b/super-intel.c
> index c70d44b..4565d80 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -5188,7 +5188,7 @@ static int imsm_set_array_state(struct active_array *a, int consistent)
> int used_disks;
> struct mdinfo *mdi;
>
> - used_disks = imsm_num_data_members(dev, -1);
> + used_disks = imsm_num_data_members(dev, 0);
> if (used_disks > 0) {
> array_blocks =
> map->blocks_per_member *


Applied, thanks.

NeilBrown
--
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