Re: [PATCH 04/14] block: use queue_limits_commit_update in queue_max_sectors_store

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


On Tue, Jan 30, 2024 at 12:14:32PM +0000, John Garry wrote:
> On 28/01/2024 16:58, Christoph Hellwig wrote:
>> Convert queue_max_sectors_store to use queue_limits_commit_update to
>> check and update the max_sectors limit and freeze the queue before
>> doing so to ensure we don't have requests in flight while changing
>> the limits.
>> Note that this removes the previously held queue_lock that doesn't
>> protect against any other reader or writer.
> I don't really get why we specifically locked that code segment in 
> queue_max_sectors_store() previously. Was it to ensure max_sectors and 
> q->disk->bdi->io_pages are always atomically updated?

It's been there basically forever.  Back in the day before blk-mq
and lock splitting it might actually have protected something.

[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux