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

Christoph Hellwig
2026-03-26T06:31:33Z

On Wed, Mar 25, 2026 at 02:44:48PM -0700, Bart Van Assche wrote:
> Since iocg_lock() and iocg_unlock() both use conditional locking,
> annotate both with __no_context_analysis and use token_context_lock() to
> introduce a new lock context.

Looking at the two callers it seems like these helpers should simply
go away in favour of refactoring the callers. iocg_waitq_timer_fn
only calls a single function inside the lock, which can be turned into
a conditional trivially, 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.