xfs: prepare to reuse the dquot pointer space in struct xfs_inode
authorDarrick J. Wong <djwong@kernel.org>
Thu, 21 Nov 2024 00:20:18 +0000 (16:20 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 23 Dec 2024 21:06:03 +0000 (13:06 -0800)
commit84140a96cf7a5b5b48b862a79c8322aa220ce591
treed0de797c621d9bb00a87b4747bf73e9604461ed1
parent2f63b20b7a26c9a7c76ea5a6565ca38cd9e31282
xfs: prepare to reuse the dquot pointer space in struct xfs_inode

Files participating in the metadata directory tree are not accounted to
the quota subsystem.  Therefore, the i_[ugp]dquot pointers in struct
xfs_inode are never used and should always be NULL.

In the next patch we want to add a u64 count of fs blocks reserved for
metadata btree expansion, but we don't want every inode in the fs to pay
the memory price for this feature.  The intent is to union those three
pointers with the u64 counter, but for that to work we must guard
against all access to the dquot pointers for metadata files.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_attr.c
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/scrub/tempfile.c
fs/xfs/xfs_dquot.h
fs/xfs/xfs_exchrange.c
fs/xfs/xfs_inode.h
fs/xfs/xfs_qm.c
fs/xfs/xfs_quota.h
fs/xfs/xfs_trans.c
fs/xfs/xfs_trans_dquot.c