Re: [PATCH] super-intel: make freesize not required for chunk size migration

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

 




> 2022年10月20日 12:59,Kinga Tanska <kinga.tanska@xxxxxxxxx> 写道:
> 
> Freesize is not required when chunk size migration is performed. Fix
> return value when superblock is not set.

Hi Kinga,

Could you please provide a bit more information why freesize is unnecessary in this situation?

Thanks.

Coly Li


> 
> Signed-off-by: Kinga Tanska <kinga.tanska@xxxxxxxxx>
> ---
> super-intel.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/super-intel.c b/super-intel.c
> index 4d82af3d..37c59da5 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -7714,11 +7714,11 @@ static int validate_geometry_imsm(struct supertype *st, int level, int layout,
> 		struct intel_super *super = st->sb;
> 
> 		/*
> -		 * Autolayout mode, st->sb and freesize must be set.
> +		 * Autolayout mode, st->sb must be set.
> 		 */
> -		if (!super || !freesize) {
> -			pr_vrb("freesize and superblock must be set for autolayout, aborting\n");
> -			return 1;
> +		if (!super) {
> +			pr_vrb("superblock must be set for autolayout, aborting\n");
> +			return 0;
> 		}
> 
> 		if (!validate_geometry_imsm_orom(st->sb, level, layout,
> @@ -7726,7 +7726,7 @@ static int validate_geometry_imsm(struct supertype *st, int level, int layout,
> 						 verbose))
> 			return 0;
> 
> -		if (super->orom) {
> +		if (super->orom && freesize) {
> 			imsm_status_t rv;
> 			int count = count_volumes(super->hba, super->orom->dpa,
> 					      verbose);
> -- 
> 2.26.2
> 





[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