aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_trans.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_trans.h')
-rw-r--r--fs/xfs/xfs_trans.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h
index 09cf40b89e8c..9b96d35e483d 100644
--- a/fs/xfs/xfs_trans.h
+++ b/fs/xfs/xfs_trans.h
@@ -18,10 +18,6 @@
18#ifndef __XFS_TRANS_H__ 18#ifndef __XFS_TRANS_H__
19#define __XFS_TRANS_H__ 19#define __XFS_TRANS_H__
20 20
21struct xfs_log_item;
22
23#include "xfs_trans_resv.h"
24
25/* kernel only transaction subsystem defines */ 21/* kernel only transaction subsystem defines */
26 22
27struct xfs_buf; 23struct xfs_buf;
@@ -77,6 +73,9 @@ struct xfs_item_ops {
77 void (*iop_committing)(xfs_log_item_t *, xfs_lsn_t); 73 void (*iop_committing)(xfs_log_item_t *, xfs_lsn_t);
78}; 74};
79 75
76void xfs_log_item_init(struct xfs_mount *mp, struct xfs_log_item *item,
77 int type, const struct xfs_item_ops *ops);
78
80/* 79/*
81 * Return values for the iop_push() routines. 80 * Return values for the iop_push() routines.
82 */ 81 */
@@ -85,18 +84,12 @@ struct xfs_item_ops {
85#define XFS_ITEM_LOCKED 2 84#define XFS_ITEM_LOCKED 2
86#define XFS_ITEM_FLUSHING 3 85#define XFS_ITEM_FLUSHING 3
87 86
88/*
89 * This is the type of function which can be given to xfs_trans_callback()
90 * to be called upon the transaction's commit to disk.
91 */
92typedef void (*xfs_trans_callback_t)(struct xfs_trans *, void *);
93 87
94/* 88/*
95 * This is the structure maintained for every active transaction. 89 * This is the structure maintained for every active transaction.
96 */ 90 */
97typedef struct xfs_trans { 91typedef struct xfs_trans {
98 unsigned int t_magic; /* magic number */ 92 unsigned int t_magic; /* magic number */
99 xfs_log_callback_t t_logcb; /* log callback struct */
100 unsigned int t_type; /* transaction type */ 93 unsigned int t_type; /* transaction type */
101 unsigned int t_log_res; /* amt of log space resvd */ 94 unsigned int t_log_res; /* amt of log space resvd */
102 unsigned int t_log_count; /* count for perm log res */ 95 unsigned int t_log_count; /* count for perm log res */
@@ -132,7 +125,6 @@ typedef struct xfs_trans {
132 int64_t t_rextents_delta;/* superblocks rextents chg */ 125 int64_t t_rextents_delta;/* superblocks rextents chg */
133 int64_t t_rextslog_delta;/* superblocks rextslog chg */ 126 int64_t t_rextslog_delta;/* superblocks rextslog chg */
134 struct list_head t_items; /* log item descriptors */ 127 struct list_head t_items; /* log item descriptors */
135 xfs_trans_header_t t_header; /* header for in-log trans */
136 struct list_head t_busy; /* list of busy extents */ 128 struct list_head t_busy; /* list of busy extents */
137 unsigned long t_pflags; /* saved process flags state */ 129 unsigned long t_pflags; /* saved process flags state */
138} xfs_trans_t; 130} xfs_trans_t;
@@ -237,10 +229,16 @@ void xfs_trans_log_efd_extent(xfs_trans_t *,
237 xfs_fsblock_t, 229 xfs_fsblock_t,
238 xfs_extlen_t); 230 xfs_extlen_t);
239int xfs_trans_commit(xfs_trans_t *, uint flags); 231int xfs_trans_commit(xfs_trans_t *, uint flags);
232int xfs_trans_roll(struct xfs_trans **, struct xfs_inode *);
240void xfs_trans_cancel(xfs_trans_t *, int); 233void xfs_trans_cancel(xfs_trans_t *, int);
241int xfs_trans_ail_init(struct xfs_mount *); 234int xfs_trans_ail_init(struct xfs_mount *);
242void xfs_trans_ail_destroy(struct xfs_mount *); 235void xfs_trans_ail_destroy(struct xfs_mount *);
243 236
237void xfs_trans_buf_set_type(struct xfs_trans *, struct xfs_buf *,
238 enum xfs_blft);
239void xfs_trans_buf_copy_type(struct xfs_buf *dst_bp,
240 struct xfs_buf *src_bp);
241
244extern kmem_zone_t *xfs_trans_zone; 242extern kmem_zone_t *xfs_trans_zone;
245extern kmem_zone_t *xfs_log_item_desc_zone; 243extern kmem_zone_t *xfs_log_item_desc_zone;
246 244