Re: [PATCH] block: make maximum zone append size configurable

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

 



On 2020/10/07 14:50, Christoph Hellwig wrote:
>> diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
>> index 7dda709f3ccb..78817d7acb66 100644
>> --- a/block/blk-sysfs.c
>> +++ b/block/blk-sysfs.c
>> @@ -246,6 +246,11 @@ queue_max_sectors_store(struct request_queue *q, const char
>> *page, size_t count)
>>         spin_lock_irq(&q->queue_lock);
>>         q->limits.max_sectors = max_sectors_kb << 1;
>>         q->backing_dev_info->io_pages = max_sectors_kb >> (PAGE_SHIFT - 10);
>> +
>> +       q->limits.max_zone_append_sectors =
>> +               min(q->limits.max_sectors,
>> +                   q->limits.max_hw_zone_append_sectors);
>> +
>>         spin_unlock_irq(&q->queue_lock);
>>
>>         return ret;
> 
> Yes, this looks pretty sensible.  I'm not even sure we need the field,
> just do the min where we build the bio instead of introducing another
> field that needs to be maintained.

Indeed, that would be even simpler. But that would also mean repeating that min
call for every user. So may be we should just add a simple helper
queue_get_max_zone_append_sectors() ?



-- 
Damien Le Moal
Western Digital Research




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux