aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_inode_util.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-07-02 11:22:37 -0700
committerDarrick J. Wong <djwong@kernel.org>2024-07-02 11:36:57 -0700
commite9d2b35bb9d3ff372fad27998fc3969ced3f563d (patch)
tree06cfdcc1940c404b6cb8e51a1685b7603fd753e0 /fs/xfs/libxfs/xfs_inode_util.h
parent38fd3d6a956f1b104f11cd6eee116c54bfe458c4 (diff)
xfs: hoist new inode initialization functions to libxfs
Move all the code that initializes a new inode's attributes from the icreate_args structure and the parent directory into libxfs. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_inode_util.h')
-rw-r--r--fs/xfs/libxfs/xfs_inode_util.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_inode_util.h b/fs/xfs/libxfs/xfs_inode_util.h
index 9226482fdee8..bf5393db4fde 100644
--- a/fs/xfs/libxfs/xfs_inode_util.h
+++ b/fs/xfs/libxfs/xfs_inode_util.h
@@ -35,4 +35,16 @@ struct xfs_icreate_args {
uint16_t flags;
};
+/*
+ * Flags for xfs_trans_ichgtime().
+ */
+#define XFS_ICHGTIME_MOD 0x1 /* data fork modification timestamp */
+#define XFS_ICHGTIME_CHG 0x2 /* inode field change timestamp */
+#define XFS_ICHGTIME_CREATE 0x4 /* inode create timestamp */
+#define XFS_ICHGTIME_ACCESS 0x8 /* last access timestamp */
+void xfs_trans_ichgtime(struct xfs_trans *tp, struct xfs_inode *ip, int flags);
+
+void xfs_inode_init(struct xfs_trans *tp, const struct xfs_icreate_args *args,
+ struct xfs_inode *ip);
+
#endif /* __XFS_INODE_UTIL_H__ */