On 2/18/25 2:16 PM, Christoph Hellwig wrote: > On Tue, Feb 18, 2025 at 01:58:54PM +0530, Nilay Shroff wrote: >> There're few sysfs attributes in block layer which don't really need >> acquiring q->sysfs_lock while accessing it. The reason being, writing >> a value to such attributes are either atomic or could be easily >> protected using WRITE_ONCE()/READ_ONCE(). Moreover, sysfs attributes >> are inherently protected with sysfs/kernfs internal locking. >> >> So this change help segregate all existing sysfs attributes for which >> we could avoid acquiring q->sysfs_lock. We group all such attributes, >> which don't require any sorts of locking, using macro QUEUE_RO_ENTRY_ >> NOLOCK() or QUEUE_RW_ENTRY_NOLOCK(). The newly introduced show/store >> method (show_nolock/store_nolock) is assigned to attributes using these >> new macros. The show_nolock/store_nolock run without holding q->sysfs_ >> lock. > > Can you add the analys why they don't need sysfs_lock to this commit > message please? Sure will do it in next patchset. > > With that: > > Reviewed-by: Christoph Hellwig <hch@xxxxxx> >