[BACK]Return to xfs_inode_item.h CVS log [TXT][DIR] Up to [Development] / xfs-linux-nodel

File: [Development] / xfs-linux-nodel / xfs_inode_item.h (download)

Revision 1.21, Tue Mar 21 23:44:17 1995 UTC (22 years, 7 months ago) by miken
Branch: MAIN
Changes since 1.20: +20 -1 lines

Define old version xfs_inode_log_format for use in xfs_logprint.

#ifndef	_XFS_INODE_ITEM_H
#define	_XFS_INODE_ITEM_H

struct xfs_inode;
struct xfs_bmbt_rec_32;

/*
 * This is the structure used to lay out an inode log item in the
 * log.  The size of the inline data/extents/b-tree root to be logged
 * (if any) is indicated in the ilf_dsize field.  Changes to this structure
 * must be added on to the end.
 *
 * -Version 1 of this structure (XFS_LI_OINODE) included up to the first
 *	union (ilf_u) field.  This was released with IRIX 5.3-XFS.
 * -Version 2 of this structure (XFS_LI_INODE) is currently the entire
 *	structure.  This was released with IRIX 6.0.1-XFS and IRIX 6.1.
 */
typedef struct xfs_inode_log_format {
	unsigned short		ilf_type;	/* inode log item type */
	unsigned short		ilf_size;	/* size of this item */
	uint			ilf_fields;	/* flags for fields logged */
	uint			ilf_dsize;	/* size of data/ext/root */
	xfs_ino_t		ilf_ino;	/* inode number */
	union {
		dev_t		ilfu_rdev;	/* rdev value for dev inode*/
		uuid_t		ilfu_uuid;	/* mount point value */
	} ilf_u;
	__int64_t		ilf_blkno;	/* blkno of inode buffer */
	int			ilf_len;	/* len of inode buffer */
	int			ilf_boffset;	/* off of inode in buffer */
} xfs_inode_log_format_t;

/* Initial version shipped with IRIX 5.3-XFS */
typedef struct xfs_inode_log_format_v1 {
	unsigned short		ilf_type;	/* inode log item type */
	unsigned short		ilf_size;	/* size of this item */
	uint			ilf_fields;	/* flags for fields logged */
	uint			ilf_dsize;	/* size of data/ext/root */
	xfs_ino_t		ilf_ino;	/* inode number */
	union {
		dev_t		ilfu_rdev;	/* rdev value for dev inode*/
		uuid_t		ilfu_uuid;	/* mount point value */
	} ilf_u;
} xfs_inode_log_format_t_v1;

struct proc;
typedef struct xfs_inode_log_item {
	xfs_log_item_t		ili_item;	   /* common portion */
	struct xfs_inode	*ili_inode;	   /* inode ptr */
	xfs_lsn_t		ili_flush_lsn;	   /* lsn at last flush */
	unsigned short		ili_ilock_recur;   /* lock recursion count */
	unsigned short		ili_iolock_recur;  /* lock recursion count */
	unsigned short		ili_flags;	   /* misc flags */
	unsigned short		ili_logged;	   /* flushed logged data */
	unsigned int		ili_last_fields;   /* fields when flushed */
	struct xfs_bmbt_rec_32	*ili_extents_buf;  /* array of logged exts */
	buf_t			*ili_bp;	   /* locked inode buffer */
	struct proc		*ili_bp_owner;	   /* bp owner proc */
	xfs_inode_log_format_t	ili_format;	   /* logged structure */
} xfs_inode_log_item_t;

#define	XFS_ILI_HOLD		0x1
#define	XFS_ILI_IOLOCKED_EXCL	0x2
#define	XFS_ILI_IOLOCKED_SHARED	0x4

#define	XFS_ILI_IOLOCKED_ANY   (XFS_ILI_IOLOCKED_EXCL | XFS_ILI_IOLOCKED_SHARED)

/*
 * Flags for xfs_trans_log_inode flags field.
 */
#define	XFS_ILOG_CORE	0x001	/* log standard inode fields */
#define	XFS_ILOG_DATA	0x002	/* log iu_data */
#define	XFS_ILOG_EXT	0x004	/* log iu_extents */
#define	XFS_ILOG_BROOT	0x008	/* log i_broot */
#define	XFS_ILOG_DEV	0x010	/* log the dev field */
#define	XFS_ILOG_UUID	0x020	/* log the uuid field */

#define	XFS_ILOG_NONCORE	(XFS_ILOG_DATA | XFS_ILOG_EXT | \
				 XFS_ILOG_BROOT | XFS_ILOG_DEV | \
				 XFS_ILOG_UUID)

#define	XFS_ILOG_ALL		(XFS_ILOG_CORE | XFS_ILOG_DATA | \
				 XFS_ILOG_EXT | XFS_ILOG_BROOT | \
				 XFS_ILOG_DEV | XFS_ILOG_UUID)

     
void	xfs_inode_item_init(struct xfs_inode *, xfs_mount_t *);
void	xfs_iflush_done(buf_t *, xfs_inode_log_item_t *);

#endif	/* _XFS_INODE_ITEM_H */