Re: [PATCHv4 7/7] block: protect read_ahead_kb using q->limits_lock

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

 




On 2/25/25 8:44 PM, Christoph Hellwig wrote:
> On Tue, Feb 25, 2025 at 07:00:42PM +0530, Nilay Shroff wrote:
>> The bdi->ra_pages could be updated under q->limits_lock because it's
>> usually calculated from the queue limits by queue_limits_commit_update.
>> So protect reading/writing the sysfs attribute read_ahead_kb using
>> q->limits_lock instead of q->sysfs_lock.
> 
> Please add a comment near limits_lock that mentions that the lock
> protects the limits and read_ahead_kb field.  I should have probably
> done the former myself when adding it, but now that it also protects
> a non-obvious field we really need it.
> 
Okay this will be addressed in the next patchset.

Thanks,
--Nilay




[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