diff options
author | Dave Chinner <dchinner@redhat.com> | 2021-04-06 17:03:24 +0300 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-04-08 00:37:07 +0300 |
commit | b2941046ea85d2cd94b485831bf03402f34f4060 (patch) | |
tree | 1c930385ea564d42a3e9353a1d4b7d3076da37a3 /fs/xfs/libxfs/xfs_shared.h | |
parent | 683ec9ba887d096a6cbd9a5778be9400efe6468c (diff) | |
download | linux-b2941046ea85d2cd94b485831bf03402f34f4060.tar.xz |
xfs: precalculate default inode attribute offset
Default attr fork offset is based on inode size, so is a fixed
geometry parameter of the inode. Move it to the xfs_ino_geometry
structure and stop calculating it on every call to
xfs_default_attroffset().
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Tested-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_shared.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_shared.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_shared.h b/fs/xfs/libxfs/xfs_shared.h index 8c61a461bf7b..782fdd08f759 100644 --- a/fs/xfs/libxfs/xfs_shared.h +++ b/fs/xfs/libxfs/xfs_shared.h @@ -176,8 +176,12 @@ struct xfs_ino_geometry { unsigned int agino_log; /* #bits for agino in inum */ + /* precomputed default inode attribute fork offset */ + unsigned int attr_fork_offset; + /* precomputed value for di_flags2 */ uint64_t new_diflags2; + }; #endif /* __XFS_SHARED_H__ */ |