Linux 2.6.13-rc4
[linux-2.6/next.git] / fs / xfs / xfs_macros.c
blob698c2cd6285802ac13435856a23261d9fca3ae3d
1 /*
2 * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of version 2 of the GNU General Public License as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it would be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 * Further, this software is distributed without any warranty that it is
13 * free of the rightful claim of any third person regarding infringement
14 * or the like. Any license provided herein, whether implied or
15 * otherwise, applies only to this software file. Patent licenses, if
16 * any, provided herein do not apply to combinations of this program with
17 * other software, or any other product whatsoever.
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write the Free Software Foundation, Inc., 59
21 * Temple Place - Suite 330, Boston MA 02111-1307, USA.
23 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 * Mountain View, CA 94043, or:
26 * http://www.sgi.com
28 * For further information regarding this notice, see:
30 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
33 #define XFS_MACRO_C
35 #include "xfs.h"
36 #include "xfs_macros.h"
37 #include "xfs_types.h"
38 #include "xfs_inum.h"
39 #include "xfs_log.h"
40 #include "xfs_trans.h"
41 #include "xfs_sb.h"
42 #include "xfs_ag.h"
43 #include "xfs_dir.h"
44 #include "xfs_dir2.h"
45 #include "xfs_dmapi.h"
46 #include "xfs_mount.h"
47 #include "xfs_alloc_btree.h"
48 #include "xfs_ialloc_btree.h"
49 #include "xfs_bmap_btree.h"
50 #include "xfs_btree.h"
51 #include "xfs_attr_sf.h"
52 #include "xfs_dir_sf.h"
53 #include "xfs_dir2_sf.h"
54 #include "xfs_dinode.h"
55 #include "xfs_ialloc.h"
56 #include "xfs_inode_item.h"
57 #include "xfs_inode.h"
58 #include "xfs_bmap.h"
59 #include "xfs_rw.h"
60 #include "xfs_log_priv.h"
61 #include "xfs_da_btree.h"
62 #include "xfs_attr_leaf.h"
63 #include "xfs_dir_leaf.h"
64 #include "xfs_dir2_data.h"
65 #include "xfs_dir2_leaf.h"
66 #include "xfs_dir2_block.h"
67 #include "xfs_dir2_node.h"
68 #include "xfs_bit.h"
70 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_ISNULLDSTARTBLOCK)
71 int
72 isnulldstartblock(xfs_dfsbno_t x)
74 return ISNULLDSTARTBLOCK(x);
76 #endif
78 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_ISNULLSTARTBLOCK)
79 int
80 isnullstartblock(xfs_fsblock_t x)
82 return ISNULLSTARTBLOCK(x);
84 #endif
86 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_NULLSTARTBLOCK)
87 xfs_fsblock_t
88 nullstartblock(int k)
90 return NULLSTARTBLOCK(k);
92 #endif
94 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_STARTBLOCKVAL)
95 xfs_filblks_t
96 startblockval(xfs_fsblock_t x)
98 return STARTBLOCKVAL(x);
100 #endif
102 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_AG_CHECK_DADDR)
103 void
104 xfs_ag_check_daddr(xfs_mount_t *mp, xfs_daddr_t d, xfs_extlen_t len)
106 XFS_AG_CHECK_DADDR(mp, d, len);
108 #endif
110 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_AG_DADDR)
111 xfs_daddr_t
112 xfs_ag_daddr(xfs_mount_t *mp, xfs_agnumber_t agno, xfs_daddr_t d)
114 return XFS_AG_DADDR(mp, agno, d);
116 #endif
118 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_AG_MAXLEVELS)
120 xfs_ag_maxlevels(xfs_mount_t *mp)
122 return XFS_AG_MAXLEVELS(mp);
124 #endif
126 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_AGB_TO_DADDR)
127 xfs_daddr_t
128 xfs_agb_to_daddr(xfs_mount_t *mp, xfs_agnumber_t agno, xfs_agblock_t agbno)
130 return XFS_AGB_TO_DADDR(mp, agno, agbno);
132 #endif
134 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_AGB_TO_FSB)
135 xfs_fsblock_t
136 xfs_agb_to_fsb(xfs_mount_t *mp, xfs_agnumber_t agno, xfs_agblock_t agbno)
138 return XFS_AGB_TO_FSB(mp, agno, agbno);
140 #endif
142 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_AGBLOCK_MAX)
143 xfs_agblock_t
144 xfs_agblock_max(xfs_agblock_t a, xfs_agblock_t b)
146 return XFS_AGBLOCK_MAX(a, b);
148 #endif
150 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_AGBLOCK_MIN)
151 xfs_agblock_t
152 xfs_agblock_min(xfs_agblock_t a, xfs_agblock_t b)
154 return XFS_AGBLOCK_MIN(a, b);
156 #endif
158 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_AGF_BLOCK)
159 xfs_agblock_t
160 xfs_agf_block(xfs_mount_t *mp)
162 return XFS_AGF_BLOCK(mp);
164 #endif
166 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_AGF_GOOD_VERSION)
168 xfs_agf_good_version(unsigned v)
170 return XFS_AGF_GOOD_VERSION(v);
172 #endif
174 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_AGFL_BLOCK)
175 xfs_agblock_t
176 xfs_agfl_block(xfs_mount_t *mp)
178 return XFS_AGFL_BLOCK(mp);
180 #endif
182 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_AGI_BLOCK)
183 xfs_agblock_t
184 xfs_agi_block(xfs_mount_t *mp)
186 return XFS_AGI_BLOCK(mp);
188 #endif
190 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_AGI_GOOD_VERSION)
192 xfs_agi_good_version(unsigned v)
194 return XFS_AGI_GOOD_VERSION(v);
196 #endif
198 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_AGINO_TO_AGBNO)
199 xfs_agblock_t
200 xfs_agino_to_agbno(xfs_mount_t *mp, xfs_agino_t i)
202 return XFS_AGINO_TO_AGBNO(mp, i);
204 #endif
206 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_AGINO_TO_INO)
207 xfs_ino_t
208 xfs_agino_to_ino(xfs_mount_t *mp, xfs_agnumber_t a, xfs_agino_t i)
210 return XFS_AGINO_TO_INO(mp, a, i);
212 #endif
214 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_AGINO_TO_OFFSET)
216 xfs_agino_to_offset(xfs_mount_t *mp, xfs_agino_t i)
218 return XFS_AGINO_TO_OFFSET(mp, i);
220 #endif
222 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_ALLOC_BLOCK_MAXRECS)
224 xfs_alloc_block_maxrecs(int lev, xfs_btree_cur_t *cur)
226 return XFS_ALLOC_BLOCK_MAXRECS(lev, cur);
228 #endif
230 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_ALLOC_BLOCK_MINRECS)
232 xfs_alloc_block_minrecs(int lev, xfs_btree_cur_t *cur)
234 return XFS_ALLOC_BLOCK_MINRECS(lev, cur);
236 #endif
238 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_ALLOC_BLOCK_SIZE)
239 /*ARGSUSED1*/
241 xfs_alloc_block_size(int lev, xfs_btree_cur_t *cur)
243 return XFS_ALLOC_BLOCK_SIZE(lev, cur);
245 #endif
247 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_ALLOC_KEY_ADDR)
248 /*ARGSUSED3*/
249 xfs_alloc_key_t *
250 xfs_alloc_key_addr(xfs_alloc_block_t *bb, int i, xfs_btree_cur_t *cur)
252 return XFS_ALLOC_KEY_ADDR(bb, i, cur);
254 #endif
256 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_ALLOC_PTR_ADDR)
257 xfs_alloc_ptr_t *
258 xfs_alloc_ptr_addr(xfs_alloc_block_t *bb, int i, xfs_btree_cur_t *cur)
260 return XFS_ALLOC_PTR_ADDR(bb, i, cur);
262 #endif
264 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_ALLOC_REC_ADDR)
265 /*ARGSUSED3*/
266 xfs_alloc_rec_t *
267 xfs_alloc_rec_addr(xfs_alloc_block_t *bb, int i, xfs_btree_cur_t *cur)
269 return XFS_ALLOC_REC_ADDR(bb, i, cur);
271 #endif
273 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_ATTR_LEAF_ENTSIZE_LOCAL)
275 xfs_attr_leaf_entsize_local(int nlen, int vlen)
277 return XFS_ATTR_LEAF_ENTSIZE_LOCAL(nlen, vlen);
279 #endif
281 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_ATTR_LEAF_ENTSIZE_LOCAL_MAX)
283 xfs_attr_leaf_entsize_local_max(int bsize)
285 return XFS_ATTR_LEAF_ENTSIZE_LOCAL_MAX(bsize);
287 #endif
289 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_ATTR_LEAF_ENTSIZE_REMOTE)
291 xfs_attr_leaf_entsize_remote(int nlen)
293 return XFS_ATTR_LEAF_ENTSIZE_REMOTE(nlen);
295 #endif
297 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_ATTR_LEAF_NAME)
298 char *
299 xfs_attr_leaf_name(xfs_attr_leafblock_t *leafp, int idx)
301 return XFS_ATTR_LEAF_NAME(leafp, idx);
303 #endif
305 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_ATTR_LEAF_NAME_LOCAL)
306 xfs_attr_leaf_name_local_t *
307 xfs_attr_leaf_name_local(xfs_attr_leafblock_t *leafp, int idx)
309 return XFS_ATTR_LEAF_NAME_LOCAL(leafp, idx);
311 #endif
313 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_ATTR_LEAF_NAME_REMOTE)
314 xfs_attr_leaf_name_remote_t *
315 xfs_attr_leaf_name_remote(xfs_attr_leafblock_t *leafp, int idx)
317 return XFS_ATTR_LEAF_NAME_REMOTE(leafp, idx);
319 #endif
321 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_ATTR_SF_ENTSIZE)
323 xfs_attr_sf_entsize(xfs_attr_sf_entry_t *sfep)
325 return XFS_ATTR_SF_ENTSIZE(sfep);
327 #endif
329 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_ATTR_SF_ENTSIZE_BYNAME)
331 xfs_attr_sf_entsize_byname(int nlen, int vlen)
333 return XFS_ATTR_SF_ENTSIZE_BYNAME(nlen, vlen);
335 #endif
337 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_ATTR_SF_NEXTENTRY)
338 xfs_attr_sf_entry_t *
339 xfs_attr_sf_nextentry(xfs_attr_sf_entry_t *sfep)
341 return XFS_ATTR_SF_NEXTENTRY(sfep);
343 #endif
345 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_ATTR_SF_TOTSIZE)
347 xfs_attr_sf_totsize(xfs_inode_t *dp)
349 return XFS_ATTR_SF_TOTSIZE(dp);
351 #endif
353 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BHVTOI)
354 xfs_inode_t *
355 xfs_bhvtoi(bhv_desc_t *bhvp)
357 return XFS_BHVTOI(bhvp);
359 #endif
361 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BHVTOM)
362 xfs_mount_t *
363 xfs_bhvtom(bhv_desc_t *bdp)
365 return XFS_BHVTOM(bdp);
367 #endif
369 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_VFSTOM)
370 xfs_mount_t *
371 xfs_vfstom(vfs_t *vfs)
373 return XFS_VFSTOM(vfs);
375 #endif
377 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BM_MAXLEVELS)
379 xfs_bm_maxlevels(xfs_mount_t *mp, int w)
381 return XFS_BM_MAXLEVELS(mp, w);
383 #endif
385 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_BLOCK_DMAXRECS)
387 xfs_bmap_block_dmaxrecs(int lev, xfs_btree_cur_t *cur)
389 return XFS_BMAP_BLOCK_DMAXRECS(lev, cur);
391 #endif
393 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_BLOCK_DMINRECS)
395 xfs_bmap_block_dminrecs(int lev, xfs_btree_cur_t *cur)
397 return XFS_BMAP_BLOCK_DMINRECS(lev, cur);
399 #endif
401 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_BLOCK_DSIZE)
403 xfs_bmap_block_dsize(int lev, xfs_btree_cur_t *cur)
405 return XFS_BMAP_BLOCK_DSIZE(lev, cur);
407 #endif
409 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_BLOCK_IMAXRECS)
411 xfs_bmap_block_imaxrecs(int lev, xfs_btree_cur_t *cur)
413 return XFS_BMAP_BLOCK_IMAXRECS(lev, cur);
415 #endif
417 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_BLOCK_IMINRECS)
419 xfs_bmap_block_iminrecs(int lev, xfs_btree_cur_t *cur)
421 return XFS_BMAP_BLOCK_IMINRECS(lev, cur);
423 #endif
425 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_BLOCK_ISIZE)
427 xfs_bmap_block_isize(int lev, xfs_btree_cur_t *cur)
429 return XFS_BMAP_BLOCK_ISIZE(lev, cur);
431 #endif
433 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_BROOT_KEY_ADDR)
434 /*ARGSUSED3*/
435 xfs_bmbt_key_t *
436 xfs_bmap_broot_key_addr(xfs_bmbt_block_t *bb, int i, int sz)
438 return XFS_BMAP_BROOT_KEY_ADDR(bb, i, sz);
440 #endif
442 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_BROOT_MAXRECS)
444 xfs_bmap_broot_maxrecs(int sz)
446 return XFS_BMAP_BROOT_MAXRECS(sz);
448 #endif
450 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_BROOT_NUMRECS)
452 xfs_bmap_broot_numrecs(xfs_bmdr_block_t *bb)
454 return XFS_BMAP_BROOT_NUMRECS(bb);
456 #endif
458 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_BROOT_PTR_ADDR)
459 xfs_bmbt_ptr_t *
460 xfs_bmap_broot_ptr_addr(xfs_bmbt_block_t *bb, int i, int sz)
462 return XFS_BMAP_BROOT_PTR_ADDR(bb, i, sz);
464 #endif
466 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_BROOT_REC_ADDR)
467 /*ARGSUSED3*/
468 xfs_bmbt_rec_t *
469 xfs_bmap_broot_rec_addr(xfs_bmbt_block_t *bb, int i, int sz)
471 return XFS_BMAP_BROOT_REC_ADDR(bb, i, sz);
473 #endif
475 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_BROOT_SPACE)
477 xfs_bmap_broot_space(xfs_bmdr_block_t *bb)
479 return XFS_BMAP_BROOT_SPACE(bb);
481 #endif
483 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_BROOT_SPACE_CALC)
485 xfs_bmap_broot_space_calc(int nrecs)
487 return XFS_BMAP_BROOT_SPACE_CALC(nrecs);
489 #endif
491 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_IBLOCK_SIZE)
492 /*ARGSUSED1*/
494 xfs_bmap_iblock_size(int lev, xfs_btree_cur_t *cur)
496 return XFS_BMAP_IBLOCK_SIZE(lev, cur);
498 #endif
500 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_INIT)
501 void
502 xfs_bmap_init(xfs_bmap_free_t *flp, xfs_fsblock_t *fbp)
504 XFS_BMAP_INIT(flp, fbp);
506 #endif
508 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_KEY_DADDR)
509 /*ARGSUSED3*/
510 xfs_bmbt_key_t *
511 xfs_bmap_key_daddr(xfs_bmbt_block_t *bb, int i, xfs_btree_cur_t *cur)
513 return XFS_BMAP_KEY_DADDR(bb, i, cur);
515 #endif
517 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_KEY_IADDR)
518 /*ARGSUSED3*/
519 xfs_bmbt_key_t *
520 xfs_bmap_key_iaddr(xfs_bmbt_block_t *bb, int i, xfs_btree_cur_t *cur)
522 return XFS_BMAP_KEY_IADDR(bb, i, cur);
524 #endif
526 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_PTR_DADDR)
527 xfs_bmbt_ptr_t *
528 xfs_bmap_ptr_daddr(xfs_bmbt_block_t *bb, int i, xfs_btree_cur_t *cur)
530 return XFS_BMAP_PTR_DADDR(bb, i, cur);
532 #endif
534 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_PTR_IADDR)
535 xfs_bmbt_ptr_t *
536 xfs_bmap_ptr_iaddr(xfs_bmbt_block_t *bb, int i, xfs_btree_cur_t *cur)
538 return XFS_BMAP_PTR_IADDR(bb, i, cur);
540 #endif
542 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_RBLOCK_DSIZE)
543 /*ARGSUSED1*/
545 xfs_bmap_rblock_dsize(int lev, xfs_btree_cur_t *cur)
547 return XFS_BMAP_RBLOCK_DSIZE(lev, cur);
549 #endif
551 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_RBLOCK_ISIZE)
552 /*ARGSUSED1*/
554 xfs_bmap_rblock_isize(int lev, xfs_btree_cur_t *cur)
556 return XFS_BMAP_RBLOCK_ISIZE(lev, cur);
558 #endif
560 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_REC_DADDR)
561 /*ARGSUSED3*/
562 xfs_bmbt_rec_t *
563 xfs_bmap_rec_daddr(xfs_bmbt_block_t *bb, int i, xfs_btree_cur_t *cur)
565 return XFS_BMAP_REC_DADDR(bb, i, cur);
567 #endif
569 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_REC_IADDR)
570 /*ARGSUSED3*/
571 xfs_bmbt_rec_t *
572 xfs_bmap_rec_iaddr(xfs_bmbt_block_t *bb, int i, xfs_btree_cur_t *cur)
574 return XFS_BMAP_REC_IADDR(bb, i, cur);
576 #endif
578 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAP_SANITY_CHECK)
580 xfs_bmap_sanity_check(xfs_mount_t *mp, xfs_bmbt_block_t *bb, int level)
582 return XFS_BMAP_SANITY_CHECK(mp, bb, level);
584 #endif
586 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMAPI_AFLAG)
588 xfs_bmapi_aflag(int w)
590 return XFS_BMAPI_AFLAG(w);
592 #endif
594 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BMDR_SPACE_CALC)
596 xfs_bmdr_space_calc(int nrecs)
598 return XFS_BMDR_SPACE_CALC(nrecs);
600 #endif
602 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BNO_BLOCK)
603 xfs_agblock_t
604 xfs_bno_block(xfs_mount_t *mp)
606 return XFS_BNO_BLOCK(mp);
608 #endif
610 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BTREE_LONG_PTRS)
612 xfs_btree_long_ptrs(xfs_btnum_t btnum)
614 return XFS_BTREE_LONG_PTRS(btnum);
616 #endif
618 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BUF_TO_AGF)
619 xfs_agf_t *
620 xfs_buf_to_agf(xfs_buf_t *bp)
622 return XFS_BUF_TO_AGF(bp);
624 #endif
626 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BUF_TO_AGFL)
627 xfs_agfl_t *
628 xfs_buf_to_agfl(xfs_buf_t *bp)
630 return XFS_BUF_TO_AGFL(bp);
632 #endif
634 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BUF_TO_AGI)
635 xfs_agi_t *
636 xfs_buf_to_agi(xfs_buf_t *bp)
638 return XFS_BUF_TO_AGI(bp);
640 #endif
642 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BUF_TO_ALLOC_BLOCK)
643 xfs_alloc_block_t *
644 xfs_buf_to_alloc_block(xfs_buf_t *bp)
646 return XFS_BUF_TO_ALLOC_BLOCK(bp);
648 #endif
650 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BUF_TO_BLOCK)
651 xfs_btree_block_t *
652 xfs_buf_to_block(xfs_buf_t *bp)
654 return XFS_BUF_TO_BLOCK(bp);
656 #endif
658 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BUF_TO_BMBT_BLOCK)
659 xfs_bmbt_block_t *
660 xfs_buf_to_bmbt_block(xfs_buf_t *bp)
662 return XFS_BUF_TO_BMBT_BLOCK(bp);
664 #endif
666 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BUF_TO_DINODE)
667 xfs_dinode_t *
668 xfs_buf_to_dinode(xfs_buf_t *bp)
670 return XFS_BUF_TO_DINODE(bp);
672 #endif
674 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BUF_TO_INOBT_BLOCK)
675 xfs_inobt_block_t *
676 xfs_buf_to_inobt_block(xfs_buf_t *bp)
678 return XFS_BUF_TO_INOBT_BLOCK(bp);
680 #endif
682 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BUF_TO_LBLOCK)
683 xfs_btree_lblock_t *
684 xfs_buf_to_lblock(xfs_buf_t *bp)
686 return XFS_BUF_TO_LBLOCK(bp);
688 #endif
690 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BUF_TO_SBLOCK)
691 xfs_btree_sblock_t *
692 xfs_buf_to_sblock(xfs_buf_t *bp)
694 return XFS_BUF_TO_SBLOCK(bp);
696 #endif
698 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_BUF_TO_SBP)
699 xfs_sb_t *
700 xfs_buf_to_sbp(xfs_buf_t *bp)
702 return XFS_BUF_TO_SBP(bp);
704 #endif
706 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_CFORK_ASIZE)
708 xfs_cfork_asize_disk(xfs_dinode_core_t *dcp, xfs_mount_t *mp)
710 return XFS_CFORK_ASIZE_DISK(dcp, mp);
713 xfs_cfork_asize(xfs_dinode_core_t *dcp, xfs_mount_t *mp)
715 return XFS_CFORK_ASIZE(dcp, mp);
717 #endif
719 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_CFORK_BOFF)
721 xfs_cfork_boff_disk(xfs_dinode_core_t *dcp)
723 return XFS_CFORK_BOFF_DISK(dcp);
726 xfs_cfork_boff(xfs_dinode_core_t *dcp)
728 return XFS_CFORK_BOFF(dcp);
730 #endif
732 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_CFORK_DSIZE)
734 xfs_cfork_dsize_disk(xfs_dinode_core_t *dcp, xfs_mount_t *mp)
736 return XFS_CFORK_DSIZE_DISK(dcp, mp);
739 xfs_cfork_dsize(xfs_dinode_core_t *dcp, xfs_mount_t *mp)
741 return XFS_CFORK_DSIZE(dcp, mp);
743 #endif
745 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_CFORK_FMT_SET)
746 void
747 xfs_cfork_fmt_set(xfs_dinode_core_t *dcp, int w, int n)
749 XFS_CFORK_FMT_SET(dcp, w, n);
751 #endif
753 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_CFORK_FORMAT)
755 xfs_cfork_format(xfs_dinode_core_t *dcp, int w)
757 return XFS_CFORK_FORMAT(dcp, w);
759 #endif
761 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_CFORK_NEXT_SET)
762 void
763 xfs_cfork_next_set(xfs_dinode_core_t *dcp, int w, int n)
765 XFS_CFORK_NEXT_SET(dcp, w, n);
767 #endif
769 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_CFORK_NEXTENTS)
771 xfs_cfork_nextents_disk(xfs_dinode_core_t *dcp, int w)
773 return XFS_CFORK_NEXTENTS_DISK(dcp, w);
776 xfs_cfork_nextents(xfs_dinode_core_t *dcp, int w)
778 return XFS_CFORK_NEXTENTS(dcp, w);
780 #endif
782 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_CFORK_Q)
784 xfs_cfork_q_disk(xfs_dinode_core_t *dcp)
786 return XFS_CFORK_Q_DISK(dcp);
789 xfs_cfork_q(xfs_dinode_core_t *dcp)
791 return XFS_CFORK_Q(dcp);
793 #endif
795 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_CFORK_SIZE)
797 xfs_cfork_size_disk(xfs_dinode_core_t *dcp, xfs_mount_t *mp, int w)
799 return XFS_CFORK_SIZE_DISK(dcp, mp, w);
802 xfs_cfork_size(xfs_dinode_core_t *dcp, xfs_mount_t *mp, int w)
804 return XFS_CFORK_SIZE(dcp, mp, w);
806 #endif
808 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_CNT_BLOCK)
809 xfs_agblock_t
810 xfs_cnt_block(xfs_mount_t *mp)
812 return XFS_CNT_BLOCK(mp);
814 #endif
816 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DA_COOKIE_BNO)
817 xfs_dablk_t
818 xfs_da_cookie_bno(xfs_mount_t *mp, xfs_off_t cookie)
820 return XFS_DA_COOKIE_BNO(mp, cookie);
822 #endif
824 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DA_COOKIE_ENTRY)
826 xfs_da_cookie_entry(xfs_mount_t *mp, xfs_off_t cookie)
828 return XFS_DA_COOKIE_ENTRY(mp, cookie);
830 #endif
832 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DA_COOKIE_HASH)
833 /*ARGSUSED1*/
834 xfs_dahash_t
835 xfs_da_cookie_hash(xfs_mount_t *mp, xfs_off_t cookie)
837 return XFS_DA_COOKIE_HASH(mp, cookie);
839 #endif
841 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DA_MAKE_BNOENTRY)
842 __uint32_t
843 xfs_da_make_bnoentry(xfs_mount_t *mp, xfs_dablk_t bno, int entry)
845 return XFS_DA_MAKE_BNOENTRY(mp, bno, entry);
847 #endif
849 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DA_MAKE_COOKIE)
850 xfs_off_t
851 xfs_da_make_cookie(xfs_mount_t *mp, xfs_dablk_t bno, int entry,
852 xfs_dahash_t hash)
854 return XFS_DA_MAKE_COOKIE(mp, bno, entry, hash);
856 #endif
858 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DADDR_TO_AGBNO)
859 xfs_agblock_t
860 xfs_daddr_to_agbno(xfs_mount_t *mp, xfs_daddr_t d)
862 return XFS_DADDR_TO_AGBNO(mp, d);
864 #endif
866 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DADDR_TO_AGNO)
867 xfs_agnumber_t
868 xfs_daddr_to_agno(xfs_mount_t *mp, xfs_daddr_t d)
870 return XFS_DADDR_TO_AGNO(mp, d);
872 #endif
874 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DADDR_TO_FSB)
875 xfs_fsblock_t
876 xfs_daddr_to_fsb(xfs_mount_t *mp, xfs_daddr_t d)
878 return XFS_DADDR_TO_FSB(mp, d);
880 #endif
882 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DFORK_APTR)
883 char *
884 xfs_dfork_aptr(xfs_dinode_t *dip)
886 return XFS_DFORK_APTR(dip);
888 #endif
890 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DFORK_ASIZE)
892 xfs_dfork_asize(xfs_dinode_t *dip, xfs_mount_t *mp)
894 return XFS_DFORK_ASIZE(dip, mp);
896 #endif
898 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DFORK_BOFF)
900 xfs_dfork_boff(xfs_dinode_t *dip)
902 return XFS_DFORK_BOFF(dip);
904 #endif
906 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DFORK_DPTR)
907 char *
908 xfs_dfork_dptr(xfs_dinode_t *dip)
910 return XFS_DFORK_DPTR(dip);
912 #endif
914 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DFORK_DSIZE)
916 xfs_dfork_dsize(xfs_dinode_t *dip, xfs_mount_t *mp)
918 return XFS_DFORK_DSIZE(dip, mp);
920 #endif
922 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DFORK_NEXTENTS)
924 xfs_dfork_nextents(xfs_dinode_t *dip, int w)
926 return XFS_DFORK_NEXTENTS(dip, w);
928 #endif
930 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DFORK_PTR)
931 char *
932 xfs_dfork_ptr(xfs_dinode_t *dip, int w)
934 return XFS_DFORK_PTR(dip, w);
936 #endif
938 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DFORK_Q)
940 xfs_dfork_q(xfs_dinode_t *dip)
942 return XFS_DFORK_Q(dip);
944 #endif
946 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DFORK_SIZE)
948 xfs_dfork_size(xfs_dinode_t *dip, xfs_mount_t *mp, int w)
950 return XFS_DFORK_SIZE(dip, mp, w);
952 #endif
954 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DINODE_GOOD_VERSION)
956 xfs_dinode_good_version(int v)
958 return XFS_DINODE_GOOD_VERSION(v);
960 #endif
962 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR_LEAF_ENTSIZE_BYENTRY)
964 xfs_dir_leaf_entsize_byentry(xfs_dir_leaf_entry_t *entry)
966 return XFS_DIR_LEAF_ENTSIZE_BYENTRY(entry);
968 #endif
970 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR_LEAF_ENTSIZE_BYNAME)
972 xfs_dir_leaf_entsize_byname(int len)
974 return XFS_DIR_LEAF_ENTSIZE_BYNAME(len);
976 #endif
978 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR_LEAF_NAMESTRUCT)
979 xfs_dir_leaf_name_t *
980 xfs_dir_leaf_namestruct(xfs_dir_leafblock_t *leafp, int offset)
982 return XFS_DIR_LEAF_NAMESTRUCT(leafp, offset);
984 #endif
986 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR_SF_ALLFIT)
988 xfs_dir_sf_allfit(int count, int totallen)
990 return XFS_DIR_SF_ALLFIT(count, totallen);
992 #endif
994 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR_SF_ENTSIZE_BYENTRY)
996 xfs_dir_sf_entsize_byentry(xfs_dir_sf_entry_t *sfep)
998 return XFS_DIR_SF_ENTSIZE_BYENTRY(sfep);
1000 #endif
1002 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR_SF_ENTSIZE_BYNAME)
1004 xfs_dir_sf_entsize_byname(int len)
1006 return XFS_DIR_SF_ENTSIZE_BYNAME(len);
1008 #endif
1010 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR_SF_GET_DIRINO)
1011 void
1012 xfs_dir_sf_get_dirino(xfs_dir_ino_t *from, xfs_ino_t *to)
1014 XFS_DIR_SF_GET_DIRINO(from, to);
1016 #endif
1018 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR_SF_NEXTENTRY)
1019 xfs_dir_sf_entry_t *
1020 xfs_dir_sf_nextentry(xfs_dir_sf_entry_t *sfep)
1022 return XFS_DIR_SF_NEXTENTRY(sfep);
1024 #endif
1026 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR_SF_PUT_DIRINO)
1027 void
1028 xfs_dir_sf_put_dirino(xfs_ino_t *from, xfs_dir_ino_t *to)
1030 XFS_DIR_SF_PUT_DIRINO(from, to);
1032 #endif
1034 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_BLOCK_LEAF_P)
1035 xfs_dir2_leaf_entry_t *
1036 xfs_dir2_block_leaf_p(xfs_dir2_block_tail_t *btp)
1038 return XFS_DIR2_BLOCK_LEAF_P(btp);
1040 #endif
1042 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_BLOCK_TAIL_P)
1043 xfs_dir2_block_tail_t *
1044 xfs_dir2_block_tail_p(xfs_mount_t *mp, xfs_dir2_block_t *block)
1046 return XFS_DIR2_BLOCK_TAIL_P(mp, block);
1048 #endif
1050 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_BYTE_TO_DA)
1051 xfs_dablk_t
1052 xfs_dir2_byte_to_da(xfs_mount_t *mp, xfs_dir2_off_t by)
1054 return XFS_DIR2_BYTE_TO_DA(mp, by);
1056 #endif
1058 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_BYTE_TO_DATAPTR)
1059 /* ARGSUSED */
1060 xfs_dir2_dataptr_t
1061 xfs_dir2_byte_to_dataptr(xfs_mount_t *mp, xfs_dir2_off_t by)
1063 return XFS_DIR2_BYTE_TO_DATAPTR(mp, by);
1065 #endif
1067 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_BYTE_TO_DB)
1068 xfs_dir2_db_t
1069 xfs_dir2_byte_to_db(xfs_mount_t *mp, xfs_dir2_off_t by)
1071 return XFS_DIR2_BYTE_TO_DB(mp, by);
1073 #endif
1075 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_BYTE_TO_OFF)
1076 xfs_dir2_data_aoff_t
1077 xfs_dir2_byte_to_off(xfs_mount_t *mp, xfs_dir2_off_t by)
1079 return XFS_DIR2_BYTE_TO_OFF(mp, by);
1081 #endif
1083 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_DA_TO_BYTE)
1084 xfs_dir2_off_t
1085 xfs_dir2_da_to_byte(xfs_mount_t *mp, xfs_dablk_t da)
1087 return XFS_DIR2_DA_TO_BYTE(mp, da);
1089 #endif
1091 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_DA_TO_DB)
1092 xfs_dir2_db_t
1093 xfs_dir2_da_to_db(xfs_mount_t *mp, xfs_dablk_t da)
1095 return XFS_DIR2_DA_TO_DB(mp, da);
1097 #endif
1099 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_DATA_ENTRY_TAG_P)
1100 xfs_dir2_data_off_t *
1101 xfs_dir2_data_entry_tag_p(xfs_dir2_data_entry_t *dep)
1103 return XFS_DIR2_DATA_ENTRY_TAG_P(dep);
1105 #endif
1107 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_DATA_ENTSIZE)
1109 xfs_dir2_data_entsize(int n)
1111 return XFS_DIR2_DATA_ENTSIZE(n);
1113 #endif
1115 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_DATA_UNUSED_TAG_P)
1116 xfs_dir2_data_off_t *
1117 xfs_dir2_data_unused_tag_p(xfs_dir2_data_unused_t *dup)
1119 return XFS_DIR2_DATA_UNUSED_TAG_P(dup);
1121 #endif
1123 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_DATAPTR_TO_BYTE)
1124 /* ARGSUSED */
1125 xfs_dir2_off_t
1126 xfs_dir2_dataptr_to_byte(xfs_mount_t *mp, xfs_dir2_dataptr_t dp)
1128 return XFS_DIR2_DATAPTR_TO_BYTE(mp, dp);
1130 #endif
1132 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_DATAPTR_TO_DB)
1133 xfs_dir2_db_t
1134 xfs_dir2_dataptr_to_db(xfs_mount_t *mp, xfs_dir2_dataptr_t dp)
1136 return XFS_DIR2_DATAPTR_TO_DB(mp, dp);
1138 #endif
1140 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_DATAPTR_TO_OFF)
1141 xfs_dir2_data_aoff_t
1142 xfs_dir2_dataptr_to_off(xfs_mount_t *mp, xfs_dir2_dataptr_t dp)
1144 return XFS_DIR2_DATAPTR_TO_OFF(mp, dp);
1146 #endif
1148 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_DB_OFF_TO_BYTE)
1149 xfs_dir2_off_t
1150 xfs_dir2_db_off_to_byte(xfs_mount_t *mp, xfs_dir2_db_t db,
1151 xfs_dir2_data_aoff_t o)
1153 return XFS_DIR2_DB_OFF_TO_BYTE(mp, db, o);
1155 #endif
1157 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_DB_OFF_TO_DATAPTR)
1158 xfs_dir2_dataptr_t
1159 xfs_dir2_db_off_to_dataptr(xfs_mount_t *mp, xfs_dir2_db_t db,
1160 xfs_dir2_data_aoff_t o)
1162 return XFS_DIR2_DB_OFF_TO_DATAPTR(mp, db, o);
1164 #endif
1166 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_DB_TO_DA)
1167 xfs_dablk_t
1168 xfs_dir2_db_to_da(xfs_mount_t *mp, xfs_dir2_db_t db)
1170 return XFS_DIR2_DB_TO_DA(mp, db);
1172 #endif
1174 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_DB_TO_FDB)
1175 xfs_dir2_db_t
1176 xfs_dir2_db_to_fdb(xfs_mount_t *mp, xfs_dir2_db_t db)
1178 return XFS_DIR2_DB_TO_FDB(mp, db);
1180 #endif
1182 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_DB_TO_FDINDEX)
1184 xfs_dir2_db_to_fdindex(xfs_mount_t *mp, xfs_dir2_db_t db)
1186 return XFS_DIR2_DB_TO_FDINDEX(mp, db);
1188 #endif
1190 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_LEAF_BESTS_P)
1191 xfs_dir2_data_off_t *
1192 xfs_dir2_leaf_bests_p(xfs_dir2_leaf_tail_t *ltp)
1194 return XFS_DIR2_LEAF_BESTS_P(ltp);
1196 #endif
1198 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_LEAF_TAIL_P)
1199 xfs_dir2_leaf_tail_t *
1200 xfs_dir2_leaf_tail_p(xfs_mount_t *mp, xfs_dir2_leaf_t *lp)
1202 return XFS_DIR2_LEAF_TAIL_P(mp, lp);
1204 #endif
1206 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_MAX_LEAF_ENTS)
1208 xfs_dir2_max_leaf_ents(xfs_mount_t *mp)
1210 return XFS_DIR2_MAX_LEAF_ENTS(mp);
1212 #endif
1214 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_SF_ENTSIZE_BYENTRY)
1216 xfs_dir2_sf_entsize_byentry(xfs_dir2_sf_t *sfp, xfs_dir2_sf_entry_t *sfep)
1218 return XFS_DIR2_SF_ENTSIZE_BYENTRY(sfp, sfep);
1220 #endif
1222 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_SF_FIRSTENTRY)
1223 xfs_dir2_sf_entry_t *
1224 xfs_dir2_sf_firstentry(xfs_dir2_sf_t *sfp)
1226 return XFS_DIR2_SF_FIRSTENTRY(sfp);
1228 #endif
1230 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_SF_ENTSIZE_BYNAME)
1232 xfs_dir2_sf_entsize_byname(xfs_dir2_sf_t *sfp, int len)
1234 return XFS_DIR2_SF_ENTSIZE_BYNAME(sfp, len);
1236 #endif
1238 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_SF_GET_INUMBER)
1239 xfs_intino_t
1240 xfs_dir2_sf_get_inumber(xfs_dir2_sf_t *sfp, xfs_dir2_inou_t *from)
1242 return XFS_DIR2_SF_GET_INUMBER(sfp, from);
1244 #endif
1246 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_SF_GET_OFFSET)
1247 xfs_dir2_data_aoff_t
1248 xfs_dir2_sf_get_offset(xfs_dir2_sf_entry_t *sfep)
1250 return XFS_DIR2_SF_GET_OFFSET(sfep);
1252 #endif
1254 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_SF_HDR_SIZE)
1256 xfs_dir2_sf_hdr_size(int i8count)
1258 return XFS_DIR2_SF_HDR_SIZE(i8count);
1260 #endif
1262 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_SF_INUMBERP)
1263 xfs_dir2_inou_t *
1264 xfs_dir2_sf_inumberp(xfs_dir2_sf_entry_t *sfep)
1266 return XFS_DIR2_SF_INUMBERP(sfep);
1268 #endif
1270 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_SF_NEXTENTRY)
1271 xfs_dir2_sf_entry_t *
1272 xfs_dir2_sf_nextentry(xfs_dir2_sf_t *sfp, xfs_dir2_sf_entry_t *sfep)
1274 return XFS_DIR2_SF_NEXTENTRY(sfp, sfep);
1276 #endif
1278 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_SF_PUT_INUMBER)
1279 void
1280 xfs_dir2_sf_put_inumber(xfs_dir2_sf_t *sfp, xfs_ino_t *from, xfs_dir2_inou_t *to)
1282 XFS_DIR2_SF_PUT_INUMBER(sfp, from, to);
1284 #endif
1286 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_SF_PUT_OFFSET)
1287 void
1288 xfs_dir2_sf_put_offset(xfs_dir2_sf_entry_t *sfep, xfs_dir2_data_aoff_t off)
1290 XFS_DIR2_SF_PUT_OFFSET(sfep, off);
1292 #endif
1294 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_EXTFMT_INODE )
1295 xfs_exntfmt_t
1296 xfs_extfmt_inode(struct xfs_inode *ip)
1298 return XFS_EXTFMT_INODE(ip);
1300 #endif
1302 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_EXTLEN_MAX)
1303 xfs_extlen_t
1304 xfs_extlen_max(xfs_extlen_t a, xfs_extlen_t b)
1306 return XFS_EXTLEN_MAX(a, b);
1308 #endif
1310 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_EXTLEN_MIN)
1311 xfs_extlen_t
1312 xfs_extlen_min(xfs_extlen_t a, xfs_extlen_t b)
1314 return XFS_EXTLEN_MIN(a, b);
1316 #endif
1318 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_FILBLKS_MAX)
1319 xfs_filblks_t
1320 xfs_filblks_max(xfs_filblks_t a, xfs_filblks_t b)
1322 return XFS_FILBLKS_MAX(a, b);
1324 #endif
1326 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_FILBLKS_MIN)
1327 xfs_filblks_t
1328 xfs_filblks_min(xfs_filblks_t a, xfs_filblks_t b)
1330 return XFS_FILBLKS_MIN(a, b);
1332 #endif
1334 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_FILEOFF_MAX)
1335 xfs_fileoff_t
1336 xfs_fileoff_max(xfs_fileoff_t a, xfs_fileoff_t b)
1338 return XFS_FILEOFF_MAX(a, b);
1340 #endif
1342 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_FILEOFF_MIN)
1343 xfs_fileoff_t
1344 xfs_fileoff_min(xfs_fileoff_t a, xfs_fileoff_t b)
1346 return XFS_FILEOFF_MIN(a, b);
1348 #endif
1350 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_FSB_SANITY_CHECK)
1352 xfs_fsb_sanity_check(xfs_mount_t *mp, xfs_fsblock_t fsbno)
1354 return XFS_FSB_SANITY_CHECK(mp, fsbno);
1356 #endif
1358 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_FSB_TO_AGBNO)
1359 xfs_agblock_t
1360 xfs_fsb_to_agbno(xfs_mount_t *mp, xfs_fsblock_t fsbno)
1362 return XFS_FSB_TO_AGBNO(mp, fsbno);
1364 #endif
1366 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_FSB_TO_AGNO)
1367 xfs_agnumber_t
1368 xfs_fsb_to_agno(xfs_mount_t *mp, xfs_fsblock_t fsbno)
1370 return XFS_FSB_TO_AGNO(mp, fsbno);
1372 #endif
1374 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_FSB_TO_DADDR)
1375 xfs_daddr_t
1376 xfs_fsb_to_daddr(xfs_mount_t *mp, xfs_fsblock_t fsbno)
1378 return XFS_FSB_TO_DADDR(mp, fsbno);
1380 #endif
1382 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_FSB_TO_DB)
1383 xfs_daddr_t
1384 xfs_fsb_to_db(xfs_inode_t *ip, xfs_fsblock_t fsb)
1386 return XFS_FSB_TO_DB(ip, fsb);
1388 #endif
1390 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_HDR_BLOCK)
1391 xfs_agblock_t
1392 xfs_hdr_block(xfs_mount_t *mp, xfs_daddr_t d)
1394 return XFS_HDR_BLOCK(mp, d);
1396 #endif
1398 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_IALLOC_BLOCKS)
1399 xfs_extlen_t
1400 xfs_ialloc_blocks(xfs_mount_t *mp)
1402 return XFS_IALLOC_BLOCKS(mp);
1404 #endif
1406 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_IALLOC_FIND_FREE)
1408 xfs_ialloc_find_free(xfs_inofree_t *fp)
1410 return XFS_IALLOC_FIND_FREE(fp);
1412 #endif
1414 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_IALLOC_INODES)
1416 xfs_ialloc_inodes(xfs_mount_t *mp)
1418 return XFS_IALLOC_INODES(mp);
1420 #endif
1422 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_IBT_BLOCK)
1423 xfs_agblock_t
1424 xfs_ibt_block(xfs_mount_t *mp)
1426 return XFS_IBT_BLOCK(mp);
1428 #endif
1430 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_IFORK_ASIZE)
1432 xfs_ifork_asize(xfs_inode_t *ip)
1434 return XFS_IFORK_ASIZE(ip);
1436 #endif
1438 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_IFORK_DSIZE)
1440 xfs_ifork_dsize(xfs_inode_t *ip)
1442 return XFS_IFORK_DSIZE(ip);
1444 #endif
1446 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_IFORK_FMT_SET)
1447 void
1448 xfs_ifork_fmt_set(xfs_inode_t *ip, int w, int n)
1450 XFS_IFORK_FMT_SET(ip, w, n);
1452 #endif
1454 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_IFORK_FORMAT)
1456 xfs_ifork_format(xfs_inode_t *ip, int w)
1458 return XFS_IFORK_FORMAT(ip, w);
1460 #endif
1462 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_IFORK_NEXT_SET)
1463 void
1464 xfs_ifork_next_set(xfs_inode_t *ip, int w, int n)
1466 XFS_IFORK_NEXT_SET(ip, w, n);
1468 #endif
1470 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_IFORK_NEXTENTS)
1472 xfs_ifork_nextents(xfs_inode_t *ip, int w)
1474 return XFS_IFORK_NEXTENTS(ip, w);
1476 #endif
1478 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_IFORK_PTR)
1479 xfs_ifork_t *
1480 xfs_ifork_ptr(xfs_inode_t *ip, int w)
1482 return XFS_IFORK_PTR(ip, w);
1484 #endif
1486 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_IFORK_Q)
1488 xfs_ifork_q(xfs_inode_t *ip)
1490 return XFS_IFORK_Q(ip);
1492 #endif
1494 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_IFORK_SIZE)
1496 xfs_ifork_size(xfs_inode_t *ip, int w)
1498 return XFS_IFORK_SIZE(ip, w);
1500 #endif
1502 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_ILOG_FBROOT)
1504 xfs_ilog_fbroot(int w)
1506 return XFS_ILOG_FBROOT(w);
1508 #endif
1510 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_ILOG_FDATA)
1512 xfs_ilog_fdata(int w)
1514 return XFS_ILOG_FDATA(w);
1516 #endif
1518 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_ILOG_FEXT)
1520 xfs_ilog_fext(int w)
1522 return XFS_ILOG_FEXT(w);
1524 #endif
1526 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_IN_MAXLEVELS)
1528 xfs_in_maxlevels(xfs_mount_t *mp)
1530 return XFS_IN_MAXLEVELS(mp);
1532 #endif
1534 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INO_AGBNO_BITS)
1536 xfs_ino_agbno_bits(xfs_mount_t *mp)
1538 return XFS_INO_AGBNO_BITS(mp);
1540 #endif
1542 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INO_AGINO_BITS)
1544 xfs_ino_agino_bits(xfs_mount_t *mp)
1546 return XFS_INO_AGINO_BITS(mp);
1548 #endif
1550 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INO_AGNO_BITS)
1552 xfs_ino_agno_bits(xfs_mount_t *mp)
1554 return XFS_INO_AGNO_BITS(mp);
1556 #endif
1558 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INO_BITS)
1560 xfs_ino_bits(xfs_mount_t *mp)
1562 return XFS_INO_BITS(mp);
1564 #endif
1566 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INO_MASK)
1567 __uint32_t
1568 xfs_ino_mask(int k)
1570 return XFS_INO_MASK(k);
1572 #endif
1574 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INO_OFFSET_BITS)
1576 xfs_ino_offset_bits(xfs_mount_t *mp)
1578 return XFS_INO_OFFSET_BITS(mp);
1580 #endif
1582 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INO_TO_AGBNO)
1583 xfs_agblock_t
1584 xfs_ino_to_agbno(xfs_mount_t *mp, xfs_ino_t i)
1586 return XFS_INO_TO_AGBNO(mp, i);
1588 #endif
1590 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INO_TO_AGINO)
1591 xfs_agino_t
1592 xfs_ino_to_agino(xfs_mount_t *mp, xfs_ino_t i)
1594 return XFS_INO_TO_AGINO(mp, i);
1596 #endif
1598 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INO_TO_AGNO)
1599 xfs_agnumber_t
1600 xfs_ino_to_agno(xfs_mount_t *mp, xfs_ino_t i)
1602 return XFS_INO_TO_AGNO(mp, i);
1604 #endif
1606 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INO_TO_FSB)
1607 xfs_fsblock_t
1608 xfs_ino_to_fsb(xfs_mount_t *mp, xfs_ino_t i)
1610 return XFS_INO_TO_FSB(mp, i);
1612 #endif
1614 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INO_TO_OFFSET)
1616 xfs_ino_to_offset(xfs_mount_t *mp, xfs_ino_t i)
1618 return XFS_INO_TO_OFFSET(mp, i);
1620 #endif
1622 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INOBT_BLOCK_MAXRECS)
1624 xfs_inobt_block_maxrecs(int lev, xfs_btree_cur_t *cur)
1626 return XFS_INOBT_BLOCK_MAXRECS(lev, cur);
1628 #endif
1630 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INOBT_BLOCK_MINRECS)
1632 xfs_inobt_block_minrecs(int lev, xfs_btree_cur_t *cur)
1634 return XFS_INOBT_BLOCK_MINRECS(lev, cur);
1636 #endif
1638 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INOBT_BLOCK_SIZE)
1639 /*ARGSUSED1*/
1641 xfs_inobt_block_size(int lev, xfs_btree_cur_t *cur)
1643 return XFS_INOBT_BLOCK_SIZE(lev, cur);
1645 #endif
1647 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INOBT_CLR_FREE)
1648 void
1649 xfs_inobt_clr_free(xfs_inobt_rec_t *rp, int i)
1651 XFS_INOBT_CLR_FREE(rp, i);
1653 #endif
1655 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INOBT_IS_FREE)
1657 xfs_inobt_is_free(xfs_inobt_rec_t *rp, int i)
1659 return XFS_INOBT_IS_FREE(rp, i);
1662 xfs_inobt_is_free_disk(xfs_inobt_rec_t *rp, int i)
1664 return XFS_INOBT_IS_FREE_DISK(rp, i);
1666 #endif
1668 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INOBT_IS_LAST_REC)
1670 xfs_inobt_is_last_rec(xfs_btree_cur_t *cur)
1672 return XFS_INOBT_IS_LAST_REC(cur);
1674 #endif
1676 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INOBT_KEY_ADDR)
1677 /*ARGSUSED3*/
1678 xfs_inobt_key_t *
1679 xfs_inobt_key_addr(xfs_inobt_block_t *bb, int i, xfs_btree_cur_t *cur)
1681 return XFS_INOBT_KEY_ADDR(bb, i, cur);
1683 #endif
1685 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INOBT_MASK)
1686 xfs_inofree_t
1687 xfs_inobt_mask(int i)
1689 return XFS_INOBT_MASK(i);
1691 #endif
1693 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INOBT_MASKN)
1694 xfs_inofree_t
1695 xfs_inobt_maskn(int i, int n)
1697 return XFS_INOBT_MASKN(i, n);
1699 #endif
1701 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INOBT_PTR_ADDR)
1702 xfs_inobt_ptr_t *
1703 xfs_inobt_ptr_addr(xfs_inobt_block_t *bb, int i, xfs_btree_cur_t *cur)
1705 return XFS_INOBT_PTR_ADDR(bb, i, cur);
1707 #endif
1709 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INOBT_REC_ADDR)
1710 /*ARGSUSED3*/
1711 xfs_inobt_rec_t *
1712 xfs_inobt_rec_addr(xfs_inobt_block_t *bb, int i, xfs_btree_cur_t *cur)
1714 return XFS_INOBT_REC_ADDR(bb, i, cur);
1716 #endif
1718 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INOBT_SET_FREE)
1719 void
1720 xfs_inobt_set_free(xfs_inobt_rec_t *rp, int i)
1722 XFS_INOBT_SET_FREE(rp, i);
1724 #endif
1726 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_ITOBHV)
1727 bhv_desc_t *
1728 xfs_itobhv(xfs_inode_t *ip)
1730 return XFS_ITOBHV(ip);
1732 #endif
1734 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_ITOV)
1735 vnode_t *
1736 xfs_itov(xfs_inode_t *ip)
1738 return XFS_ITOV(ip);
1740 #endif
1742 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_LBLOG)
1744 xfs_lblog(xfs_mount_t *mp)
1746 return XFS_LBLOG(mp);
1748 #endif
1750 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_LBSIZE)
1752 xfs_lbsize(xfs_mount_t *mp)
1754 return XFS_LBSIZE(mp);
1756 #endif
1758 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_LIC_ALL_FREE)
1759 void
1760 xfs_lic_all_free(xfs_log_item_chunk_t *cp)
1762 XFS_LIC_ALL_FREE(cp);
1764 #endif
1766 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_LIC_ARE_ALL_FREE)
1768 xfs_lic_are_all_free(xfs_log_item_chunk_t *cp)
1770 return XFS_LIC_ARE_ALL_FREE(cp);
1772 #endif
1774 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_LIC_CLAIM)
1775 void
1776 xfs_lic_claim(xfs_log_item_chunk_t *cp, int slot)
1778 XFS_LIC_CLAIM(cp, slot);
1780 #endif
1782 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_LIC_DESC_TO_CHUNK)
1783 xfs_log_item_chunk_t *
1784 xfs_lic_desc_to_chunk(xfs_log_item_desc_t *dp)
1786 return XFS_LIC_DESC_TO_CHUNK(dp);
1788 #endif
1790 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_LIC_DESC_TO_SLOT)
1792 xfs_lic_desc_to_slot(xfs_log_item_desc_t *dp)
1794 return XFS_LIC_DESC_TO_SLOT(dp);
1796 #endif
1798 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_LIC_INIT)
1799 void
1800 xfs_lic_init(xfs_log_item_chunk_t *cp)
1802 XFS_LIC_INIT(cp);
1804 #endif
1806 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_LIC_INIT_SLOT)
1807 void
1808 xfs_lic_init_slot(xfs_log_item_chunk_t *cp, int slot)
1810 XFS_LIC_INIT_SLOT(cp, slot);
1812 #endif
1814 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_LIC_ISFREE)
1816 xfs_lic_isfree(xfs_log_item_chunk_t *cp, int slot)
1818 return XFS_LIC_ISFREE(cp, slot);
1820 #endif
1822 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_LIC_RELSE)
1823 void
1824 xfs_lic_relse(xfs_log_item_chunk_t *cp, int slot)
1826 XFS_LIC_RELSE(cp, slot);
1828 #endif
1830 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_LIC_SLOT)
1831 xfs_log_item_desc_t *
1832 xfs_lic_slot(xfs_log_item_chunk_t *cp, int slot)
1834 return XFS_LIC_SLOT(cp, slot);
1836 #endif
1838 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_LIC_VACANCY)
1840 xfs_lic_vacancy(xfs_log_item_chunk_t *cp)
1842 return XFS_LIC_VACANCY(cp);
1844 #endif
1846 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_LITINO)
1848 xfs_litino(xfs_mount_t *mp)
1850 return XFS_LITINO(mp);
1852 #endif
1854 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_MAKE_IPTR)
1855 xfs_dinode_t *
1856 xfs_make_iptr(xfs_mount_t *mp, xfs_buf_t *b, int o)
1858 return XFS_MAKE_IPTR(mp, b, o);
1860 #endif
1862 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_MASK32HI)
1863 __uint32_t
1864 xfs_mask32hi(int n)
1866 return XFS_MASK32HI(n);
1868 #endif
1870 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_MASK32LO)
1871 __uint32_t
1872 xfs_mask32lo(int n)
1874 return XFS_MASK32LO(n);
1876 #endif
1878 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_MASK64HI)
1879 __uint64_t
1880 xfs_mask64hi(int n)
1882 return XFS_MASK64HI(n);
1884 #endif
1886 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_MASK64LO)
1887 __uint64_t
1888 xfs_mask64lo(int n)
1890 return XFS_MASK64LO(n);
1892 #endif
1894 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_MIN_FREELIST)
1896 xfs_min_freelist(xfs_agf_t *a, xfs_mount_t *mp)
1898 return XFS_MIN_FREELIST(a, mp);
1900 #endif
1902 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_MIN_FREELIST_PAG)
1904 xfs_min_freelist_pag(xfs_perag_t *pag, xfs_mount_t *mp)
1906 return XFS_MIN_FREELIST_PAG(pag, mp);
1908 #endif
1910 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_MIN_FREELIST_RAW)
1912 xfs_min_freelist_raw(uint bl, uint cl, xfs_mount_t *mp)
1914 return XFS_MIN_FREELIST_RAW(bl, cl, mp);
1916 #endif
1918 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_MTOVFS)
1919 vfs_t *
1920 xfs_mtovfs(xfs_mount_t *mp)
1922 return XFS_MTOVFS(mp);
1924 #endif
1926 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_OFFBNO_TO_AGINO)
1927 xfs_agino_t
1928 xfs_offbno_to_agino(xfs_mount_t *mp, xfs_agblock_t b, int o)
1930 return XFS_OFFBNO_TO_AGINO(mp, b, o);
1932 #endif
1934 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_PREALLOC_BLOCKS)
1935 xfs_agblock_t
1936 xfs_prealloc_blocks(xfs_mount_t *mp)
1938 return XFS_PREALLOC_BLOCKS(mp);
1940 #endif
1942 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_BLOCK)
1943 xfs_agblock_t
1944 xfs_sb_block(xfs_mount_t *mp)
1946 return XFS_SB_BLOCK(mp);
1948 #endif
1950 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_GOOD_VERSION)
1952 xfs_sb_good_version(xfs_sb_t *sbp)
1954 return XFS_SB_GOOD_VERSION(sbp);
1956 #endif
1958 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_ADDATTR)
1959 void
1960 xfs_sb_version_addattr(xfs_sb_t *sbp)
1962 XFS_SB_VERSION_ADDATTR(sbp);
1964 #endif
1966 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_ADDDALIGN)
1967 void
1968 xfs_sb_version_adddalign(xfs_sb_t *sbp)
1970 XFS_SB_VERSION_ADDDALIGN(sbp);
1972 #endif
1974 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_ADDNLINK)
1975 void
1976 xfs_sb_version_addnlink(xfs_sb_t *sbp)
1978 XFS_SB_VERSION_ADDNLINK(sbp);
1980 #endif
1982 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_ADDQUOTA)
1983 void
1984 xfs_sb_version_addquota(xfs_sb_t *sbp)
1986 XFS_SB_VERSION_ADDQUOTA(sbp);
1988 #endif
1990 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_ADDSHARED)
1991 void
1992 xfs_sb_version_addshared(xfs_sb_t *sbp)
1994 XFS_SB_VERSION_ADDSHARED(sbp);
1996 #endif
1998 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_HASALIGN)
2000 xfs_sb_version_hasalign(xfs_sb_t *sbp)
2002 return XFS_SB_VERSION_HASALIGN(sbp);
2004 #endif
2006 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_HASATTR)
2008 xfs_sb_version_hasattr(xfs_sb_t *sbp)
2010 return XFS_SB_VERSION_HASATTR(sbp);
2012 #endif
2014 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_HASDALIGN)
2016 xfs_sb_version_hasdalign(xfs_sb_t *sbp)
2018 return XFS_SB_VERSION_HASDALIGN(sbp);
2020 #endif
2022 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_HASDIRV2)
2024 xfs_sb_version_hasdirv2(xfs_sb_t *sbp)
2026 return XFS_SB_VERSION_HASDIRV2(sbp);
2028 #endif
2030 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_HASEXTFLGBIT)
2032 xfs_sb_version_hasextflgbit(xfs_sb_t *sbp)
2034 return XFS_SB_VERSION_HASEXTFLGBIT(sbp);
2036 #endif
2038 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_HASNLINK)
2040 xfs_sb_version_hasnlink(xfs_sb_t *sbp)
2042 return XFS_SB_VERSION_HASNLINK(sbp);
2044 #endif
2046 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_HASQUOTA)
2048 xfs_sb_version_hasquota(xfs_sb_t *sbp)
2050 return XFS_SB_VERSION_HASQUOTA(sbp);
2052 #endif
2054 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_HASSHARED)
2056 xfs_sb_version_hasshared(xfs_sb_t *sbp)
2058 return XFS_SB_VERSION_HASSHARED(sbp);
2060 #endif
2062 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_NUM)
2064 xfs_sb_version_num(xfs_sb_t *sbp)
2066 return XFS_SB_VERSION_NUM(sbp);
2068 #endif
2070 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_SUBALIGN)
2071 void
2072 xfs_sb_version_subalign(xfs_sb_t *sbp)
2074 XFS_SB_VERSION_SUBALIGN(sbp);
2076 #endif
2078 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_SUBSHARED)
2079 void
2080 xfs_sb_version_subshared(xfs_sb_t *sbp)
2082 XFS_SB_VERSION_SUBSHARED(sbp);
2084 #endif
2086 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_HASLOGV2)
2088 xfs_sb_version_haslogv2(xfs_sb_t *sbp)
2090 return XFS_SB_VERSION_HASLOGV2(sbp);
2092 #endif
2094 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_HASSECTOR)
2096 xfs_sb_version_hassector(xfs_sb_t *sbp)
2098 return XFS_SB_VERSION_HASSECTOR(sbp);
2100 #endif
2102 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_TONEW)
2103 unsigned
2104 xfs_sb_version_tonew(unsigned v)
2106 return XFS_SB_VERSION_TONEW(v);
2108 #endif
2110 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_TOOLD)
2111 unsigned
2112 xfs_sb_version_toold(unsigned v)
2114 return XFS_SB_VERSION_TOOLD(v);
2116 #endif
2118 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XLOG_GRANT_ADD_SPACE)
2119 void
2120 xlog_grant_add_space(xlog_t *log, int bytes, int type)
2122 XLOG_GRANT_ADD_SPACE(log, bytes, type);
2124 #endif
2126 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XLOG_GRANT_SUB_SPACE)
2127 void
2128 xlog_grant_sub_space(xlog_t *log, int bytes, int type)
2130 XLOG_GRANT_SUB_SPACE(log, bytes, type);
2132 #endif
2134 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_HASMOREBITS)
2136 xfs_sb_version_hasmorebits(xfs_sb_t *sbp)
2138 return XFS_SB_VERSION_HASMOREBITS(sbp);
2140 #endif