Re: [PATCH 11/13] xfs: refactor inode creation transaction/inode/quota allocation idiom

Christoph Hellwig
2021-01-28T09:58:25Z

On Wed, Jan 27, 2021 at 10:02:06PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> For file creation, create a new helper xfs_trans_alloc_icreate that
> allocates a transaction and reserves the appropriate amount of quota
> against that transction. Replace all the open-coded idioms with a
> single call to this helper so that we can contain the retry loops in the
> next patchset.

For most callers this moves the call to xfs_trans_reserve_quota_icreate
out of the ilock criticial section. Which seems fine and actually
mildly desirable. But please document it.