Re: [PATCH 3/3] xfs: attach dquots before performing xfs_swap_extents

Christoph Hellwig
2019-11-11T08:05:05Z

On Sun, Nov 10, 2019 at 05:18:34PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> Make sure we attach dquots to both inodes before swapping their extents.
> This was found via manual code inspection by looking for places where we
> could call xfs_trans_mod_dquot without dquots attached to inodes, and
> confirmed by instrumenting the kernel and running xfs/328.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

Btw, for while I've been wondering if we could just get rid of the
concepts of attached dquots. With the radix-tree/xarray looks up
are be fairly cheap, and could be done lockless using RCU. So we could
try to just kill the concept of attaching the dquot to the inode and
just look it up once per operation, where operation preferally is
something high-level like the actual file/inode operation and not a
low-level thing inside xfs.