Re: [PATCH v2 07/26] block/blk-iocost: Add lock context annotations

Bart Van Assche
2026-04-01T17:02:06Z

On 3/25/26 11:31 PM, Christoph Hellwig wrote:
> and ioc_rqos_throttle does basically totally
> different things based on the same paramter passed as the lock_ioc
> argument to iocg_lock/iocg_unlock.

Hi Christoph,

I looked into splitting ioc_rqos_throttle() into two functions: the
existing code without the code protected by iocg_lock() / iocg_unlock()
and a new function with all the code protected by iocg_lock() and
iocg_unlock(). That new function can tell ioc_rqos_throttle() how to
proceed via its return value. However, the number of parameters of
that new function is large. Almost all local variables declared in
ioc_rqos_throttle() would have to be passed to that new function. Hence,
I prefer not to modify ioc_rqos_throttle().

Thanks,

Bart.