Blame view
fs/xfs/xfs_inode_item.h
1.77 KB
0b61f8a40
|
1 |
// SPDX-License-Identifier: GPL-2.0 |
1da177e4c
|
2 |
/* |
7b7187698
|
3 4 |
* Copyright (c) 2000,2005 Silicon Graphics, Inc. * All Rights Reserved. |
1da177e4c
|
5 6 7 |
*/ #ifndef __XFS_INODE_ITEM_H__ #define __XFS_INODE_ITEM_H__ |
69432832f
|
8 |
/* kernel only definitions */ |
1da177e4c
|
9 10 |
struct xfs_buf; |
a5f9be58c
|
11 |
struct xfs_bmbt_rec; |
1da177e4c
|
12 13 |
struct xfs_inode; struct xfs_mount; |
fd9cbe512
|
14 |
struct xfs_inode_log_item { |
efe2330fd
|
15 |
struct xfs_log_item ili_item; /* common portion */ |
1da177e4c
|
16 |
struct xfs_inode *ili_inode; /* inode ptr */ |
1319ebefd
|
17 18 19 20 21 22 23 24 25 |
unsigned short ili_lock_flags; /* inode lock flags */ /* * The ili_lock protects the interactions between the dirty state and * the flush state of the inode log item. This allows us to do atomic * modifications of multiple state fields without having to hold a * specific inode lock to serialise them. * * We need atomic changes between inode dirtying, inode flushing and * inode completion, but these all hold different combinations of |
718ecc503
|
26 27 |
* ILOCK and IFLUSHING and hence we need some other method of * serialising updates to the flush state. |
1319ebefd
|
28 29 |
*/ spinlock_t ili_lock; /* flush state lock */ |
1da177e4c
|
30 |
unsigned int ili_last_fields; /* fields when flushed */ |
f5d8d5c4b
|
31 |
unsigned int ili_fields; /* fields to be logged */ |
fc0561cef
|
32 |
unsigned int ili_fsync_fields; /* logged since last fsync */ |
1319ebefd
|
33 34 |
xfs_lsn_t ili_flush_lsn; /* lsn at last flush */ xfs_lsn_t ili_last_lsn; /* lsn at last transaction */ |
fd9cbe512
|
35 |
}; |
1da177e4c
|
36 |
|
aac855ab1
|
37 |
static inline int xfs_inode_clean(struct xfs_inode *ip) |
335404089
|
38 |
{ |
f5d8d5c4b
|
39 |
return !ip->i_itemp || !(ip->i_itemp->ili_fields & XFS_ILOG_ALL); |
335404089
|
40 |
} |
a844f4510
|
41 42 |
extern void xfs_inode_item_init(struct xfs_inode *, struct xfs_mount *); extern void xfs_inode_item_destroy(struct xfs_inode *); |
88fc18798
|
43 |
extern void xfs_iflush_abort(struct xfs_inode *); |
6d192a9b8
|
44 |
extern int xfs_inode_item_format_convert(xfs_log_iovec_t *, |
06b113212
|
45 |
struct xfs_inode_log_format *); |
1da177e4c
|
46 |
|
69432832f
|
47 |
extern struct kmem_zone *xfs_ili_zone; |
1da177e4c
|
48 49 |
#endif /* __XFS_INODE_ITEM_H__ */ |