]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - libxfs/xfs.h
libxfs: update to 3.16 kernel code
[thirdparty/xfsprogs-dev.git] / libxfs / xfs.h
1 /*
2 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
4 *
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
7 * published by the Free Software Foundation.
8 *
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.
13 *
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
17 */
18
19 /*
20 * This header is effectively a "namespace multiplexor" for the
21 * user level XFS code. It provides all of the necessary stuff
22 * such that we can build some parts of the XFS kernel code in
23 * user space in a controlled fashion, and translates the names
24 * used in the kernel into the names which libxfs is going to
25 * make available to user tools.
26 *
27 * It should only ever be #include'd by XFS "kernel" code being
28 * compiled in user space.
29 *
30 * Our goals here are to...
31 * o "share" large amounts of complex code between user and
32 * kernel space;
33 * o shield the user tools from changes in the bleeding
34 * edge kernel code, merging source changes when
35 * convenient and not immediately (no symlinks);
36 * o i.e. be able to merge changes to the kernel source back
37 * into the affected user tools in a controlled fashion;
38 * o provide a _minimalist_ life-support system for kernel
39 * code in user land, not the "everything + the kitchen
40 * sink" model which libsim had mutated into;
41 * o allow the kernel code to be completely free of code
42 * specifically there to support the user level build.
43 */
44
45 /*
46 * define a guard and something we can check to determine what include context
47 * we are running from.
48 */
49 #ifndef __LIBXFS_INTERNAL_XFS_H
50 #define __LIBXFS_INTERNAL_XFS_H
51
52 /*
53 * start by remapping all the symbols we expect external users to call
54 * to the libxfs_ namespace. This ensures that all internal symbols are
55 * remapped correctly throughout all the included header files
56 * as well as in the C code.
57 */
58 #define xfs_alloc_fix_freelist libxfs_alloc_fix_freelist
59 #define xfs_attr_get libxfs_attr_get
60 #define xfs_attr_set libxfs_attr_set
61 #define xfs_attr_remove libxfs_attr_remove
62 #define xfs_rtfree_extent libxfs_rtfree_extent
63
64 #define xfs_fs_repair_cmn_err libxfs_fs_repair_cmn_err
65 #define xfs_fs_cmn_err libxfs_fs_cmn_err
66
67 #define xfs_bmap_finish libxfs_bmap_finish
68 #define xfs_trans_ichgtime libxfs_trans_ichgtime
69 #define xfs_mod_incore_sb libxfs_mod_incore_sb
70
71 #define xfs_trans_alloc libxfs_trans_alloc
72 #define xfs_trans_add_item libxfs_trans_add_item
73 #define xfs_trans_bhold libxfs_trans_bhold
74 #define xfs_trans_binval libxfs_trans_binval
75 #define xfs_trans_bjoin libxfs_trans_bjoin
76 #define xfs_trans_brelse libxfs_trans_brelse
77 #define xfs_trans_commit libxfs_trans_commit
78 #define xfs_trans_cancel libxfs_trans_cancel
79 #define xfs_trans_del_item libxfs_trans_del_item
80 #define xfs_trans_dup libxfs_trans_dup
81 #define xfs_trans_get_buf libxfs_trans_get_buf
82 #define xfs_trans_getsb libxfs_trans_getsb
83 #define xfs_trans_iget libxfs_trans_iget
84 #define xfs_trans_ijoin libxfs_trans_ijoin
85 #define xfs_trans_ijoin_ref libxfs_trans_ijoin_ref
86 #define xfs_trans_init libxfs_trans_init
87 #define xfs_trans_inode_alloc_buf libxfs_trans_inode_alloc_buf
88 #define xfs_trans_log_buf libxfs_trans_log_buf
89 #define xfs_trans_log_inode libxfs_trans_log_inode
90 #define xfs_trans_mod_sb libxfs_trans_mod_sb
91 #define xfs_trans_read_buf libxfs_trans_read_buf
92 #define xfs_trans_read_buf_map libxfs_trans_read_buf_map
93 #define xfs_trans_roll libxfs_trans_roll
94 #define xfs_trans_get_buf_map libxfs_trans_get_buf_map
95 #define xfs_trans_reserve libxfs_trans_reserve
96
97 /* xfs_attr_leaf.h */
98 #define xfs_attr_leaf_newentsize libxfs_attr_leaf_newentsize
99
100 /* xfs_bit.h */
101 #define xfs_highbit32 libxfs_highbit32
102 #define xfs_highbit64 libxfs_highbit64
103
104 /* xfs_bmap.h */
105 #define xfs_bmap_cancel libxfs_bmap_cancel
106 #define xfs_bmap_last_offset libxfs_bmap_last_offset
107 #define xfs_bmapi_write libxfs_bmapi_write
108 #define xfs_bmapi_read libxfs_bmapi_read
109 #define xfs_bunmapi libxfs_bunmapi
110
111 /* xfs_bmap_btree.h */
112 #define xfs_bmbt_get_all libxfs_bmbt_get_all
113
114 /* xfs_da_btree.h */
115 #define xfs_da_brelse libxfs_da_brelse
116 #define xfs_da_hashname libxfs_da_hashname
117 #define xfs_da_shrink_inode libxfs_da_shrink_inode
118 #define xfs_da_read_buf libxfs_da_read_buf
119
120 /* xfs_dir2.h */
121 #define xfs_dir_createname libxfs_dir_createname
122 #define xfs_dir_init libxfs_dir_init
123 #define xfs_dir_lookup libxfs_dir_lookup
124 #define xfs_dir_replace libxfs_dir_replace
125 #define xfs_dir2_isblock libxfs_dir2_isblock
126 #define xfs_dir2_isleaf libxfs_dir2_isleaf
127
128 /* xfs_dir2_data.h */
129 #define xfs_dir2_data_freescan libxfs_dir2_data_freescan
130 #define xfs_dir2_data_log_entry libxfs_dir2_data_log_entry
131 #define xfs_dir2_data_log_header libxfs_dir2_data_log_header
132 #define xfs_dir2_data_make_free libxfs_dir2_data_make_free
133 #define xfs_dir2_data_use_free libxfs_dir2_data_use_free
134 #define xfs_dir2_shrink_inode libxfs_dir2_shrink_inode
135
136 /* xfs_inode.h */
137 #define xfs_dinode_from_disk libxfs_dinode_from_disk
138 #define xfs_dinode_to_disk libxfs_dinode_to_disk
139 #define xfs_dinode_calc_crc libxfs_dinode_calc_crc
140 #define xfs_idata_realloc libxfs_idata_realloc
141 #define xfs_idestroy_fork libxfs_idestroy_fork
142
143 #define xfs_dinode_verify libxfs_dinode_verify
144
145 /* xfs_sb.h */
146 #define xfs_mod_sb libxfs_mod_sb
147 #define xfs_sb_from_disk libxfs_sb_from_disk
148 #define xfs_sb_quota_from_disk libxfs_sb_quota_from_disk
149 #define xfs_sb_to_disk libxfs_sb_to_disk
150
151 /* xfs_symlink.h */
152 #define xfs_symlink_blocks libxfs_symlink_blocks
153 #define xfs_symlink_hdr_ok libxfs_symlink_hdr_ok
154
155 /* xfs_trans_resv.h */
156 #define xfs_trans_resv_calc libxfs_trans_resv_calc
157
158
159 /*
160 * Now we've renamed and mapped everything, include the rest of the external
161 * libxfs headers.
162 */
163 #include <xfs/libxfs.h>
164 #include "xfs_dir2_priv.h"
165
166 #undef ASSERT
167 #define ASSERT(ex) assert(ex)
168
169 typedef __uint32_t uint_t;
170 typedef __uint32_t inst_t; /* an instruction */
171
172 /*
173 * Argument structure for xfs_bmap_alloc.
174 */
175 typedef struct xfs_bmalloca {
176 xfs_fsblock_t *firstblock; /* i/o first block allocated */
177 struct xfs_bmap_free *flist; /* bmap freelist */
178 struct xfs_trans *tp; /* transaction pointer */
179 struct xfs_inode *ip; /* incore inode pointer */
180 struct xfs_bmbt_irec prev; /* extent before the new one */
181 struct xfs_bmbt_irec got; /* extent after, or delayed */
182
183 xfs_fileoff_t offset; /* offset in file filling in */
184 xfs_extlen_t length; /* i/o length asked/allocated */
185 xfs_fsblock_t blkno; /* starting block of new extent */
186
187 struct xfs_btree_cur *cur; /* btree cursor */
188 xfs_extnum_t idx; /* current extent index */
189 int nallocs;/* number of extents alloc'd */
190 int logflags;/* flags for transaction logging */
191
192 xfs_extlen_t total; /* total blocks needed for xaction */
193 xfs_extlen_t minlen; /* minimum allocation size (blocks) */
194 xfs_extlen_t minleft; /* amount must be left after alloc */
195 char eof; /* set if allocating past last extent */
196 char wasdel; /* replacing a delayed allocation */
197 char userdata;/* set if is user data */
198 char aeof; /* allocated space at eof */
199 char conv; /* overwriting unwritten extents */
200 char stack_switch;
201 int flags;
202 } xfs_bmalloca_t;
203
204 #define xfs_bmapi_allocate __xfs_bmapi_allocate
205
206 #ifndef EWRONGFS
207 #define EWRONGFS EINVAL
208 #endif
209
210 #define xfs_error_level 0
211
212 #define STATIC static
213
214 #define ATTR_ROOT LIBXFS_ATTR_ROOT
215 #define ATTR_SECURE LIBXFS_ATTR_SECURE
216 #define ATTR_CREATE LIBXFS_ATTR_CREATE
217 #define ATTR_REPLACE LIBXFS_ATTR_REPLACE
218 #define ATTR_KERNOTIME 0
219 #define ATTR_KERNOVAL 0
220
221 #define IHOLD(ip) ((void) 0)
222
223 #define XFS_IGET_CREATE 0x1
224 #define XFS_IGET_UNTRUSTED 0x2
225
226 /* stop unused var warnings by assigning mp to itself */
227 #define XFS_CORRUPTION_ERROR(e,l,mp,m) do { \
228 (mp) = (mp); \
229 cmn_err(CE_ALERT, "%s: XFS_CORRUPTION_ERROR", (e)); \
230 } while (0)
231
232 #define XFS_ERROR_REPORT(e,l,mp) do { \
233 (mp) = (mp); \
234 cmn_err(CE_ALERT, "%s: XFS_ERROR_REPORT", (e)); \
235 } while (0)
236
237 #define XFS_QM_DQATTACH(mp,ip,flags) 0
238 #define XFS_ERROR(e) (e)
239 #define XFS_ERRLEVEL_LOW 1
240 #define XFS_FORCED_SHUTDOWN(mp) 0
241 #define XFS_ILOCK_EXCL 0
242 #define XFS_STATS_INC(count) do { } while (0)
243 #define XFS_STATS_DEC(count, x) do { } while (0)
244 #define XFS_STATS_ADD(count, x) do { } while (0)
245 #define XFS_TRANS_MOD_DQUOT_BYINO(mp,tp,ip,field,delta) do { } while (0)
246 #define XFS_TRANS_RESERVE_QUOTA_NBLKS(mp,tp,ip,nblks,ninos,fl) 0
247 #define XFS_TRANS_UNRESERVE_QUOTA_NBLKS(mp,tp,ip,nblks,ninos,fl) 0
248 #define XFS_TEST_ERROR(expr,a,b,c) ( expr )
249 #define XFS_WANT_CORRUPTED_GOTO(expr,l) \
250 { if (!(expr)) { error = EFSCORRUPTED; goto l; } }
251 #define XFS_WANT_CORRUPTED_RETURN(expr) \
252 { if (!(expr)) { return EFSCORRUPTED; } }
253
254 #ifdef __GNUC__
255 #define __return_address __builtin_return_address(0)
256 #endif
257
258 #define XFS_DQUOT_CLUSTER_SIZE_FSB (xfs_filblks_t)1
259
260 /* miscellaneous kernel routines not in user space */
261 #define down_read(a) ((void) 0)
262 #define up_read(a) ((void) 0)
263 #define spin_lock_init(a) ((void) 0)
264 #define spin_lock(a) ((void) 0)
265 #define spin_unlock(a) ((void) 0)
266 #define likely(x) (x)
267 #define unlikely(x) (x)
268 #define rcu_read_lock() ((void) 0)
269 #define rcu_read_unlock() ((void) 0)
270
271 /*
272 * prandom_u32 is used for di_gen inode allocation, it must be zero for libxfs
273 * or all sorts of badness can occur!
274 */
275 #define prandom_u32() 0
276
277 #define PAGE_CACHE_SIZE getpagesize()
278
279 static inline int __do_div(unsigned long long *n, unsigned base)
280 {
281 int __res;
282 __res = (int)(((unsigned long) *n) % (unsigned) base);
283 *n = ((unsigned long) *n) / (unsigned) base;
284 return __res;
285 }
286
287 #define do_div(n,base) (__do_div((unsigned long long *)&(n), (base)))
288 #define do_mod(a, b) ((a) % (b))
289 #define rol32(x,y) (((x) << (y)) | ((x) >> (32 - (y))))
290
291 #define min_t(type,x,y) \
292 ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })
293 #define max_t(type,x,y) \
294 ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; })
295
296
297
298 static inline __attribute__((const))
299 int is_power_of_2(unsigned long n)
300 {
301 return (n != 0 && ((n & (n - 1)) == 0));
302 }
303
304 /*
305 * xfs_iroundup: round up argument to next power of two
306 */
307 static inline uint
308 roundup_pow_of_two(uint v)
309 {
310 int i;
311 uint m;
312
313 if ((v & (v - 1)) == 0)
314 return v;
315 ASSERT((v & 0x80000000) == 0);
316 if ((v & (v + 1)) == 0)
317 return v + 1;
318 for (i = 0, m = 1; i < 31; i++, m <<= 1) {
319 if (v & m)
320 continue;
321 v |= m;
322 if ((v & (v + 1)) == 0)
323 return v + 1;
324 }
325 ASSERT(0);
326 return 0;
327 }
328
329 static inline __uint64_t
330 roundup_64(__uint64_t x, __uint32_t y)
331 {
332 x += y - 1;
333 do_div(x, y);
334 return x * y;
335 }
336
337 /* buffer management */
338 #define XFS_BUF_LOCK 0
339 #define XFS_BUF_TRYLOCK 0
340 #define XBF_LOCK XFS_BUF_LOCK
341 #define XBF_TRYLOCK XFS_BUF_TRYLOCK
342 #define XBF_DONT_BLOCK 0
343 #define XBF_UNMAPPED 0
344 #define XBF_DONE 0
345 #define XFS_BUF_GETERROR(bp) 0
346 #define XFS_BUF_DONE(bp) ((bp)->b_flags |= LIBXFS_B_UPTODATE)
347 #define XFS_BUF_ISDONE(bp) ((bp)->b_flags & LIBXFS_B_UPTODATE)
348 #define xfs_buf_stale(bp) ((bp)->b_flags |= LIBXFS_B_STALE)
349 #define XFS_BUF_UNDELAYWRITE(bp) ((bp)->b_flags &= ~LIBXFS_B_DIRTY)
350 #define XFS_BUF_SET_VTYPE(a,b) ((void) 0)
351 #define XFS_BUF_SET_VTYPE_REF(a,b,c) ((void) 0)
352 #define XFS_BUF_SET_BDSTRAT_FUNC(a,b) ((void) 0)
353
354 /* avoid gcc warning */
355 #define xfs_incore(bt,blkno,len,lockit) ({ \
356 typeof(blkno) __foo = (blkno); \
357 typeof(len) __bar = (len); \
358 (blkno) = __foo; \
359 (len) = __bar; /* no set-but-unused warning */ \
360 NULL; \
361 })
362 #define xfs_buf_relse(bp) libxfs_putbuf(bp)
363 #define xfs_buf_get(devp,blkno,len,f) (libxfs_getbuf((devp), (blkno), (len)))
364 #define xfs_bwrite(bp) libxfs_writebuf((bp), 0)
365 #define xfs_buf_delwri_queue(bp, bl) libxfs_writebuf((bp), 0)
366
367 #define XBRW_READ LIBXFS_BREAD
368 #define XBRW_WRITE LIBXFS_BWRITE
369 #define xfs_buf_iomove(bp,off,len,data,f) libxfs_iomove(bp,off,len,data,f)
370 #define xfs_buf_zero(bp,off,len) libxfs_iomove(bp,off,len,0,LIBXFS_BZERO)
371
372 /* mount stuff */
373 #define XFS_MOUNT_32BITINODES LIBXFS_MOUNT_32BITINODES
374 #define XFS_MOUNT_ATTR2 LIBXFS_MOUNT_ATTR2
375 #define XFS_MOUNT_SMALL_INUMS 0 /* ignored in userspace */
376 #define XFS_MOUNT_WSYNC 0 /* ignored in userspace */
377 #define XFS_MOUNT_NOALIGN 0 /* ignored in userspace */
378 #define XFS_MOUNT_IKEEP 0 /* ignored in userspace */
379 #define XFS_MOUNT_SWALLOC 0 /* ignored in userspace */
380 #define XFS_MOUNT_RDONLY 0 /* ignored in userspace */
381
382 #define xfs_icsb_modify_counters(mp, field, delta, rsvd) \
383 xfs_mod_incore_sb(mp, field, delta, rsvd)
384
385
386 #define xfs_trans_get_block_res(tp) 1
387 #define xfs_trans_set_sync(tp) ((void) 0)
388 #define xfs_trans_ordered_buf(tp, bp) ((void) 0)
389 #define xfs_trans_agblocks_delta(tp, d)
390 #define xfs_trans_agflist_delta(tp, d)
391 #define xfs_trans_agbtree_delta(tp, d)
392 #define xfs_trans_buf_set_type(tp, bp, t) ({ \
393 int __t = (t); \
394 __t = __t; /* no set-but-unused warning */ \
395 })
396
397 #define xfs_trans_buf_copy_type(dbp, sbp)
398
399 /* no readahead, need to avoid set-but-unused var warnings. */
400 #define xfs_buf_readahead(a,d,c,ops) ({ \
401 xfs_daddr_t __d = d; \
402 __d = __d; /* no set-but-unused warning */ \
403 })
404 #define xfs_buf_readahead_map(a,b,c,ops) ((void) 0) /* no readahead */
405 #define xfs_buftrace(x,y) ((void) 0) /* debug only */
406
407 #define xfs_cmn_err(tag,level,mp,fmt,args...) cmn_err(level,fmt, ## args)
408 #define xfs_warn(mp,fmt,args...) cmn_err(CE_WARN,fmt, ## args)
409 #define xfs_alert(mp,fmt,args...) cmn_err(CE_ALERT,fmt, ## args)
410 #define xfs_alert_tag(mp,tag,fmt,args...) cmn_err(CE_ALERT,fmt, ## args)
411
412 #define xfs_dir2_trace_args(where, args) ((void) 0)
413 #define xfs_dir2_trace_args_b(where, args, bp) ((void) 0)
414 #define xfs_dir2_trace_args_bb(where, args, lbp, dbp) ((void) 0)
415 #define xfs_dir2_trace_args_bibii(where, args, bs, ss, bd, sd, c) ((void) 0)
416 #define xfs_dir2_trace_args_db(where, args, db, bp) ((void) 0)
417 #define xfs_dir2_trace_args_i(where, args, i) ((void) 0)
418 #define xfs_dir2_trace_args_s(where, args, s) ((void) 0)
419 #define xfs_dir2_trace_args_sb(where, args, s, bp) ((void) 0)
420 #define xfs_sort qsort
421
422 #define xfs_icsb_reinit_counters(mp) do { } while (0)
423 #define xfs_initialize_perag_icache(pag) ((void) 0)
424
425 #define xfs_ilock(ip,mode) ((void) 0)
426 #define xfs_ilock_nowait(ip,mode) ((void) 0)
427 #define xfs_ilock_demote(ip,mode) ((void) 0)
428 #define xfs_ilock_data_map_shared(ip) (0)
429 #define xfs_ilock_attr_map_shared(ip) (0)
430 #define xfs_iunlock(ip,mode) ({ \
431 typeof(mode) __mode = mode; \
432 __mode = __mode; /* no set-but-unused warning */ \
433 })
434 #define __xfs_flock(ip) ((void) 0)
435
436 /* space allocation */
437 #define xfs_extent_busy_reuse(mp,ag,bno,len,user) ((void) 0)
438 #define xfs_extent_busy_insert(tp,ag,bno,len,flags) ((void) 0)
439 #define xfs_extent_busy_trim(args,fbno,flen,bno,len) \
440 do { \
441 *(bno) = (fbno); \
442 *(len) = (flen); \
443 } while (0)
444
445 /* avoid unused variable warning */
446 #define xfs_alloc_busy_insert(tp,ag,b,len) ({ \
447 xfs_agnumber_t __foo = ag; \
448 __foo = 0; \
449 })
450
451 #define xfs_rotorstep 1
452 #define xfs_bmap_rtalloc(a) (ENOSYS)
453 #define xfs_rtpick_extent(mp,tp,len,p) (ENOSYS)
454 #define xfs_get_extsz_hint(ip) (0)
455 #define xfs_inode_is_filestream(ip) (0)
456 #define xfs_filestream_lookup_ag(ip) (0)
457 #define xfs_filestream_new_ag(ip,ag) (0)
458
459 #define xfs_log_force(mp,flags) ((void) 0)
460 #define XFS_LOG_SYNC 1
461
462 /* quota bits */
463 #define xfs_trans_mod_dquot_byino(t,i,f,d) ((void) 0)
464 #define xfs_trans_reserve_quota_nblks(t,i,b,n,f) (0)
465 #define xfs_trans_unreserve_quota_nblks(t,i,b,n,f) ((void) 0)
466 #define xfs_qm_dqattach(i,f) (0)
467
468 #define uuid_copy(s,d) platform_uuid_copy((s),(d))
469 #define uuid_equal(s,d) (platform_uuid_compare((s),(d)) == 0)
470
471 #define xfs_icreate_log(tp, agno, agbno, cnt, isize, len, gen) ((void) 0)
472 #define xfs_sb_validate_fsb_count(sbp, nblks) (0)
473
474 /*
475 * Prototypes for kernel static functions that are aren't in their
476 * associated header files
477 */
478
479 /* xfs_attr.c */
480 int xfs_attr_rmtval_get(struct xfs_da_args *);
481
482 /* xfs_bmap.c */
483 void xfs_bmap_del_free(xfs_bmap_free_t *, xfs_bmap_free_item_t *,
484 xfs_bmap_free_item_t *);
485
486 /*
487 * For regular files we only update the on-disk filesize when actually
488 * writing data back to disk. Until then only the copy in the VFS inode
489 * is uptodate.
490 */
491 static inline xfs_fsize_t XFS_ISIZE(struct xfs_inode *ip)
492 {
493 if (S_ISREG(ip->i_d.di_mode))
494 return ip->i_size;
495 return ip->i_d.di_size;
496 }
497
498 /* xfs_mount.c */
499 int xfs_initialize_perag_data(xfs_mount_t *, xfs_agnumber_t);
500 void xfs_mount_common(xfs_mount_t *, xfs_sb_t *);
501
502 /*
503 * logitem.c and trans.c prototypes
504 */
505 void xfs_trans_init(struct xfs_mount *);
506 int xfs_trans_roll(struct xfs_trans **, struct xfs_inode *);
507
508 /* xfs_trans_item.c */
509 void xfs_trans_add_item(struct xfs_trans *, struct xfs_log_item *);
510 void xfs_trans_del_item(struct xfs_log_item *);
511 void xfs_trans_free_items(struct xfs_trans *, int);
512
513 /* xfs_inode_item.c */
514 void xfs_inode_item_init (xfs_inode_t *, xfs_mount_t *);
515
516 /* xfs_buf_item.c */
517 void xfs_buf_item_init (xfs_buf_t *, xfs_mount_t *);
518 void xfs_buf_item_log (xfs_buf_log_item_t *, uint, uint);
519
520 /* xfs_trans_buf.c */
521 xfs_buf_t *xfs_trans_buf_item_match(xfs_trans_t *, struct xfs_buftarg *,
522 struct xfs_buf_map *, int);
523
524 /* local source files */
525 int xfs_mod_incore_sb(xfs_mount_t *, xfs_sb_field_t, int64_t, int);
526 void xfs_trans_mod_sb(xfs_trans_t *, uint, long);
527 void xfs_trans_init(struct xfs_mount *);
528 int xfs_trans_roll(struct xfs_trans **, struct xfs_inode *);
529 void xfs_verifier_error(struct xfs_buf *bp);
530
531 #endif /* __LIBXFS_INTERNAL_XFS_H */