Re: [PATCH] block: Increase BLK_DEF_MAX_SECTORS_CAP

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

 



On 6/18/25 13:59, Christoph Hellwig wrote:
> On Tue, Jun 17, 2025 at 03:34:30PM +0900, Damien Le Moal wrote:
>> Since many block devices can benefit from a larger value of
>> BLK_DEF_MAX_SECTORS_CAP, and in particular HDDs, increase this value to
>> be 4MiB, or 8192 sectors.
>>
>> Suggested-by: Martin K . Petersen <martin.petersen@xxxxxxxxxx>
>> Signed-off-by: Damien Le Moal <dlemoal@xxxxxxxxxx>
>> ---
>>  include/linux/blkdev.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
>> index 85aab8bc96e7..7c35b2462048 100644
>> --- a/include/linux/blkdev.h
>> +++ b/include/linux/blkdev.h
>> @@ -1238,7 +1238,7 @@ enum blk_default_limits {
>>   * Not to be confused with the max_hw_sector limit that is entirely
>>   * controlled by the driver, usually based on hardware limits.
>>   */
>> -#define BLK_DEF_MAX_SECTORS_CAP	2560u
>> +#define BLK_DEF_MAX_SECTORS_CAP	8192u
> 
> While we're at nitpicking, maybe define this as
> 
> 	(SZ_4M >> SECTOR_SHIFT)
> 
> to make it a bit more readable?

Sure thing.

> 
> Otherwise this looks good, the odd number was always rather weird.
> 
> 


-- 
Damien Le Moal
Western Digital Research




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux