]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - libxfs/libxfs_priv.h
xfs: move inode fork verifiers to xfs_dinode_verify
[thirdparty/xfsprogs-dev.git] / libxfs / libxfs_priv.h
CommitLineData
2bd0ea18 1/*
da23017d
NS
2 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
2bd0ea18 4 *
da23017d
NS
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
2bd0ea18
NS
7 * published by the Free Software Foundation.
8 *
da23017d
NS
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.
2bd0ea18 13 *
da23017d
NS
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
2bd0ea18
NS
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.
dfc130f3 29 *
2bd0ea18
NS
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
f616e2bf
DC
45/*
46 * define a guard and something we can check to determine what include context
47 * we are running from.
48 */
b626fb59
DC
49#ifndef __LIBXFS_INTERNAL_XFS_H__
50#define __LIBXFS_INTERNAL_XFS_H__
f616e2bf 51
e515cca1 52#include "libxfs_api_defs.h"
6b803e5a 53#include "platform_defs.h"
dcabd4e7 54#include "xfs.h"
b626fb59 55
6b803e5a
CH
56#include "list.h"
57#include "hlist.h"
58#include "cache.h"
59#include "bitops.h"
60#include "kmem.h"
61#include "radix-tree.h"
62#include "atomic.h"
b626fb59 63
6b803e5a
CH
64#include "xfs_types.h"
65#include "xfs_arch.h"
b626fb59 66
6b803e5a 67#include "xfs_fs.h"
b626fb59
DC
68
69/* CRC stuff, buffer API dependent on it */
70extern uint32_t crc32_le(uint32_t crc, unsigned char const *p, size_t len);
71extern uint32_t crc32c_le(uint32_t crc, unsigned char const *p, size_t len);
72
73#define crc32(c,p,l) crc32_le((c),(unsigned char const *)(p),(l))
74#define crc32c(c,p,l) crc32c_le((c),(unsigned char const *)(p),(l))
75
6b803e5a 76#include "xfs_cksum.h"
b626fb59
DC
77
78/*
79 * This mirrors the kernel include for xfs_buf.h - it's implicitly included in
80 * every files via a similar include in the kernel xfs_linux.h.
81 */
897853d5 82#include "libxfs_io.h"
b626fb59
DC
83
84/* for all the support code that uses progname in error messages */
85extern char *progname;
2bd0ea18 86
a2ceac1f
DC
87#undef ASSERT
88#define ASSERT(ex) assert(ex)
5e656dbb 89
dc9b1f58
CH
90/*
91 * We have no need for the "linux" dev_t in userspace, so these
92 * are no-ops, and an xfs_dev_t is stored in VFS_I(ip)->i_rdev
93 */
94#define xfs_to_linux_dev_t(dev) dev
95#define linux_to_xfs_dev_t(dev) dev
551174eb 96
a2ceac1f
DC
97#ifndef EWRONGFS
98#define EWRONGFS EINVAL
99#endif
5e656dbb 100
56b2de80 101#define xfs_error_level 0
5e656dbb
BN
102
103#define STATIC static
5e656dbb 104
b626fb59
DC
105/* XXX: need to push these out to make LIBXFS_ATTR defines */
106#define ATTR_ROOT 0x0002
107#define ATTR_SECURE 0x0008
108#define ATTR_CREATE 0x0010
109#define ATTR_REPLACE 0x0020
5e656dbb
BN
110#define ATTR_KERNOTIME 0
111#define ATTR_KERNOVAL 0
112
5dcd1db5
DC
113#define XFS_IGET_CREATE 0x1
114#define XFS_IGET_UNTRUSTED 0x2
115
b626fb59
DC
116extern void cmn_err(int, char *, ...);
117enum ce { CE_DEBUG, CE_CONT, CE_NOTE, CE_WARN, CE_ALERT, CE_PANIC };
118
119#define xfs_notice(mp,fmt,args...) cmn_err(CE_NOTE,fmt, ## args)
120#define xfs_warn(mp,fmt,args...) cmn_err(CE_WARN,fmt, ## args)
121#define xfs_hex_dump(d,n) ((void) 0)
122
6f4c54a4 123#define xfs_force_shutdown(d,n) ((void) 0)
b626fb59 124
a2ceac1f 125/* stop unused var warnings by assigning mp to itself */
e0607266
DC
126#define XFS_CORRUPTION_ERROR(e,l,mp,m) do { \
127 (mp) = (mp); \
128 cmn_err(CE_ALERT, "%s: XFS_CORRUPTION_ERROR", (e)); \
129} while (0)
130
131#define XFS_ERROR_REPORT(e,l,mp) do { \
132 (mp) = (mp); \
133 cmn_err(CE_ALERT, "%s: XFS_ERROR_REPORT", (e)); \
134} while (0)
135
5e656dbb
BN
136#define XFS_ERRLEVEL_LOW 1
137#define XFS_FORCED_SHUTDOWN(mp) 0
138#define XFS_ILOCK_EXCL 0
ece930fa
CH
139#define XFS_STATS_INC(mp, count) do { (mp) = (mp); } while (0)
140#define XFS_STATS_DEC(mp, count, x) do { (mp) = (mp); } while (0)
141#define XFS_STATS_ADD(mp, count, x) do { (mp) = (mp); } while (0)
e2a190dd 142#define XFS_TEST_ERROR(expr,a,b) ( expr )
23639f77
ES
143#define XFS_WANT_CORRUPTED_GOTO(mp, expr, l) \
144{ \
145 if (!(expr)) { \
146 if ((mp)->m_flags & LIBXFS_MOUNT_WANT_CORRUPTED) \
147 printf("WANT_CORRUPTED_GOTO at %s:%d\n", \
148 __func__, __LINE__); \
149 error = -EFSCORRUPTED; \
150 goto l; \
151 } \
152}
153#define XFS_WANT_CORRUPTED_RETURN(mp, expr) \
154{ \
155 if (!(expr)) { \
156 if ((mp)->m_flags & LIBXFS_MOUNT_WANT_CORRUPTED) \
157 printf("WANT_CORRUPTED_RETURN at %s:%d\n", \
158 __func__, __LINE__); \
159 return -EFSCORRUPTED; \
160 } \
161}
5e656dbb 162
5e656dbb
BN
163#ifdef __GNUC__
164#define __return_address __builtin_return_address(0)
b47beff8
DW
165
166/*
167 * Return the address of a label. Use barrier() so that the optimizer
168 * won't reorder code to refactor the error jumpouts into a single
169 * return, which throws off the reported address.
170 */
171#define __this_address ({ __label__ __here; __here: barrier(); &&__here; })
172/* Optimization barrier */
173
174/* The "volatile" is due to gcc bugs */
175#define barrier() __asm__ __volatile__("": : :"memory")
176#endif
177
178/* Optimization barrier */
179#ifndef barrier
180# define barrier() __memory_barrier()
5e656dbb
BN
181#endif
182
364e85ec
DC
183#define XFS_DQUOT_CLUSTER_SIZE_FSB (xfs_filblks_t)1
184
5e656dbb
BN
185/* miscellaneous kernel routines not in user space */
186#define down_read(a) ((void) 0)
187#define up_read(a) ((void) 0)
188#define spin_lock_init(a) ((void) 0)
189#define spin_lock(a) ((void) 0)
190#define spin_unlock(a) ((void) 0)
191#define likely(x) (x)
192#define unlikely(x) (x)
56b2de80
DC
193#define rcu_read_lock() ((void) 0)
194#define rcu_read_unlock() ((void) 0)
c1587ecf
CH
195/* Need to be able to handle this bare or in control flow */
196static inline bool WARN_ON_ONCE(bool expr) {
197 return (expr);
198}
19ebedcf 199
cbf3beaa
GW
200#define percpu_counter_read(x) (*x)
201#define percpu_counter_read_positive(x) ((*x) > 0 ? (*x) : 0)
202#define percpu_counter_sum(x) (*x)
5e656dbb 203
2bd0ea18 204/*
49f693fa 205 * prandom_u32 is used for di_gen inode allocation, it must be zero for libxfs
5e656dbb 206 * or all sorts of badness can occur!
2bd0ea18 207 */
49f693fa 208#define prandom_u32() 0
2bd0ea18 209
b2327e1a 210#define PAGE_SIZE getpagesize()
2bd0ea18 211
5e656dbb
BN
212static inline int __do_div(unsigned long long *n, unsigned base)
213{
214 int __res;
215 __res = (int)(((unsigned long) *n) % (unsigned) base);
216 *n = ((unsigned long) *n) / (unsigned) base;
217 return __res;
218}
219
220#define do_div(n,base) (__do_div((unsigned long long *)&(n), (base)))
221#define do_mod(a, b) ((a) % (b))
222#define rol32(x,y) (((x) << (y)) | ((x) >> (32 - (y))))
2bd0ea18 223
5e656dbb
BN
224#define min_t(type,x,y) \
225 ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })
226#define max_t(type,x,y) \
227 ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; })
57c9fccb 228
91eba724 229
7338c4b8
BF
230#define __round_mask(x, y) ((__typeof__(x))((y)-1))
231#define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1)
232#define round_down(x, y) ((x) & ~__round_mask(x, y))
233#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
234
235/*
236 * Handling for kernel bitmap types.
237 */
238#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, NBBY * sizeof(long))
239#define DECLARE_BITMAP(name,bits) \
240 unsigned long name[BITS_TO_LONGS(bits)]
241#define BITMAP_FIRST_WORD_MASK(start) (~0UL << ((start) & (BITS_PER_LONG - 1)))
242
243/*
244 * This is a common helper function for find_next_bit and
245 * find_next_zero_bit. The difference is the "invert" argument, which
246 * is XORed with each fetched word before searching it for one bits.
247 */
248static inline unsigned long
249_find_next_bit(const unsigned long *addr, unsigned long nbits,
250 unsigned long start, unsigned long invert)
251{
252 unsigned long tmp;
253
254 if (!nbits || start >= nbits)
255 return nbits;
256
257 tmp = addr[start / BITS_PER_LONG] ^ invert;
258
259 /* Handle 1st word. */
260 tmp &= BITMAP_FIRST_WORD_MASK(start);
261 start = round_down(start, BITS_PER_LONG);
262
263 while (!tmp) {
264 start += BITS_PER_LONG;
265 if (start >= nbits)
266 return nbits;
267
268 tmp = addr[start / BITS_PER_LONG] ^ invert;
269 }
270
271 return min(start + ffs(tmp), nbits);
272}
273
274/*
275 * Find the next set bit in a memory region.
276 */
277static inline unsigned long
278find_next_bit(const unsigned long *addr, unsigned long size,
279 unsigned long offset)
280{
281 return _find_next_bit(addr, size, offset, 0UL);
282}
283static inline unsigned long
284find_next_zero_bit(const unsigned long *addr, unsigned long size,
285 unsigned long offset)
286{
287 return _find_next_bit(addr, size, offset, ~0UL);
288}
289#define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0)
91eba724 290
5e656dbb
BN
291static inline __attribute__((const))
292int is_power_of_2(unsigned long n)
293{
294 return (n != 0 && ((n & (n - 1)) == 0));
295}
2bd0ea18
NS
296
297/*
5e656dbb 298 * xfs_iroundup: round up argument to next power of two
2bd0ea18 299 */
5e656dbb
BN
300static inline uint
301roundup_pow_of_two(uint v)
302{
303 int i;
304 uint m;
305
306 if ((v & (v - 1)) == 0)
307 return v;
308 ASSERT((v & 0x80000000) == 0);
309 if ((v & (v + 1)) == 0)
310 return v + 1;
311 for (i = 0, m = 1; i < 31; i++, m <<= 1) {
312 if (v & m)
313 continue;
314 v |= m;
315 if ((v & (v + 1)) == 0)
316 return v + 1;
317 }
318 ASSERT(0);
319 return 0;
320}
2bd0ea18 321
14f8b681
DW
322static inline uint64_t
323roundup_64(uint64_t x, uint32_t y)
88cd79be
DC
324{
325 x += y - 1;
326 do_div(x, y);
327 return x * y;
328}
329
2bd0ea18 330/* buffer management */
e8a1c983 331#define XBF_TRYLOCK 0
a2ceac1f 332#define XBF_UNMAPPED 0
e9d35108 333#define XBF_DONE 0
a2ceac1f 334#define xfs_buf_stale(bp) ((bp)->b_flags |= LIBXFS_B_STALE)
f1b058f9 335#define XFS_BUF_UNDELAYWRITE(bp) ((bp)->b_flags &= ~LIBXFS_B_DIRTY)
2bd0ea18 336#define XFS_BUF_SET_BDSTRAT_FUNC(a,b) ((void) 0)
5e656dbb 337
9d6fabc0
DC
338/* avoid gcc warning */
339#define xfs_incore(bt,blkno,len,lockit) ({ \
340 typeof(blkno) __foo = (blkno); \
6bddecbc 341 typeof(len) __bar = (len); \
9d6fabc0 342 (blkno) = __foo; \
6bddecbc 343 (len) = __bar; /* no set-but-unused warning */ \
9d6fabc0
DC
344 NULL; \
345})
2bd0ea18 346#define xfs_buf_relse(bp) libxfs_putbuf(bp)
75c8b434 347#define xfs_buf_get(devp,blkno,len,f) (libxfs_getbuf((devp), (blkno), (len)))
9d6fabc0 348#define xfs_bwrite(bp) libxfs_writebuf((bp), 0)
e9d35108 349#define xfs_buf_delwri_queue(bp, bl) libxfs_writebuf((bp), 0)
57c9fccb 350
56b2de80
DC
351#define XBRW_READ LIBXFS_BREAD
352#define XBRW_WRITE LIBXFS_BWRITE
353#define xfs_buf_iomove(bp,off,len,data,f) libxfs_iomove(bp,off,len,data,f)
354#define xfs_buf_zero(bp,off,len) libxfs_iomove(bp,off,len,0,LIBXFS_BZERO)
2bd0ea18 355
5e656dbb
BN
356/* mount stuff */
357#define XFS_MOUNT_32BITINODES LIBXFS_MOUNT_32BITINODES
358#define XFS_MOUNT_ATTR2 LIBXFS_MOUNT_ATTR2
359#define XFS_MOUNT_SMALL_INUMS 0 /* ignored in userspace */
360#define XFS_MOUNT_WSYNC 0 /* ignored in userspace */
361#define XFS_MOUNT_NOALIGN 0 /* ignored in userspace */
3439d03a 362#define XFS_MOUNT_IKEEP 0 /* ignored in userspace */
ff105f75
DC
363#define XFS_MOUNT_SWALLOC 0 /* ignored in userspace */
364#define XFS_MOUNT_RDONLY 0 /* ignored in userspace */
5e656dbb 365
5e656dbb 366
5e656dbb
BN
367#define xfs_trans_set_sync(tp) ((void) 0)
368#define xfs_trans_agblocks_delta(tp, d)
369#define xfs_trans_agflist_delta(tp, d)
370#define xfs_trans_agbtree_delta(tp, d)
6bddecbc
DC
371#define xfs_trans_buf_set_type(tp, bp, t) ({ \
372 int __t = (t); \
373 __t = __t; /* no set-but-unused warning */ \
fca3ed92 374 tp = tp; /* no set-but-unused warning */ \
6bddecbc
DC
375})
376
8b4dc4a9 377#define xfs_trans_buf_copy_type(dbp, sbp)
5e656dbb 378
10851b18
DC
379/* no readahead, need to avoid set-but-unused var warnings. */
380#define xfs_buf_readahead(a,d,c,ops) ({ \
381 xfs_daddr_t __d = d; \
382 __d = __d; /* no set-but-unused warning */ \
383})
a2ceac1f 384#define xfs_buf_readahead_map(a,b,c,ops) ((void) 0) /* no readahead */
5e656dbb 385
a2ceac1f
DC
386#define xfs_warn(mp,fmt,args...) cmn_err(CE_WARN,fmt, ## args)
387#define xfs_alert(mp,fmt,args...) cmn_err(CE_ALERT,fmt, ## args)
388#define xfs_alert_tag(mp,tag,fmt,args...) cmn_err(CE_ALERT,fmt, ## args)
5e656dbb 389
5e656dbb 390#define xfs_sort qsort
2bd0ea18 391
5e656dbb 392#define xfs_ilock(ip,mode) ((void) 0)
a2ceac1f
DC
393#define xfs_ilock_nowait(ip,mode) ((void) 0)
394#define xfs_ilock_demote(ip,mode) ((void) 0)
ff105f75
DC
395#define xfs_ilock_data_map_shared(ip) (0)
396#define xfs_ilock_attr_map_shared(ip) (0)
397#define xfs_iunlock(ip,mode) ({ \
398 typeof(mode) __mode = mode; \
399 __mode = __mode; /* no set-but-unused warning */ \
400})
2bd0ea18 401
5e656dbb 402/* space allocation */
a2ceac1f 403#define xfs_extent_busy_reuse(mp,ag,bno,len,user) ((void) 0)
aefc06c1
ES
404/* avoid unused variable warning */
405#define xfs_extent_busy_insert(tp,ag,bno,len,flags)({ \
406 xfs_agnumber_t __foo = ag; \
407 __foo = __foo; /* no set-but-unused warning */ \
408})
cd80de04
CH
409#define xfs_extent_busy_trim(args,bno,len,busy_gen) ({ \
410 unsigned __foo = *(busy_gen); \
411 *(busy_gen) = __foo; \
412 false; \
413})
b0a898fe 414#define xfs_extent_busy_flush(mp,pag,busy_gen) ((void)(0))
a2ceac1f 415
5e656dbb 416#define xfs_rotorstep 1
1f2ace68 417#define xfs_bmap_rtalloc(a) (-ENOSYS)
5e656dbb 418#define xfs_get_extsz_hint(ip) (0)
10460994 419#define xfs_get_cowextsz_hint(ip) (0)
5e656dbb
BN
420#define xfs_inode_is_filestream(ip) (0)
421#define xfs_filestream_lookup_ag(ip) (0)
422#define xfs_filestream_new_ag(ip,ag) (0)
2bd0ea18 423
a2ceac1f
DC
424#define xfs_log_force(mp,flags) ((void) 0)
425#define XFS_LOG_SYNC 1
426
427/* quota bits */
428#define xfs_trans_mod_dquot_byino(t,i,f,d) ((void) 0)
429#define xfs_trans_reserve_quota_nblks(t,i,b,n,f) (0)
430#define xfs_trans_unreserve_quota_nblks(t,i,b,n,f) ((void) 0)
431#define xfs_qm_dqattach(i,f) (0)
432
5dfa5cd2
DC
433#define uuid_copy(s,d) platform_uuid_copy((s),(d))
434#define uuid_equal(s,d) (platform_uuid_compare((s),(d)) == 0)
435
e9d35108 436#define xfs_icreate_log(tp, agno, agbno, cnt, isize, len, gen) ((void) 0)
4896e6c8 437#define xfs_sb_validate_fsb_count(sbp, nblks) (0)
e9d35108 438
2bd0ea18 439/*
5e656dbb 440 * Prototypes for kernel static functions that are aren't in their
b626fb59 441 * associated header files.
2bd0ea18 442 */
b626fb59
DC
443struct xfs_da_args;
444struct xfs_bmap_free;
445struct xfs_bmap_free_item;
446struct xfs_mount;
447struct xfs_sb;
448struct xfs_trans;
449struct xfs_inode;
450struct xfs_log_item;
451struct xfs_buf;
452struct xfs_buf_map;
453struct xfs_buf_log_item;
454struct xfs_buftarg;
2bd0ea18 455
5e656dbb
BN
456/* xfs_attr.c */
457int xfs_attr_rmtval_get(struct xfs_da_args *);
2bd0ea18
NS
458
459/* xfs_bmap.c */
2cf6d225 460void xfs_bmap_del_free(struct xfs_bmap_free *, struct xfs_bmap_free_item *);
5e656dbb
BN
461
462/* xfs_mount.c */
b626fb59
DC
463int xfs_initialize_perag_data(struct xfs_mount *, xfs_agnumber_t);
464void xfs_mount_common(struct xfs_mount *, struct xfs_sb *);
5e656dbb
BN
465
466/*
467 * logitem.c and trans.c prototypes
468 */
4329aa4c 469void xfs_trans_init(struct xfs_mount *);
d67406c9 470int xfs_trans_roll(struct xfs_trans **);
2bd0ea18
NS
471
472/* xfs_trans_item.c */
c40bdaa2
DC
473void xfs_trans_add_item(struct xfs_trans *, struct xfs_log_item *);
474void xfs_trans_del_item(struct xfs_log_item *);
2bd0ea18 475
2bd0ea18 476/* xfs_inode_item.c */
b626fb59 477void xfs_inode_item_init(struct xfs_inode *, struct xfs_mount *);
2bd0ea18
NS
478
479/* xfs_buf_item.c */
b626fb59
DC
480void xfs_buf_item_init(struct xfs_buf *, struct xfs_mount *);
481void xfs_buf_item_log(struct xfs_buf_log_item *, uint, uint);
2bd0ea18 482
5e656dbb 483/* xfs_trans_buf.c */
b626fb59
DC
484struct xfs_buf *xfs_trans_buf_item_match(struct xfs_trans *,
485 struct xfs_buftarg *, struct xfs_buf_map *, int);
5e656dbb 486
2bd0ea18 487/* local source files */
19ebedcf
DC
488#define xfs_mod_fdblocks(mp, delta, rsvd) \
489 libxfs_mod_incore_sb(mp, XFS_TRANS_SB_FDBLOCKS, delta, rsvd)
490#define xfs_mod_frextents(mp, delta) \
491 libxfs_mod_incore_sb(mp, XFS_TRANS_SB_FREXTENTS, delta, 0)
492int libxfs_mod_incore_sb(struct xfs_mount *, int, int64_t, int);
2dd13604
ES
493/* percpu counters in mp are #defined to the superblock sb_ counters */
494#define xfs_reinit_percpu_counters(mp)
19ebedcf 495
b626fb59 496void xfs_trans_mod_sb(struct xfs_trans *, uint, long);
1e697959 497void xfs_verifier_error(struct xfs_buf *bp, int error, xfs_failaddr_t failaddr);
f616e2bf 498
b626fb59
DC
499/* XXX: this is clearly a bug - a shared header needs to export this */
500/* xfs_rtalloc.c */
501int libxfs_rtfree_extent(struct xfs_trans *, xfs_rtblock_t, xfs_extlen_t);
502
0b10a7f4
DW
503struct xfs_rtalloc_rec {
504 xfs_rtblock_t ar_startblock;
505 xfs_rtblock_t ar_blockcount;
506};
507
508typedef int (*xfs_rtalloc_query_range_fn)(
509 struct xfs_trans *tp,
510 struct xfs_rtalloc_rec *rec,
511 void *priv);
512
9542ae13
DC
513int libxfs_zero_extent(struct xfs_inode *ip, xfs_fsblock_t start_fsb,
514 xfs_off_t count_fsb);
515
a65d8d29
BF
516bool xfs_log_check_lsn(struct xfs_mount *, xfs_lsn_t);
517
f7b1a8b1 518/* xfs_icache.c */
9587a34c
DW
519#define xfs_inode_set_cowblocks_tag(ip) do { } while (0)
520#define xfs_inode_set_eofblocks_tag(ip) do { } while (0)
f7b1a8b1 521
5d8acc46
DC
522/* xfs_stats.h */
523#define XFS_STATS_CALC_INDEX(member) 0
524#define XFS_STATS_INC_OFF(mp, off)
525#define XFS_STATS_ADD_OFF(mp, off, val)
526
4a492e72 527typedef unsigned char u8;
5d8acc46 528
b626fb59 529#endif /* __LIBXFS_INTERNAL_XFS_H__ */