ACPI: bus: Move acpi_arm_init() to the place of after acpi_ghes_init()
[linux-2.6-block.git] / fs / xfs / xfs_inode_item.h
CommitLineData
0b61f8a4 1// SPDX-License-Identifier: GPL-2.0
1da177e4 2/*
7b718769
NS
3 * Copyright (c) 2000,2005 Silicon Graphics, Inc.
4 * All Rights Reserved.
1da177e4
LT
5 */
6#ifndef __XFS_INODE_ITEM_H__
7#define __XFS_INODE_ITEM_H__
8
69432832 9/* kernel only definitions */
1da177e4
LT
10
11struct xfs_buf;
a5f9be58 12struct xfs_bmbt_rec;
1da177e4
LT
13struct xfs_inode;
14struct xfs_mount;
15
fd9cbe51 16struct xfs_inode_log_item {
efe2330f 17 struct xfs_log_item ili_item; /* common portion */
1da177e4 18 struct xfs_inode *ili_inode; /* inode ptr */
1319ebef 19 unsigned short ili_lock_flags; /* inode lock flags */
82842fee 20 unsigned int ili_dirty_flags; /* dirty in current tx */
1319ebef
DC
21 /*
22 * The ili_lock protects the interactions between the dirty state and
23 * the flush state of the inode log item. This allows us to do atomic
24 * modifications of multiple state fields without having to hold a
25 * specific inode lock to serialise them.
26 *
27 * We need atomic changes between inode dirtying, inode flushing and
28 * inode completion, but these all hold different combinations of
718ecc50
DC
29 * ILOCK and IFLUSHING and hence we need some other method of
30 * serialising updates to the flush state.
1319ebef
DC
31 */
32 spinlock_t ili_lock; /* flush state lock */
1da177e4 33 unsigned int ili_last_fields; /* fields when flushed */
f5d8d5c4 34 unsigned int ili_fields; /* fields to be logged */
fc0561ce 35 unsigned int ili_fsync_fields; /* logged since last fsync */
1319ebef 36 xfs_lsn_t ili_flush_lsn; /* lsn at last flush */
5f9b4b0d 37 xfs_csn_t ili_commit_seq; /* last transaction commit */
fd9cbe51 38};
1da177e4 39
aac855ab 40static inline int xfs_inode_clean(struct xfs_inode *ip)
33540408 41{
f5d8d5c4 42 return !ip->i_itemp || !(ip->i_itemp->ili_fields & XFS_ILOG_ALL);
33540408
DC
43}
44
a844f451
NS
45extern void xfs_inode_item_init(struct xfs_inode *, struct xfs_mount *);
46extern void xfs_inode_item_destroy(struct xfs_inode *);
88fc1879 47extern void xfs_iflush_abort(struct xfs_inode *);
d2d7c047 48extern void xfs_iflush_shutdown_abort(struct xfs_inode *);
6d192a9b 49extern int xfs_inode_item_format_convert(xfs_log_iovec_t *,
06b11321 50 struct xfs_inode_log_format *);
1da177e4 51
182696fb 52extern struct kmem_cache *xfs_ili_cache;
1da177e4
LT
53
54#endif /* __XFS_INODE_ITEM_H__ */