blob: 772d5aed90faf08105c7e500113804208f1db2af [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Nathan Scott7b718762005-11-02 14:58:39 +11002 * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004 *
Nathan Scott7b718762005-11-02 14:58:39 +11005 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 * published by the Free Software Foundation.
8 *
Nathan Scott7b718762005-11-02 14:58:39 +11009 * 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.
Linus Torvalds1da177e2005-04-16 15:20:36 -070013 *
Nathan Scott7b718762005-11-02 14:58:39 +110014 * 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
Linus Torvalds1da177e2005-04-16 15:20:36 -070017 */
18#ifndef __XFS_TRANS_H__
19#define __XFS_TRANS_H__
20
Barry Naujok847fff52008-10-30 17:05:38 +110021struct xfs_log_item;
22
Linus Torvalds1da177e2005-04-16 15:20:36 -070023/*
Linus Torvalds1da177e2005-04-16 15:20:36 -070024 * Per-extent log reservation for the allocation btree changes
25 * involved in freeing or allocating an extent.
Jie Liu2fb8b502013-05-03 15:41:19 +080026 * 2 trees * (2 blocks/level * max depth - 1)
Linus Torvalds1da177e2005-04-16 15:20:36 -070027 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070028#define XFS_ALLOCFREE_LOG_COUNT(mp,nx) \
29 ((nx) * (2 * (2 * XFS_AG_MAXLEVELS(mp) - 1)))
30
31/*
32 * Per-directory log reservation for any directory change.
Jie Liu2fb8b502013-05-03 15:41:19 +080033 * dir blocks: (1 btree block per level + data block + free block)
34 * bmap btree: (levels + 2) * max depth
Linus Torvalds1da177e2005-04-16 15:20:36 -070035 * v2 directory blocks can be fragmented below the dirblksize down to the fsb
36 * size, so account for that in the DAENTER macros.
37 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070038#define XFS_DIROP_LOG_COUNT(mp) \
39 (XFS_DAENTER_BLOCKS(mp, XFS_DATA_FORK) + \
40 XFS_DAENTER_BMAPS(mp, XFS_DATA_FORK) + 1)
41
Linus Torvalds1da177e2005-04-16 15:20:36 -070042
43#define XFS_WRITE_LOG_RES(mp) ((mp)->m_reservations.tr_write)
Linus Torvalds1da177e2005-04-16 15:20:36 -070044#define XFS_ITRUNCATE_LOG_RES(mp) ((mp)->m_reservations.tr_itruncate)
Linus Torvalds1da177e2005-04-16 15:20:36 -070045#define XFS_RENAME_LOG_RES(mp) ((mp)->m_reservations.tr_rename)
Linus Torvalds1da177e2005-04-16 15:20:36 -070046#define XFS_LINK_LOG_RES(mp) ((mp)->m_reservations.tr_link)
Linus Torvalds1da177e2005-04-16 15:20:36 -070047#define XFS_REMOVE_LOG_RES(mp) ((mp)->m_reservations.tr_remove)
Linus Torvalds1da177e2005-04-16 15:20:36 -070048#define XFS_SYMLINK_LOG_RES(mp) ((mp)->m_reservations.tr_symlink)
Linus Torvalds1da177e2005-04-16 15:20:36 -070049#define XFS_CREATE_LOG_RES(mp) ((mp)->m_reservations.tr_create)
Linus Torvalds1da177e2005-04-16 15:20:36 -070050#define XFS_MKDIR_LOG_RES(mp) ((mp)->m_reservations.tr_mkdir)
Linus Torvalds1da177e2005-04-16 15:20:36 -070051#define XFS_IFREE_LOG_RES(mp) ((mp)->m_reservations.tr_ifree)
Linus Torvalds1da177e2005-04-16 15:20:36 -070052#define XFS_ICHANGE_LOG_RES(mp) ((mp)->m_reservations.tr_ichange)
Linus Torvalds1da177e2005-04-16 15:20:36 -070053#define XFS_GROWDATA_LOG_RES(mp) ((mp)->m_reservations.tr_growdata)
Linus Torvalds1da177e2005-04-16 15:20:36 -070054#define XFS_GROWRTALLOC_LOG_RES(mp) ((mp)->m_reservations.tr_growrtalloc)
Linus Torvalds1da177e2005-04-16 15:20:36 -070055#define XFS_GROWRTZERO_LOG_RES(mp) ((mp)->m_reservations.tr_growrtzero)
Linus Torvalds1da177e2005-04-16 15:20:36 -070056#define XFS_GROWRTFREE_LOG_RES(mp) ((mp)->m_reservations.tr_growrtfree)
Linus Torvalds1da177e2005-04-16 15:20:36 -070057#define XFS_SWRITE_LOG_RES(mp) ((mp)->m_reservations.tr_swrite)
Linus Torvalds1da177e2005-04-16 15:20:36 -070058/*
59 * Logging the inode timestamps on an fsync -- same as SWRITE
60 * as long as SWRITE logs the entire inode core
61 */
62#define XFS_FSYNC_TS_LOG_RES(mp) ((mp)->m_reservations.tr_swrite)
Jeff Liua21cd502013-01-28 21:27:53 +080063#define XFS_WRITEID_LOG_RES(mp) ((mp)->m_reservations.tr_swrite)
Linus Torvalds1da177e2005-04-16 15:20:36 -070064#define XFS_ADDAFORK_LOG_RES(mp) ((mp)->m_reservations.tr_addafork)
Linus Torvalds1da177e2005-04-16 15:20:36 -070065#define XFS_ATTRINVAL_LOG_RES(mp) ((mp)->m_reservations.tr_attrinval)
Jeff Liua21cd502013-01-28 21:27:53 +080066#define XFS_ATTRSETM_LOG_RES(mp) ((mp)->m_reservations.tr_attrsetm)
Dave Chinnerd386b322013-08-12 20:49:31 +100067#define XFS_ATTRSETRT_LOG_RES(mp) ((mp)->m_reservations.tr_attrsetrt)
Jeff Liua21cd502013-01-28 21:27:53 +080068#define XFS_ATTRRM_LOG_RES(mp) ((mp)->m_reservations.tr_attrrm)
Linus Torvalds1da177e2005-04-16 15:20:36 -070069#define XFS_CLEAR_AGI_BUCKET_LOG_RES(mp) ((mp)->m_reservations.tr_clearagi)
Jeff Liub0c10b982013-01-28 21:26:16 +080070#define XFS_QM_SBCHANGE_LOG_RES(mp) ((mp)->m_reservations.tr_qm_sbchange)
Jeff Liuf0f2df92013-01-28 21:26:49 +080071#define XFS_QM_SETQLIM_LOG_RES(mp) ((mp)->m_reservations.tr_qm_setqlim)
Jeff Liu48001042013-01-28 21:27:04 +080072#define XFS_QM_DQALLOC_LOG_RES(mp) ((mp)->m_reservations.tr_qm_dqalloc)
Jeff Liua1bd9552013-01-28 21:27:15 +080073#define XFS_QM_QUOTAOFF_LOG_RES(mp) ((mp)->m_reservations.tr_qm_quotaoff)
Jeff Liu762d7ba2013-01-28 21:27:21 +080074#define XFS_QM_QUOTAOFF_END_LOG_RES(mp) ((mp)->m_reservations.tr_qm_equotaoff)
Jeff Liua7bd7942013-01-28 21:27:25 +080075#define XFS_SB_LOG_RES(mp) ((mp)->m_reservations.tr_sb)
Linus Torvalds1da177e2005-04-16 15:20:36 -070076
77/*
78 * Various log count values.
79 */
80#define XFS_DEFAULT_LOG_COUNT 1
81#define XFS_DEFAULT_PERM_LOG_COUNT 2
82#define XFS_ITRUNCATE_LOG_COUNT 2
83#define XFS_INACTIVE_LOG_COUNT 2
84#define XFS_CREATE_LOG_COUNT 2
85#define XFS_MKDIR_LOG_COUNT 3
86#define XFS_SYMLINK_LOG_COUNT 3
87#define XFS_REMOVE_LOG_COUNT 2
88#define XFS_LINK_LOG_COUNT 2
89#define XFS_RENAME_LOG_COUNT 2
90#define XFS_WRITE_LOG_COUNT 2
91#define XFS_ADDAFORK_LOG_COUNT 2
92#define XFS_ATTRINVAL_LOG_COUNT 1
93#define XFS_ATTRSET_LOG_COUNT 3
94#define XFS_ATTRRM_LOG_COUNT 3
95
Linus Torvalds1da177e2005-04-16 15:20:36 -070096#ifdef __KERNEL__
Barry Naujok847fff52008-10-30 17:05:38 +110097
98struct xfs_buf;
99struct xfs_buftarg;
100struct xfs_efd_log_item;
101struct xfs_efi_log_item;
102struct xfs_inode;
103struct xfs_item_ops;
104struct xfs_log_iovec;
105struct xfs_log_item_desc;
106struct xfs_mount;
107struct xfs_trans;
108struct xfs_dquot_acct;
Dave Chinnered3b4d62010-05-21 12:07:08 +1000109struct xfs_busy_extent;
Barry Naujok847fff52008-10-30 17:05:38 +1100110
111typedef struct xfs_log_item {
112 struct list_head li_ail; /* AIL pointers */
113 xfs_lsn_t li_lsn; /* last on-disk lsn */
114 struct xfs_log_item_desc *li_desc; /* ptr to current desc*/
115 struct xfs_mount *li_mountp; /* ptr to fs mount */
David Chinnerfc1829f2008-10-30 17:39:46 +1100116 struct xfs_ail *li_ailp; /* ptr to AIL */
Barry Naujok847fff52008-10-30 17:05:38 +1100117 uint li_type; /* item type */
118 uint li_flags; /* misc flags */
119 struct xfs_log_item *li_bio_list; /* buffer item list */
120 void (*li_cb)(struct xfs_buf *,
121 struct xfs_log_item *);
122 /* buffer item iodone */
123 /* callback func */
Christoph Hellwig272e42b2011-10-28 09:54:24 +0000124 const struct xfs_item_ops *li_ops; /* function list */
Dave Chinner71e330b2010-05-21 14:37:18 +1000125
126 /* delayed logging */
127 struct list_head li_cil; /* CIL pointers */
128 struct xfs_log_vec *li_lv; /* active log vector */
Dave Chinnerccf7c232010-05-20 23:19:42 +1000129 xfs_lsn_t li_seq; /* CIL commit seq */
Barry Naujok847fff52008-10-30 17:05:38 +1100130} xfs_log_item_t;
131
132#define XFS_LI_IN_AIL 0x1
133#define XFS_LI_ABORTED 0x2
134
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000135#define XFS_LI_FLAGS \
136 { XFS_LI_IN_AIL, "IN_AIL" }, \
137 { XFS_LI_ABORTED, "ABORTED" }
138
Christoph Hellwig272e42b2011-10-28 09:54:24 +0000139struct xfs_item_ops {
Barry Naujok847fff52008-10-30 17:05:38 +1100140 uint (*iop_size)(xfs_log_item_t *);
141 void (*iop_format)(xfs_log_item_t *, struct xfs_log_iovec *);
142 void (*iop_pin)(xfs_log_item_t *);
Christoph Hellwig9412e312010-06-23 18:11:15 +1000143 void (*iop_unpin)(xfs_log_item_t *, int remove);
Christoph Hellwig43ff2122012-04-23 15:58:39 +1000144 uint (*iop_push)(struct xfs_log_item *, struct list_head *);
Barry Naujok847fff52008-10-30 17:05:38 +1100145 void (*iop_unlock)(xfs_log_item_t *);
146 xfs_lsn_t (*iop_committed)(xfs_log_item_t *, xfs_lsn_t);
Barry Naujok847fff52008-10-30 17:05:38 +1100147 void (*iop_committing)(xfs_log_item_t *, xfs_lsn_t);
Christoph Hellwig272e42b2011-10-28 09:54:24 +0000148};
Barry Naujok847fff52008-10-30 17:05:38 +1100149
150#define IOP_SIZE(ip) (*(ip)->li_ops->iop_size)(ip)
151#define IOP_FORMAT(ip,vp) (*(ip)->li_ops->iop_format)(ip, vp)
152#define IOP_PIN(ip) (*(ip)->li_ops->iop_pin)(ip)
Christoph Hellwig9412e312010-06-23 18:11:15 +1000153#define IOP_UNPIN(ip, remove) (*(ip)->li_ops->iop_unpin)(ip, remove)
Christoph Hellwig43ff2122012-04-23 15:58:39 +1000154#define IOP_PUSH(ip, list) (*(ip)->li_ops->iop_push)(ip, list)
Barry Naujok847fff52008-10-30 17:05:38 +1100155#define IOP_UNLOCK(ip) (*(ip)->li_ops->iop_unlock)(ip)
156#define IOP_COMMITTED(ip, lsn) (*(ip)->li_ops->iop_committed)(ip, lsn)
Barry Naujok847fff52008-10-30 17:05:38 +1100157#define IOP_COMMITTING(ip, lsn) (*(ip)->li_ops->iop_committing)(ip, lsn)
158
159/*
Christoph Hellwig43ff2122012-04-23 15:58:39 +1000160 * Return values for the IOP_PUSH() routines.
Barry Naujok847fff52008-10-30 17:05:38 +1100161 */
Christoph Hellwig43ff2122012-04-23 15:58:39 +1000162#define XFS_ITEM_SUCCESS 0
163#define XFS_ITEM_PINNED 1
164#define XFS_ITEM_LOCKED 2
165#define XFS_ITEM_FLUSHING 3
Barry Naujok847fff52008-10-30 17:05:38 +1100166
167/*
Barry Naujok847fff52008-10-30 17:05:38 +1100168 * This is the type of function which can be given to xfs_trans_callback()
169 * to be called upon the transaction's commit to disk.
170 */
171typedef void (*xfs_trans_callback_t)(struct xfs_trans *, void *);
172
173/*
174 * This is the structure maintained for every active transaction.
175 */
176typedef struct xfs_trans {
177 unsigned int t_magic; /* magic number */
178 xfs_log_callback_t t_logcb; /* log callback struct */
179 unsigned int t_type; /* transaction type */
180 unsigned int t_log_res; /* amt of log space resvd */
181 unsigned int t_log_count; /* count for perm log res */
182 unsigned int t_blk_res; /* # of blocks resvd */
183 unsigned int t_blk_res_used; /* # of resvd blocks used */
184 unsigned int t_rtx_res; /* # of rt extents resvd */
185 unsigned int t_rtx_res_used; /* # of resvd rt extents used */
Christoph Hellwig35a8a722010-02-15 23:34:54 +0000186 struct xlog_ticket *t_ticket; /* log mgr ticket */
Barry Naujok847fff52008-10-30 17:05:38 +1100187 xfs_lsn_t t_lsn; /* log seq num of start of
188 * transaction. */
189 xfs_lsn_t t_commit_lsn; /* log seq num of end of
190 * transaction. */
191 struct xfs_mount *t_mountp; /* ptr to fs mount struct */
192 struct xfs_dquot_acct *t_dqinfo; /* acctg info for dquots */
Barry Naujok847fff52008-10-30 17:05:38 +1100193 unsigned int t_flags; /* misc flags */
194 int64_t t_icount_delta; /* superblock icount change */
195 int64_t t_ifree_delta; /* superblock ifree change */
196 int64_t t_fdblocks_delta; /* superblock fdblocks chg */
197 int64_t t_res_fdblocks_delta; /* on-disk only chg */
198 int64_t t_frextents_delta;/* superblock freextents chg*/
199 int64_t t_res_frextents_delta; /* on-disk only chg */
Dave Chinner742ae1e2013-04-30 21:39:34 +1000200#if defined(DEBUG) || defined(XFS_WARN)
Barry Naujok847fff52008-10-30 17:05:38 +1100201 int64_t t_ag_freeblks_delta; /* debugging counter */
202 int64_t t_ag_flist_delta; /* debugging counter */
203 int64_t t_ag_btree_delta; /* debugging counter */
204#endif
205 int64_t t_dblocks_delta;/* superblock dblocks change */
206 int64_t t_agcount_delta;/* superblock agcount change */
207 int64_t t_imaxpct_delta;/* superblock imaxpct change */
208 int64_t t_rextsize_delta;/* superblock rextsize chg */
209 int64_t t_rbmblocks_delta;/* superblock rbmblocks chg */
210 int64_t t_rblocks_delta;/* superblock rblocks change */
211 int64_t t_rextents_delta;/* superblocks rextents chg */
212 int64_t t_rextslog_delta;/* superblocks rextslog chg */
Christoph Hellwige98c4142010-06-23 18:11:15 +1000213 struct list_head t_items; /* log item descriptors */
Barry Naujok847fff52008-10-30 17:05:38 +1100214 xfs_trans_header_t t_header; /* header for in-log trans */
Dave Chinnered3b4d62010-05-21 12:07:08 +1000215 struct list_head t_busy; /* list of busy extents */
Barry Naujok847fff52008-10-30 17:05:38 +1100216 unsigned long t_pflags; /* saved process flags state */
217} xfs_trans_t;
218
Linus Torvalds1da177e2005-04-16 15:20:36 -0700219/*
220 * XFS transaction mechanism exported interfaces that are
221 * actually macros.
222 */
223#define xfs_trans_get_log_res(tp) ((tp)->t_log_res)
224#define xfs_trans_get_log_count(tp) ((tp)->t_log_count)
225#define xfs_trans_get_block_res(tp) ((tp)->t_blk_res)
226#define xfs_trans_set_sync(tp) ((tp)->t_flags |= XFS_TRANS_SYNC)
227
Dave Chinner742ae1e2013-04-30 21:39:34 +1000228#if defined(DEBUG) || defined(XFS_WARN)
David Chinner20f4ebf2007-02-10 18:36:10 +1100229#define xfs_trans_agblocks_delta(tp, d) ((tp)->t_ag_freeblks_delta += (int64_t)d)
230#define xfs_trans_agflist_delta(tp, d) ((tp)->t_ag_flist_delta += (int64_t)d)
231#define xfs_trans_agbtree_delta(tp, d) ((tp)->t_ag_btree_delta += (int64_t)d)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700232#else
233#define xfs_trans_agblocks_delta(tp, d)
234#define xfs_trans_agflist_delta(tp, d)
235#define xfs_trans_agbtree_delta(tp, d)
236#endif
237
238/*
239 * XFS transaction mechanism exported interfaces.
240 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700241xfs_trans_t *xfs_trans_alloc(struct xfs_mount *, uint);
Al Viro77ba7872012-04-02 06:24:04 -0400242xfs_trans_t *_xfs_trans_alloc(struct xfs_mount *, uint, xfs_km_flags_t);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700243xfs_trans_t *xfs_trans_dup(xfs_trans_t *);
244int xfs_trans_reserve(xfs_trans_t *, uint, uint, uint,
245 uint, uint);
David Chinner20f4ebf2007-02-10 18:36:10 +1100246void xfs_trans_mod_sb(xfs_trans_t *, uint, int64_t);
Dave Chinnerde2a4f52012-06-22 18:50:11 +1000247
248struct xfs_buf *xfs_trans_get_buf_map(struct xfs_trans *tp,
249 struct xfs_buftarg *target,
250 struct xfs_buf_map *map, int nmaps,
251 uint flags);
252
253static inline struct xfs_buf *
254xfs_trans_get_buf(
255 struct xfs_trans *tp,
256 struct xfs_buftarg *target,
257 xfs_daddr_t blkno,
258 int numblks,
259 uint flags)
260{
Dave Chinnerc3f8fc72012-11-12 22:54:01 +1100261 DEFINE_SINGLE_BUF_MAP(map, blkno, numblks);
Dave Chinnerde2a4f52012-06-22 18:50:11 +1000262 return xfs_trans_get_buf_map(tp, target, &map, 1, flags);
263}
264
265int xfs_trans_read_buf_map(struct xfs_mount *mp,
266 struct xfs_trans *tp,
267 struct xfs_buftarg *target,
268 struct xfs_buf_map *map, int nmaps,
269 xfs_buf_flags_t flags,
Dave Chinnerc3f8fc72012-11-12 22:54:01 +1100270 struct xfs_buf **bpp,
Dave Chinner1813dd62012-11-14 17:54:40 +1100271 const struct xfs_buf_ops *ops);
Dave Chinnerde2a4f52012-06-22 18:50:11 +1000272
273static inline int
274xfs_trans_read_buf(
275 struct xfs_mount *mp,
276 struct xfs_trans *tp,
277 struct xfs_buftarg *target,
278 xfs_daddr_t blkno,
279 int numblks,
280 xfs_buf_flags_t flags,
Dave Chinnerc3f8fc72012-11-12 22:54:01 +1100281 struct xfs_buf **bpp,
Dave Chinner1813dd62012-11-14 17:54:40 +1100282 const struct xfs_buf_ops *ops)
Dave Chinnerde2a4f52012-06-22 18:50:11 +1000283{
Dave Chinnerc3f8fc72012-11-12 22:54:01 +1100284 DEFINE_SINGLE_BUF_MAP(map, blkno, numblks);
285 return xfs_trans_read_buf_map(mp, tp, target, &map, 1,
Dave Chinner1813dd62012-11-14 17:54:40 +1100286 flags, bpp, ops);
Dave Chinnerde2a4f52012-06-22 18:50:11 +1000287}
288
Linus Torvalds1da177e2005-04-16 15:20:36 -0700289struct xfs_buf *xfs_trans_getsb(xfs_trans_t *, struct xfs_mount *, int);
290
291void xfs_trans_brelse(xfs_trans_t *, struct xfs_buf *);
292void xfs_trans_bjoin(xfs_trans_t *, struct xfs_buf *);
293void xfs_trans_bhold(xfs_trans_t *, struct xfs_buf *);
Tim Shimminefa092f2005-09-05 08:29:01 +1000294void xfs_trans_bhold_release(xfs_trans_t *, struct xfs_buf *);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700295void xfs_trans_binval(xfs_trans_t *, struct xfs_buf *);
296void xfs_trans_inode_buf(xfs_trans_t *, struct xfs_buf *);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700297void xfs_trans_stale_inode_buf(xfs_trans_t *, struct xfs_buf *);
Dave Chinner5f6bed72013-06-27 16:04:52 +1000298void xfs_trans_ordered_buf(xfs_trans_t *, struct xfs_buf *);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700299void xfs_trans_dquot_buf(xfs_trans_t *, struct xfs_buf *, uint);
300void xfs_trans_inode_alloc_buf(xfs_trans_t *, struct xfs_buf *);
Dave Chinnerdcd79a12010-09-28 12:27:25 +1000301void xfs_trans_ichgtime(struct xfs_trans *, struct xfs_inode *, int);
Christoph Hellwigddc34152011-09-19 15:00:54 +0000302void xfs_trans_ijoin(struct xfs_trans *, struct xfs_inode *, uint);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700303void xfs_trans_log_buf(xfs_trans_t *, struct xfs_buf *, uint, uint);
304void xfs_trans_log_inode(xfs_trans_t *, struct xfs_inode *, uint);
305struct xfs_efi_log_item *xfs_trans_get_efi(xfs_trans_t *, uint);
306void xfs_efi_release(struct xfs_efi_log_item *, uint);
307void xfs_trans_log_efi_extent(xfs_trans_t *,
308 struct xfs_efi_log_item *,
309 xfs_fsblock_t,
310 xfs_extlen_t);
311struct xfs_efd_log_item *xfs_trans_get_efd(xfs_trans_t *,
312 struct xfs_efi_log_item *,
313 uint);
314void xfs_trans_log_efd_extent(xfs_trans_t *,
315 struct xfs_efd_log_item *,
316 xfs_fsblock_t,
317 xfs_extlen_t);
Christoph Hellwigb1037052011-09-19 14:55:51 +0000318int xfs_trans_commit(xfs_trans_t *, uint flags);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700319void xfs_trans_cancel(xfs_trans_t *, int);
David Chinner249a8c12008-02-05 12:13:32 +1100320int xfs_trans_ail_init(struct xfs_mount *);
321void xfs_trans_ail_destroy(struct xfs_mount *);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700322
David Chinnera8272ce2007-11-23 16:28:09 +1100323extern kmem_zone_t *xfs_trans_zone;
Christoph Hellwige98c4142010-06-23 18:11:15 +1000324extern kmem_zone_t *xfs_log_item_desc_zone;
David Chinnera8272ce2007-11-23 16:28:09 +1100325
Linus Torvalds1da177e2005-04-16 15:20:36 -0700326#endif /* __KERNEL__ */
327
Linus Torvalds1da177e2005-04-16 15:20:36 -0700328#endif /* __XFS_TRANS_H__ */