Re: [PATCH v2 3/9] null_blk: Align max_hw_sectors to blocksize

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

 



On 2020/11/11 17:07, Christoph Hellwig wrote:
> On Wed, Nov 11, 2020 at 02:16:42PM +0900, Damien Le Moal wrote:
>> null_blk always uses the default BLK_SAFE_MAX_SECTORS value for the
>> max_hw_sectors and max_sectors queue limits resulting in a maximum
>> request size of 127 sectors. When the blocksize setting is larger than
>> the default 512B, this maximum request size is not aligned to the
>> block size. To emulate a real device more accurately, fix this by
>> setting the max_hw_sectors and max_sectors queue limits to a value
>> that is aligned to the block size.
> 
> Shouldn't we fix this in the block layer instead of individual drivers?
> 

Yes, I wondered about that too. Probably a good idea to have that generic but
that will require changing both blk_queue_logical_block_size() and
blk_queue_max_hw_sectors() since drivers may call these in different order.

Jens, thoughts ?

-- 
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