All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] imsm: FIX: size have to be calculated based on first map
@ 2011-02-01 14:24 Adam Kwolek
  2011-02-03  7:26 ` NeilBrown
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Kwolek @ 2011-02-01 14:24 UTC (permalink / raw)
  To: neilb; +Cc: linux-raid, dan.j.williams, ed.ciechanowski, wojciech.neubauer

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 <adam.kwolek@intel.com>
---

 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 *


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] imsm: FIX: size have to be calculated based on first map
  2011-02-01 14:24 [PATCH] imsm: FIX: size have to be calculated based on first map Adam Kwolek
@ 2011-02-03  7:26 ` NeilBrown
  0 siblings, 0 replies; 2+ messages in thread
From: NeilBrown @ 2011-02-03  7:26 UTC (permalink / raw)
  To: Adam Kwolek
  Cc: linux-raid, dan.j.williams, ed.ciechanowski, wojciech.neubauer

On Tue, 01 Feb 2011 15:24:54 +0100 Adam Kwolek <adam.kwolek@intel.com> 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 <adam.kwolek@intel.com>
> ---
> 
>  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-03  7:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-01 14:24 [PATCH] imsm: FIX: size have to be calculated based on first map Adam Kwolek
2011-02-03  7:26 ` NeilBrown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.