diff options
| author | Darrick J. Wong <[email protected]> | 2024-11-21 00:20:18 +0000 |
|---|---|---|
| committer | Darrick J. Wong <[email protected]> | 2024-12-23 21:06:03 +0000 |
| commit | 84140a96cf7a5b5b48b862a79c8322aa220ce591 (patch) | |
| tree | d0de797c621d9bb00a87b4747bf73e9604461ed1 /fs/xfs/xfs_inode.h | |
| parent | xfs: support storing records in the inode core root (diff) | |
| download | kernel-84140a96cf7a5b5b48b862a79c8322aa220ce591.tar.gz kernel-84140a96cf7a5b5b48b862a79c8322aa220ce591.zip | |
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" <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'fs/xfs/xfs_inode.h')
| -rw-r--r-- | fs/xfs/xfs_inode.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index 1648dc5a8068..1141c2e8e123 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h @@ -25,9 +25,13 @@ struct xfs_dquot; typedef struct xfs_inode { /* Inode linking and identification information. */ struct xfs_mount *i_mount; /* fs mount struct ptr */ - struct xfs_dquot *i_udquot; /* user dquot */ - struct xfs_dquot *i_gdquot; /* group dquot */ - struct xfs_dquot *i_pdquot; /* project dquot */ + union { + struct { + struct xfs_dquot *i_udquot; /* user dquot */ + struct xfs_dquot *i_gdquot; /* group dquot */ + struct xfs_dquot *i_pdquot; /* project dquot */ + }; + }; /* Inode location stuff */ xfs_ino_t i_ino; /* inode number (agno/agino)*/ |
