Re: [PATCH 31/53] imsm: FIX: Fill delta_disks field in getinfo_super()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 26 Nov 2010 09:07:53 +0100 Adam Kwolek <adam.kwolek@xxxxxxxxx> wrote:

> delta_disks field is not always filled during getinfo_super() call.

delta_disks is only meaningful if reshape_active set set, so you would need
to set that too.  As well as new_layout, new_chunk, and reshape_progress.

Thanks,
NeilBrown


> 
> Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx>
> ---
> 
>  super-intel.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/super-intel.c b/super-intel.c
> index 3243132..3f75550 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -1487,6 +1487,7 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info)
>  	struct intel_super *super = st->sb;
>  	struct imsm_dev *dev = get_imsm_dev(super, super->current_vol);
>  	struct imsm_map *map = get_imsm_map(dev, 0);
> +	struct imsm_map *map2 = get_imsm_map(dev, 1);
>  	struct dl *dl;
>  	char *devname;
>  	int minor;
> @@ -1566,6 +1567,12 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info)
>  	 */
>  	if (find_array_minor2(info->text_version, 1, st->devnum, &minor) == 0)
>  		sprintf(info->sys_name, "md%i", minor);
> +
> +	/* fill delta_disks field
> +	 */
> +	info->delta_disks = 0;
> +	if (map2)
> +		info->delta_disks = map->num_members - map2->num_members;
>  }
>  
>  /* check the config file to see if we can return a real uuid for this spare */

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


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux