1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2000,2005 Silicon Graphics, Inc.
6 #ifndef __XFS_INODE_ITEM_H__
7 #define __XFS_INODE_ITEM_H__
9 /* kernel only definitions */
16 typedef struct xfs_inode_log_item {
17 struct xfs_log_item ili_item; /* common portion */
18 struct xfs_inode *ili_inode; /* inode ptr */
19 xfs_lsn_t ili_flush_lsn; /* lsn at last flush */
20 xfs_lsn_t ili_last_lsn; /* lsn at last transaction */
21 unsigned short ili_lock_flags; /* lock flags */
22 unsigned short ili_logged; /* flushed logged data */
23 unsigned int ili_last_fields; /* fields when flushed */
24 unsigned int ili_fields; /* fields to be logged */
25 unsigned int ili_fsync_fields; /* logged since last fsync */
26 } xfs_inode_log_item_t;
28 static inline int xfs_inode_clean(xfs_inode_t *ip)
30 return !ip->i_itemp || !(ip->i_itemp->ili_fields & XFS_ILOG_ALL);
33 extern void xfs_inode_item_init(struct xfs_inode *, struct xfs_mount *);
34 extern void xfs_inode_item_destroy(struct xfs_inode *);
35 extern void xfs_iflush_done(struct xfs_buf *, struct xfs_log_item *);
36 extern void xfs_istale_done(struct xfs_buf *, struct xfs_log_item *);
37 extern void xfs_iflush_abort(struct xfs_inode *, bool);
38 extern int xfs_inode_item_format_convert(xfs_log_iovec_t *,
39 struct xfs_inode_log_format *);
41 extern struct kmem_zone *xfs_ili_zone;
43 #endif /* __XFS_INODE_ITEM_H__ */