xfs_log_item_t ili_item; /* common portion */
struct xfs_inode *ili_inode; /* inode pointer */
unsigned short ili_flags; /* misc flags */
+ unsigned short ili_lock_flags; /* lock flags */
unsigned int ili_fields; /* fields to be logged */
unsigned int ili_last_fields; /* fields when flushed*/
} xfs_inode_log_item_t;
xfs_qoff_logformat_t qql_format; /* logged structure */
} xfs_qoff_logitem_t;
+#define XFS_DEFER_OPS_NR_INODES 2 /* join up to two inodes */
+#define XFS_DEFER_OPS_NR_BUFS 2 /* join up to two buffers */
+
typedef struct xfs_trans {
unsigned int t_type; /* transaction type */
unsigned int t_log_res; /* amt of log space resvd */
unsigned int t_log_count; /* count for perm log res */
unsigned int t_blk_res; /* # of blocks resvd */
+ xfs_fsblock_t t_firstblock; /* first block allocated */
struct xfs_mount *t_mountp; /* ptr to fs mount struct */
+ unsigned int t_blk_res_used; /* # of resvd blocks used */
unsigned int t_flags; /* misc flags */
long t_icount_delta; /* superblock icount change */
long t_ifree_delta; /* superblock ifree change */
long t_fdblocks_delta; /* superblock fdblocks chg */
long t_frextents_delta; /* superblock freextents chg */
struct list_head t_items; /* first log item desc chunk */
- struct xfs_defer_ops *t_agfl_dfops; /* optional agfl fixup dfops */
-
+ struct list_head t_dfops; /* deferred operations */
} xfs_trans_t;
void xfs_trans_init(struct xfs_mount *);
int libxfs_trans_alloc(struct xfs_mount *mp, struct xfs_trans_res *resp,
uint blocks, uint rtextents, uint flags,
struct xfs_trans **tpp);
+int libxfs_trans_alloc_rollable(struct xfs_mount *mp, uint blocks,
+ struct xfs_trans **tpp);
int libxfs_trans_alloc_empty(struct xfs_mount *mp, struct xfs_trans **tpp);
int libxfs_trans_commit(struct xfs_trans *);
void libxfs_trans_cancel(struct xfs_trans *);
+
+/* cancel dfops associated with a transaction */
+void xfs_defer_cancel(struct xfs_trans *);
+
struct xfs_buf *libxfs_trans_getsb(struct xfs_trans *, struct xfs_mount *, int);
-int libxfs_trans_iget(struct xfs_mount *, struct xfs_trans *, xfs_ino_t,
- uint, uint, struct xfs_inode **);
void libxfs_trans_ijoin(struct xfs_trans *, struct xfs_inode *, uint);
void libxfs_trans_ijoin_ref(struct xfs_trans *, struct xfs_inode *, int);
void libxfs_trans_log_inode (struct xfs_trans *, struct xfs_inode *,
return libxfs_trans_read_buf_map(mp, tp, btp, &map, 1, flags, bpp, ops);
}
-void xfs_extent_free_init_defer_op(void);
-void xfs_rmap_update_init_defer_op(void);
-void xfs_refcount_update_init_defer_op(void);
-void xfs_bmap_update_init_defer_op(void);
-
#endif /* __XFS_TRANS_H__ */