Re: [RFC PATCH v2 2/6] btrfs: untrack i_rwsem before io_uring encoded read completion
From: Christoph Hellwig
Date: Wed Dec 02 2026 - 01:20:44 EST
On Tue, Dec 01, 2026 at 09:41:24AM -0800, Peng Huang wrote:
> Good point. btrfs_uring_read_extent() and btrfs_uring_read_finished()
> already call btrfs_lockdep_inode_release() / acquire() for this handoff,
> so replacing both that and rwsem_boost_untrack() with a proper pair on
> rw_semaphore makes much more sense.
>
> One small thing: we'd want to disown before submitting the async read
> (and re-own on error) since completion can unlock i_rwsem right away.
Yes.
> Do you or the locking folks have a preferred name, like
> rwsem_disown_read() / rwsem_own_read()?
I can live with the above.