2 * Copyright (c) 2000 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:
28 * For further information regarding this notice, see:
30 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
35 #include "platform_defs.h"
38 #include <xfs_types.h>
45 #include <xfs_da_btree.h>
46 #include <xfs_bmap_btree.h>
47 #include <xfs_alloc_btree.h>
48 #include <xfs_ialloc_btree.h>
49 #include <xfs_alloc.h>
50 #include <xfs_ialloc.h>
51 #include <xfs_rtalloc.h>
52 #include <xfs_btree.h>
54 #include <xfs_dir_sf.h>
55 #include <xfs_dir_leaf.h>
57 #include <xfs_dir2_data.h>
58 #include <xfs_dir2_leaf.h>
59 #include <xfs_dir2_block.h>
60 #include <xfs_dir2_node.h>
61 #include <xfs_dir2_sf.h>
62 #include <xfs_attr_sf.h>
63 #include <xfs_dinode.h>
64 #include <xfs_attr_leaf.h>
65 #include <xfs_quota.h>
66 #include <xfs_dqblk.h>
67 #include <xfs_mount.h>
68 #include <xfs_trans_space.h>
69 #include <xfs_inode.h>
70 #include <xfs_buf_item.h>
71 #include <xfs_inode_item.h>
76 #include <xfs_log_priv.h>
79 * Argument structure for libxfs_init().
82 /* input parameters */
83 char *volname
; /* pathname of volume */
84 char *dname
; /* pathname of data "subvolume" */
85 char *logname
; /* pathname of log "subvolume" */
86 char *rtname
; /* pathname of realtime "subvolume" */
87 int isreadonly
; /* filesystem is only read in applic */
88 int disfile
; /* data "subvolume" is a regular file */ int dcreat
; /* try to create data subvolume */
89 int lisfile
; /* log "subvolume" is a regular file */
90 int lcreat
; /* try to create log subvolume */
91 int risfile
; /* realtime "subvolume" is a reg file */ int rcreat
; /* try to create realtime subvolume */
92 char *notvolmsg
; /* format string for not XLV message */
93 int notvolok
; /* set if not XLV => try data */
95 dev_t ddev
; /* device for data subvolume */
96 dev_t logdev
; /* device for log subvolume */
97 dev_t rtdev
; /* device for realtime subvolume */
98 long long dsize
; /* size of data subvolume (BBs) */
99 long long logBBsize
; /* size of log subvolume (BBs) */
100 /* (blocks allocated for use as
101 * log is stored in mount structure) */
102 long long logBBstart
; /* start block of log subvolume (BBs) */ long long rtsize
; /* size of realtime subvolume (BBs) */
103 int dfd
; /* data subvolume file descriptor */
104 int logfd
; /* log subvolume file descriptor */
105 int rtfd
; /* realtime subvolume file descriptor */
106 int setblksize
; /* attempt to set device block size */
109 #define LIBXFS_ISREADONLY 0x0069 /* disallow all mounted filesystems */
110 #define LIBXFS_ISINACTIVE 0x6900 /* allow mounted only if mounted ro */
112 extern char *progname
;
113 extern int libxfs_init (libxfs_init_t
*);
114 extern int libxfs_device_to_fd (dev_t
);
115 extern dev_t
libxfs_device_open (char *, int, int, int);
116 extern void libxfs_device_zero (dev_t
, xfs_daddr_t
, uint
);
117 extern void libxfs_device_close (dev_t
);
119 /* check or write log footer: specify device, log size in blocks & uuid */
120 extern int libxfs_log_clear (dev_t
, xfs_daddr_t
, uint
, uuid_t
*, int);
123 * Define a user-level mount structure with all we need
124 * in order to make use of the numerous XFS_* macros.
127 typedef struct xfs_mount
{
128 xfs_sb_t m_sb
; /* copy of fs superblock */
129 int m_bsize
; /* fs logical block size */
130 xfs_agnumber_t m_agfrotor
; /* last ag where space found */
131 xfs_agnumber_t m_agirotor
; /* last ag dir inode alloced */
132 xfs_agnumber_t m_maxagi
; /* highest inode alloc group */
133 uint m_rsumlevels
; /* rt summary levels */
134 uint m_rsumsize
; /* size of rt summary, bytes */
135 struct xfs_inode
*m_rbmip
; /* pointer to bitmap inode */
136 struct xfs_inode
*m_rsumip
; /* pointer to summary inode */
137 struct xfs_inode
*m_rootip
; /* pointer to root directory */
141 __uint8_t m_dircook_elog
; /* log d-cookie entry bits */
142 __uint8_t m_blkbit_log
; /* blocklog + NBBY */
143 __uint8_t m_blkbb_log
; /* blocklog - BBSHIFT */
144 __uint8_t m_agno_log
; /* log #ag's */
145 __uint8_t m_agino_log
; /* #bits for agino in inum */
146 __uint16_t m_inode_cluster_size
;/* min inode buf size */
147 uint m_blockmask
; /* sb_blocksize-1 */
148 uint m_blockwsize
; /* sb_blocksize in words */
149 uint m_blockwmask
; /* blockwsize-1 */
150 uint m_alloc_mxr
[2]; /* XFS_ALLOC_BLOCK_MAXRECS */
151 uint m_alloc_mnr
[2]; /* XFS_ALLOC_BLOCK_MINRECS */
152 uint m_bmap_dmxr
[2]; /* XFS_BMAP_BLOCK_DMAXRECS */
153 uint m_bmap_dmnr
[2]; /* XFS_BMAP_BLOCK_DMINRECS */
154 uint m_inobt_mxr
[2]; /* XFS_INOBT_BLOCK_MAXRECS */
155 uint m_inobt_mnr
[2]; /* XFS_INOBT_BLOCK_MINRECS */
156 uint m_ag_maxlevels
; /* XFS_AG_MAXLEVELS */
157 uint m_bm_maxlevels
[2]; /* XFS_BM_MAXLEVELS */
158 uint m_in_maxlevels
; /* XFS_IN_MAXLEVELS */
159 xfs_perag_t
*m_perag
; /* per-ag accounting info */
160 uint m_flags
; /* global mount flags */
161 uint m_qflags
; /* quota status flags */
162 uint m_attroffset
; /* inode attribute offset */
163 int m_da_node_ents
; /* how many entries in danode */
164 int m_ialloc_inos
; /* inodes in inode allocation */
165 int m_ialloc_blks
; /* blocks in inode allocation */
166 int m_litino
; /* size of inode union area */
167 int m_inoalign_mask
;/* mask sb_inoalignmt if used */
168 xfs_trans_reservations_t m_reservations
;/* precomputed res values */
169 __uint64_t m_maxicount
; /* maximum inode count */
170 int m_dalign
; /* stripe unit */
171 int m_swidth
; /* stripe width */
172 int m_sinoalign
; /* stripe unit inode alignmnt */
173 int m_dir_magicpct
; /* 37% of the dir blocksize */
174 __uint8_t m_dirversion
; /* 1 or 2 */
175 int m_dirblksize
; /* directory block sz--bytes */
176 int m_dirblkfsbs
; /* directory block sz--fsbs */
177 xfs_dablk_t m_dirdatablk
; /* blockno of dir data v2 */
178 xfs_dablk_t m_dirleafblk
; /* blockno of dir non-data v2 */
179 xfs_dablk_t m_dirfreeblk
; /* blockno of dirfreeindex v2 */
183 extern xfs_mount_t
*libxfs_mount (xfs_mount_t
*, xfs_sb_t
*,
184 dev_t
, dev_t
, dev_t
, int);
185 extern void libxfs_mount_common (xfs_mount_t
*, xfs_sb_t
*);
186 extern void libxfs_initialize_perag (xfs_mount_t
*, int);
187 extern void libxfs_umount (xfs_mount_t
*);
188 extern int libxfs_rtmount_init (xfs_mount_t
*);
189 extern void libxfs_alloc_compute_maxlevels (xfs_mount_t
*);
190 extern void libxfs_bmap_compute_maxlevels (xfs_mount_t
*, int);
191 extern void libxfs_ialloc_compute_maxlevels (xfs_mount_t
*);
192 extern void libxfs_trans_init (xfs_mount_t
*);
196 * Simple I/O interface
198 typedef struct xfs_buf
{
206 /* b_addr must be the last field */
208 #define XFS_BUF_PTR(bp) ((bp)->b_addr)
209 #define xfs_buf_offset(bp, offset) (XFS_BUF_PTR(bp) + (offset))
210 #define XFS_BUF_ADDR(bp) ((bp)->b_blkno)
211 #define XFS_BUF_COUNT(bp) ((bp)->b_bcount)
212 #define XFS_BUF_TARGET(bp) ((bp)->b_dev)
213 #define XFS_BUF_SET_PTR(bp,p,cnt) ((bp)->b_addr = (char *)(p)); \
214 XFS_BUF_SETCOUNT(bp,cnt)
215 #define XFS_BUF_SET_ADDR(bp,blk) ((bp)->b_blkno = (blk))
216 #define XFS_BUF_SETCOUNT(bp,cnt) ((bp)->b_bcount = (cnt))
218 #define XFS_BUF_FSPRIVATE(bp,type) ((type)(bp)->b_fsprivate)
219 #define XFS_BUF_SET_FSPRIVATE(bp,val) (bp)->b_fsprivate = (void *)(val)
220 #define XFS_BUF_FSPRIVATE2(bp,type) ((type)(bp)->b_fsprivate2)
221 #define XFS_BUF_SET_FSPRIVATE2(bp,val) (bp)->b_fsprivate2 = (void *)(val)
222 #define XFS_BUF_FSPRIVATE3(bp,type) ((type)(bp)->b_fsprivate3)
223 #define XFS_BUF_SET_FSPRIVATE3(bp,val) (bp)->b_fsprivate3 = (void *)(val)
225 extern xfs_buf_t
*libxfs_getbuf (dev_t
, xfs_daddr_t
, int);
226 extern xfs_buf_t
*libxfs_readbuf (dev_t
, xfs_daddr_t
, int, int);
227 extern xfs_buf_t
*libxfs_getsb (xfs_mount_t
*, int);
228 extern int libxfs_readbufr (dev_t
, xfs_daddr_t
, xfs_buf_t
*, int, int);
229 extern int libxfs_writebuf (xfs_buf_t
*, int);
230 extern int libxfs_writebuf_int (xfs_buf_t
*, int);
231 extern void libxfs_putbuf (xfs_buf_t
*);
235 * Transaction interface
238 typedef struct xfs_log_item
{
239 struct xfs_log_item_desc
*li_desc
; /* ptr to current desc*/
240 struct xfs_mount
*li_mountp
; /* ptr to fs mount */
241 uint li_type
; /* item type */
244 typedef struct xfs_inode_log_item
{
245 xfs_log_item_t ili_item
; /* common portion */
246 struct xfs_inode
*ili_inode
; /* inode pointer */
247 unsigned short ili_flags
; /* misc flags */
248 unsigned int ili_last_fields
; /* fields when flushed*/
249 xfs_inode_log_format_t ili_format
; /* logged structure */
250 } xfs_inode_log_item_t
;
252 typedef struct xfs_buf_log_item
{
253 xfs_log_item_t bli_item
; /* common item structure */
254 struct xfs_buf
*bli_buf
; /* real buffer pointer */
255 unsigned int bli_flags
; /* misc flags */
256 unsigned int bli_recur
; /* recursion count */
257 xfs_buf_log_format_t bli_format
; /* in-log header */
258 } xfs_buf_log_item_t
;
260 #include <xfs_trans.h>
262 typedef struct xfs_trans
{
263 unsigned int t_type
; /* transaction type */
264 xfs_mount_t
*t_mountp
; /* ptr to fs mount struct */
265 unsigned int t_flags
; /* misc flags */
266 long t_icount_delta
; /* superblock icount change */
267 long t_ifree_delta
; /* superblock ifree change */
268 long t_fdblocks_delta
; /* superblock fdblocks chg */
269 long t_frextents_delta
; /* superblock freextents chg */
270 unsigned int t_items_free
; /* log item descs free */
271 xfs_log_item_chunk_t t_items
; /* first log item desc chunk */
274 extern xfs_trans_t
*libxfs_trans_alloc (xfs_mount_t
*, int);
275 extern xfs_trans_t
*libxfs_trans_dup (xfs_trans_t
*);
276 extern int libxfs_trans_reserve (xfs_trans_t
*, uint
,uint
,uint
,uint
,uint
);
277 extern int libxfs_trans_commit (xfs_trans_t
*, uint
, xfs_lsn_t
*);
278 extern void libxfs_trans_cancel (xfs_trans_t
*, int);
279 extern void libxfs_mod_sb (xfs_trans_t
*, __int64_t
);
281 extern int libxfs_trans_iget (xfs_mount_t
*, xfs_trans_t
*, xfs_ino_t
,
282 uint
, struct xfs_inode
**);
283 extern void libxfs_trans_iput(xfs_trans_t
*, struct xfs_inode
*, uint
);
284 extern void libxfs_trans_ijoin (xfs_trans_t
*, struct xfs_inode
*, uint
);
285 extern void libxfs_trans_ihold (xfs_trans_t
*, struct xfs_inode
*);
286 extern void libxfs_trans_log_inode (xfs_trans_t
*, struct xfs_inode
*,
289 extern void libxfs_trans_brelse (xfs_trans_t
*, struct xfs_buf
*);
290 extern void libxfs_trans_binval (xfs_trans_t
*, struct xfs_buf
*);
291 extern void libxfs_trans_bjoin (xfs_trans_t
*, struct xfs_buf
*);
292 extern void libxfs_trans_bhold (xfs_trans_t
*, struct xfs_buf
*);
293 extern void libxfs_trans_log_buf (xfs_trans_t
*, struct xfs_buf
*,
295 extern xfs_buf_t
*libxfs_trans_get_buf (xfs_trans_t
*, dev_t
,
296 xfs_daddr_t
, int, uint
);
297 extern int libxfs_trans_read_buf (xfs_mount_t
*, xfs_trans_t
*, dev_t
,
298 xfs_daddr_t
, int, uint
, struct xfs_buf
**);
302 * Simple memory interface
304 typedef struct xfs_zone
{
305 int zone_unitsize
; /* Size in bytes of zone unit */
306 char *zone_name
; /* tag name */
307 int allocated
; /* debug: How many currently allocated */
310 extern xfs_zone_t
*libxfs_zone_init (int, char *);
311 extern void *libxfs_zone_zalloc (xfs_zone_t
*);
312 extern void libxfs_zone_free (xfs_zone_t
*, void *);
313 extern void *libxfs_malloc (size_t);
314 extern void libxfs_free (void *);
315 extern void *libxfs_realloc (void *, size_t);
321 struct xfs_inode_log_item
;
322 typedef struct xfs_inode
{
323 xfs_mount_t
*i_mount
; /* fs mount struct ptr */
324 xfs_ino_t i_ino
; /* inode number (agno/agino) */
325 xfs_daddr_t i_blkno
; /* blkno of inode buffer */
326 dev_t i_dev
; /* dev for this inode */
327 ushort i_len
; /* len of inode buffer */
328 ushort i_boffset
; /* off of inode in buffer */
329 xfs_ifork_t
*i_afp
; /* attribute fork pointer */
330 xfs_ifork_t i_df
; /* data fork */
331 struct xfs_trans
*i_transp
; /* ptr to owning transaction */
332 struct xfs_inode_log_item
*i_itemp
; /* logging information */
333 unsigned int i_delayed_blks
; /* count of delay alloc blks */
334 xfs_dinode_core_t i_d
; /* most of ondisk inode */
337 extern int libxfs_inode_alloc (xfs_trans_t
**, xfs_inode_t
*, mode_t
,
338 ushort
, dev_t
, cred_t
*, xfs_inode_t
**);
339 extern void libxfs_trans_inode_alloc_buf (xfs_trans_t
*, xfs_buf_t
*);
341 extern void libxfs_idata_realloc (xfs_inode_t
*, int, int);
342 extern int libxfs_iread (xfs_mount_t
*, xfs_trans_t
*, xfs_ino_t
,
343 xfs_inode_t
**, xfs_daddr_t
);
344 extern void libxfs_ichgtime (xfs_inode_t
*, int);
345 extern int libxfs_iflush_int (xfs_inode_t
*, xfs_buf_t
*);
346 extern int libxfs_itobp (xfs_mount_t
*, xfs_trans_t
*, xfs_inode_t
*,
347 xfs_dinode_t
**, xfs_buf_t
**, xfs_daddr_t
);
348 extern int libxfs_iget (xfs_mount_t
*, xfs_trans_t
*, xfs_ino_t
,
349 uint
, xfs_inode_t
**, xfs_daddr_t
);
350 extern void libxfs_iput (xfs_inode_t
*, uint
);
354 * Directory interface
356 extern void libxfs_dir_mount (xfs_mount_t
*);
357 extern void libxfs_dir2_mount (xfs_mount_t
*);
358 extern int libxfs_dir_init (xfs_trans_t
*, xfs_inode_t
*, xfs_inode_t
*);
359 extern int libxfs_dir2_init (xfs_trans_t
*, xfs_inode_t
*, xfs_inode_t
*);
360 extern int libxfs_dir_createname (xfs_trans_t
*, xfs_inode_t
*, char *,
361 int, xfs_ino_t
, xfs_fsblock_t
*,
362 xfs_bmap_free_t
*, xfs_extlen_t
);
363 extern int libxfs_dir2_createname (xfs_trans_t
*, xfs_inode_t
*, char *,
364 int, xfs_ino_t
, xfs_fsblock_t
*,
365 xfs_bmap_free_t
*, xfs_extlen_t
);
366 extern int libxfs_dir_lookup (xfs_trans_t
*, xfs_inode_t
*,
367 char *, int, xfs_ino_t
*);
368 extern int libxfs_dir2_lookup (xfs_trans_t
*, xfs_inode_t
*,
369 char *, int, xfs_ino_t
*);
370 extern int libxfs_dir_replace (xfs_trans_t
*, xfs_inode_t
*,
371 char *, int, xfs_ino_t
, xfs_fsblock_t
*,
372 xfs_bmap_free_t
*, xfs_extlen_t
);
373 extern int libxfs_dir2_replace (xfs_trans_t
*, xfs_inode_t
*,
374 char *, int, xfs_ino_t
, xfs_fsblock_t
*,
375 xfs_bmap_free_t
*, xfs_extlen_t
);
376 extern int libxfs_dir_removename (xfs_trans_t
*, xfs_inode_t
*,
377 char *, int, xfs_ino_t
, xfs_fsblock_t
*,
378 xfs_bmap_free_t
*, xfs_extlen_t
);
379 extern int libxfs_dir2_removename (xfs_trans_t
*, xfs_inode_t
*,
380 char *, int, xfs_ino_t
, xfs_fsblock_t
*,
381 xfs_bmap_free_t
*, xfs_extlen_t
);
382 extern int libxfs_dir_bogus_removename (xfs_trans_t
*, xfs_inode_t
*,
383 char *, xfs_fsblock_t
*, xfs_bmap_free_t
*,
384 xfs_extlen_t
, xfs_dahash_t
, int);
385 extern int libxfs_dir2_bogus_removename (xfs_trans_t
*, xfs_inode_t
*,
386 char *, xfs_fsblock_t
*, xfs_bmap_free_t
*,
387 xfs_extlen_t
, xfs_dahash_t
, int);
391 * Block map interface
393 extern int libxfs_bmapi (xfs_trans_t
*, xfs_inode_t
*, xfs_fileoff_t
,
394 xfs_filblks_t
, int, xfs_fsblock_t
*,
395 xfs_extlen_t
, xfs_bmbt_irec_t
*, int *,
397 extern int libxfs_bmap_finish (xfs_trans_t
**, xfs_bmap_free_t
*,
398 xfs_fsblock_t
, int *);
399 extern int libxfs_bmap_next_offset (xfs_trans_t
*, xfs_inode_t
*,
400 xfs_fileoff_t
*, int);
401 extern int libxfs_bunmapi (xfs_trans_t
*, xfs_inode_t
*, xfs_fileoff_t
,
402 xfs_filblks_t
, int, xfs_extnum_t
,
403 xfs_fsblock_t
*, xfs_bmap_free_t
*, int *);
404 extern void libxfs_bmap_del_free (xfs_bmap_free_t
*,
405 xfs_bmap_free_item_t
*, xfs_bmap_free_item_t
*);
409 * All other routines we want to keep common...
412 extern int libxfs_highbit32 (__uint32_t
);
413 extern int libxfs_highbit64 (__uint64_t
);
414 extern uint
libxfs_da_log2_roundup (uint
);
416 extern void libxfs_xlate_sb (void *, xfs_sb_t
*, int, xfs_arch_t
,
418 extern void libxfs_xlate_dinode_core (xfs_caddr_t buf
,
419 xfs_dinode_core_t
*, int, xfs_arch_t
);
421 extern int libxfs_alloc_fix_freelist (xfs_alloc_arg_t
*, int);
422 extern int libxfs_alloc_file_space (xfs_inode_t
*, xfs_off_t
,
423 xfs_off_t
, int, int);
425 extern xfs_dahash_t
libxfs_da_hashname (uchar_t
*, int);
426 extern int libxfs_attr_leaf_newentsize (xfs_da_args_t
*, int, int *);
428 extern xfs_filblks_t
libxfs_bmbt_get_blockcount (xfs_bmbt_rec_t
*);
429 extern xfs_fileoff_t
libxfs_bmbt_get_startoff (xfs_bmbt_rec_t
*);
430 extern void libxfs_bmbt_get_all (xfs_bmbt_rec_t
*, xfs_bmbt_irec_t
*);
432 extern int libxfs_free_extent (xfs_trans_t
*, xfs_fsblock_t
, xfs_extlen_t
);
433 extern int libxfs_rtfree_extent (xfs_trans_t
*, xfs_rtblock_t
,
436 /* Directory/Attribute routines used by xfs_repair */
437 extern void libxfs_da_bjoin (xfs_trans_t
*, xfs_dabuf_t
*);
438 extern int libxfs_da_shrink_inode (xfs_da_args_t
*, xfs_dablk_t
,
440 extern int libxfs_da_grow_inode (xfs_da_args_t
*, xfs_dablk_t
*);
441 extern void libxfs_da_bhold (xfs_trans_t
*, xfs_dabuf_t
*);
442 extern void libxfs_da_brelse (xfs_trans_t
*, xfs_dabuf_t
*);
443 extern int libxfs_da_read_bufr (xfs_trans_t
*, xfs_inode_t
*, xfs_dablk_t
,
444 xfs_daddr_t
, xfs_dabuf_t
**, int);
445 extern int libxfs_da_read_buf (xfs_trans_t
*, xfs_inode_t
*,
446 xfs_dablk_t
, xfs_daddr_t
, xfs_dabuf_t
**, int);
447 extern int libxfs_da_get_buf (xfs_trans_t
*, xfs_inode_t
*,
448 xfs_dablk_t
, xfs_daddr_t
, xfs_dabuf_t
**, int);
449 extern void libxfs_da_log_buf (xfs_trans_t
*, xfs_dabuf_t
*, uint
, uint
);
450 extern int libxfs_dir2_shrink_inode (xfs_da_args_t
*, xfs_dir2_db_t
,
452 extern int libxfs_dir2_grow_inode (xfs_da_args_t
*, int, xfs_dir2_db_t
*);
453 extern int libxfs_dir2_isleaf (xfs_trans_t
*, xfs_inode_t
*, int *);
454 extern int libxfs_dir2_isblock (xfs_trans_t
*, xfs_inode_t
*, int *);
455 extern void libxfs_dir2_data_use_free (xfs_trans_t
*, xfs_dabuf_t
*,
456 xfs_dir2_data_unused_t
*, xfs_dir2_data_aoff_t
,
457 xfs_dir2_data_aoff_t
, int *, int *);
458 extern void libxfs_dir2_data_make_free (xfs_trans_t
*, xfs_dabuf_t
*,
459 xfs_dir2_data_aoff_t
, xfs_dir2_data_aoff_t
,
461 extern void libxfs_dir2_data_log_entry (xfs_trans_t
*, xfs_dabuf_t
*,
462 xfs_dir2_data_entry_t
*);
463 extern void libxfs_dir2_data_log_header (xfs_trans_t
*, xfs_dabuf_t
*);
464 extern void libxfs_dir2_data_freescan (xfs_mount_t
*, xfs_dir2_data_t
*,
466 extern void libxfs_dir2_free_log_bests (xfs_trans_t
*, xfs_dabuf_t
*,
469 /* Shared utility routines */
470 extern unsigned int libxfs_log2_roundup(unsigned int i
);
472 #endif /* __LIBXFS_H__ */