RE: [PATCH v2] mdadm/grow: adding a test to ensure resize was required

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

 



Hi Jes,

I wonder if it would be a lot of inconvenience for you to push commits on more regular basis (optimally once accepted). We run daily regression tests on upstream mdadm and frequent pushes would allow us to see problems sooner.

Tomek

-----Original Message-----
From: linux-raid-owner@xxxxxxxxxxxxxxx [mailto:linux-raid-owner@xxxxxxxxxxxxxxx] On Behalf Of Jes Sorensen
Sent: Wednesday, October 11, 2017 7:32 PM
To: Zhilong Liu <zlliu@xxxxxxxx>
Cc: linux-raid@xxxxxxxxxxxxxxx
Subject: Re: [PATCH v2] mdadm/grow: adding a test to ensure resize was required

On 10/11/2017 04:53 AM, Zhilong Liu wrote:
> To fix the commit: 4b74a905a67e
> (mdadm/grow: Component size must be larger than chunk size)
> 
> array.level > 1 : against the raids which chunk_size is meaningful.
> s->size > 0 : ensure that changing component size has required.
> array.chunk_size / 1024 > s->size : ensure component size should
> be always >= current chunk_size when requires resize, otherwise,
> mddev->pers->resize would be set mddev->dev_sectors as '0'.
> 
> Reported-by: Tomasz Majchrzak <tomasz.majchrzak@xxxxxxxxx>
> Suggested-by: NeilBrown <neilb@xxxxxxxx>
> Signed-off-by: Zhilong Liu <zlliu@xxxxxxxx>
> ---
> 
> v1: [PATCH 1/3] mdadm/Grow: fix the broken raid level conversion
> 
> changes:
>    correct the test 's->level == UnSet' as 's->size > 0'
> 
>   Grow.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/Grow.c b/Grow.c
> index 4d79d83..8c2d50c 100644
> --- a/Grow.c
> +++ b/Grow.c
> @@ -1810,6 +1810,7 @@ int Grow_reshape(char *devname, int fd,
>   	}
>   
>   	if (array.level > 1 &&
> +	    s->size > 0 &&
>   	   (array.chunk_size / 1024) > (int)s->size) {
>   		pr_err("component size must be larger than chunk size.\n");
>   		return 1;

Applied, however I fixed the broken formatting in the process.

Thanks,
Jes


--
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
��.n��������+%������w��{.n�����{����w��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[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