2023-06-28 08:42:40

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH v3] block: add check that partition length needs to be aligned with block size

On Wed, Jun 28, 2023 at 01:09:41PM +0000, Min Li wrote:
> + long long blksz = bdev_logical_block_size(bdev), start, length;

long long for the blocksize is a bit weird here, as the value is
an unsigned int.

Also while pre-existing the long long for start/length looks weird,
do we need to check for negative values somewhere?

Also don't forget the Cc stable that Greg requested.



2023-06-28 09:31:59

by Min Li

[permalink] [raw]
Subject: Re: [PATCH v3] block: add check that partition length needs to be aligned with block size

I will modify the blksz to unsigned int.
For pre-existing start/length, is it ok to change them to sector_t?

Thanks for your reply

Min Li