Commit | Line | Data |
---|---|---|
1da177e4 | 1 | /* |
7b718769 NS |
2 | * Copyright (c) 2000,2005 Silicon Graphics, Inc. |
3 | * All Rights Reserved. | |
1da177e4 | 4 | * |
7b718769 NS |
5 | * This program is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU General Public License as | |
1da177e4 LT |
7 | * published by the Free Software Foundation. |
8 | * | |
7b718769 NS |
9 | * This program is distributed in the hope that it would be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | * GNU General Public License for more details. | |
1da177e4 | 13 | * |
7b718769 NS |
14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write the Free Software Foundation, | |
16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
1da177e4 LT |
17 | */ |
18 | #ifndef __XFS_INODE_ITEM_H__ | |
19 | #define __XFS_INODE_ITEM_H__ | |
20 | ||
69432832 | 21 | /* kernel only definitions */ |
1da177e4 LT |
22 | |
23 | struct xfs_buf; | |
a5f9be58 | 24 | struct xfs_bmbt_rec; |
1da177e4 LT |
25 | struct xfs_inode; |
26 | struct xfs_mount; | |
27 | ||
1da177e4 LT |
28 | typedef struct xfs_inode_log_item { |
29 | xfs_log_item_t ili_item; /* common portion */ | |
30 | struct xfs_inode *ili_inode; /* inode ptr */ | |
31 | xfs_lsn_t ili_flush_lsn; /* lsn at last flush */ | |
32 | xfs_lsn_t ili_last_lsn; /* lsn at last transaction */ | |
898621d5 | 33 | unsigned short ili_lock_flags; /* lock flags */ |
1da177e4 LT |
34 | unsigned short ili_logged; /* flushed logged data */ |
35 | unsigned int ili_last_fields; /* fields when flushed */ | |
f5d8d5c4 | 36 | unsigned int ili_fields; /* fields to be logged */ |
1da177e4 LT |
37 | } xfs_inode_log_item_t; |
38 | ||
33540408 DC |
39 | static inline int xfs_inode_clean(xfs_inode_t *ip) |
40 | { | |
f5d8d5c4 | 41 | return !ip->i_itemp || !(ip->i_itemp->ili_fields & XFS_ILOG_ALL); |
33540408 DC |
42 | } |
43 | ||
a844f451 NS |
44 | extern void xfs_inode_item_init(struct xfs_inode *, struct xfs_mount *); |
45 | extern void xfs_inode_item_destroy(struct xfs_inode *); | |
ca30b2a7 CH |
46 | extern void xfs_iflush_done(struct xfs_buf *, struct xfs_log_item *); |
47 | extern void xfs_istale_done(struct xfs_buf *, struct xfs_log_item *); | |
04913fdd | 48 | extern void xfs_iflush_abort(struct xfs_inode *, bool); |
6d192a9b TS |
49 | extern int xfs_inode_item_format_convert(xfs_log_iovec_t *, |
50 | xfs_inode_log_format_t *); | |
1da177e4 | 51 | |
69432832 | 52 | extern struct kmem_zone *xfs_ili_zone; |
1da177e4 LT |
53 | |
54 | #endif /* __XFS_INODE_ITEM_H__ */ |