]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
libxfs: split out xfs->libxfs mappings libxfs-3.19-update
authorDave Chinner <dchinner@redhat.com>
Fri, 19 Dec 2014 04:23:55 +0000 (15:23 +1100)
committerDave Chinner <david@fromorbit.com>
Fri, 19 Dec 2014 04:23:55 +0000 (15:23 +1100)
The defines that map the external libxfs namespace are found only in
libxfs_priv.h. That means we have to re-declare all the exported
function prototypes in libxfs.h so that external uses know about
them and can use them. This also means we effectively have duplicate
function prototypes as they are all already declared in the xfs_*
namespace due to the includes of the libxfs header files through
libxfs.h.

Split the mapping macros out from libxfs_priv.h into a separate
libxfs_api_defs.h and include that header file directly in both
libxfs-priv.h and libxfs.h before we include any other header file.
This means that all the xfs_* namespace definitions are mapped to
libxfs_* namespaces correctly and we don't need to have duplicate
prototypes.

This also points out all the function prototypes the external code
uses but does not have function prototypes exposed by the mapped
libxfs header files, and hence indicates future kernel/user libxfs
synchronisation work that needs to be done.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
include/libxfs.h
libxfs/Makefile
libxfs/support/libxfs_api_defs.h [new file with mode: 0644]
libxfs/support/libxfs_priv.h
libxfs/xfs_alloc.h
libxfs/xfs_bmap.h
libxfs/xfs_inode_buf.h
repair/phase6.c

index 5bb4cf1adb4542615cf1b8eeb1235a4c977c8f42..2fd993f752324e907cf6e1a235108f6732c3f7cb 100644 (file)
@@ -19,6 +19,7 @@
 #ifndef __LIBXFS_H__
 #define __LIBXFS_H__
 
+#include <xfs/libxfs_api_defs.h>
 #include <xfs/platform_defs.h>
 
 #include <xfs/list.h>
@@ -157,11 +158,6 @@ extern int libxfs_log_header (xfs_caddr_t, uuid_t *, int, int, int,
 
 
 
-#define LIBXFS_ATTR_ROOT       0x0002  /* use attrs in root namespace */
-#define LIBXFS_ATTR_SECURE     0x0008  /* use attrs in security namespace */
-#define LIBXFS_ATTR_CREATE     0x0010  /* create, but fail if attr exists */
-#define LIBXFS_ATTR_REPLACE    0x0020  /* set, but fail if attr not exists */
-
 /* Shared utility routines */
 extern unsigned int    libxfs_log2_roundup(unsigned int i);
 
@@ -190,120 +186,6 @@ extern unsigned long      libxfs_physmem(void);   /* in kilobytes */
 #define XFS_INOBT_IS_FREE_DISK(rp,i)           \
                        ((be64_to_cpu((rp)->ir_free) & XFS_INOBT_MASK(i)) != 0)
 
-/*
- * public xfs kernel routines to be called as libxfs_*
- *
- * These are all present in the xfs_* namespace but we don't want that namespace
- * to be used or even exposed, and hence we declare them here explicitly if we
- * aren't directly building the libxfs code itself.
- *
- * XXX: This needs to be more formalised in the shared header files so that
- * these declarations can go away, and so there's documentation in the kernel
- * code base that certain functions are shared with userspace.
- */
-#ifndef __LIBXFS_INTERNAL_XFS_H
-
-/* xfs_sb.h */
-void   libxfs_mod_sb(struct xfs_trans *, __int64_t);
-void   libxfs_sb_from_disk(struct xfs_sb *, struct xfs_dsb *);
-void   libxfs_sb_to_disk(struct xfs_dsb *, struct xfs_sb *, __int64_t);
-void   libxfs_sb_quota_from_disk(struct xfs_sb *sbp);
-
-/* xfs_bmap.h */
-int    libxfs_bmapi_write(struct xfs_trans *tp, struct xfs_inode *ip,
-               xfs_fileoff_t bno, xfs_filblks_t len, int flags,
-               xfs_fsblock_t *firstblock, xfs_extlen_t total,
-               struct xfs_bmbt_irec *mval, int *nmap,
-               struct xfs_bmap_free *flist);
-int    libxfs_bunmapi(struct xfs_trans *tp, struct xfs_inode *ip,
-               xfs_fileoff_t bno, xfs_filblks_t len, int flags,
-               xfs_extnum_t nexts, xfs_fsblock_t *firstblock,
-               struct xfs_bmap_free *flist, int *done);
-void   libxfs_bmap_cancel(struct xfs_bmap_free *flist);
-int    libxfs_bmap_last_offset(struct xfs_inode *ip,
-               xfs_fileoff_t *unused, int whichfork);
-int    libxfs_bmap_finish(struct xfs_trans **tp, struct xfs_bmap_free *flist,
-               int *committed);
-
-/* xfs_dir2.h */
-int    libxfs_dir_init(struct xfs_trans *tp, struct xfs_inode *dp,
-                               struct xfs_inode *pdp);
-int    libxfs_dir_createname(struct xfs_trans *tp, struct xfs_inode *dp,
-                               struct xfs_name *name, xfs_ino_t inum,
-                               xfs_fsblock_t *first,
-                               struct xfs_bmap_free *flist, xfs_extlen_t tot);
-int    libxfs_dir_lookup(struct xfs_trans *tp, struct xfs_inode *dp,
-                               struct xfs_name *name, xfs_ino_t *inum,
-                               struct xfs_name *ci_name);
-int    libxfs_dir_replace(struct xfs_trans *tp, struct xfs_inode *dp,
-                               struct xfs_name *name, xfs_ino_t inum,
-                               xfs_fsblock_t *first,
-                               struct xfs_bmap_free *flist, xfs_extlen_t tot);
-
-int    libxfs_dir2_isblock(struct xfs_da_args *args, int *r);
-int    libxfs_dir2_isleaf(struct xfs_da_args *args, int *r);
-int    libxfs_dir2_shrink_inode(struct xfs_da_args *args, xfs_dir2_db_t db,
-                               struct xfs_buf *bp);
-
-void   libxfs_dir2_data_freescan(struct xfs_da_geometry *geo,
-               const struct xfs_dir_ops *ops,
-               struct xfs_dir2_data_hdr *hdr, int *loghead);
-void   libxfs_dir2_data_log_entry(struct xfs_da_args *args,
-               struct xfs_buf *bp, struct xfs_dir2_data_entry *dep);
-void   libxfs_dir2_data_log_header(struct xfs_da_args *args,
-               struct xfs_buf *bp);
-void   libxfs_dir2_data_log_unused(struct xfs_da_args *args,
-               struct xfs_buf *bp, struct xfs_dir2_data_unused *dup);
-void   libxfs_dir2_data_make_free(struct xfs_da_args *args,
-               struct xfs_buf *bp, xfs_dir2_data_aoff_t offset,
-               xfs_dir2_data_aoff_t len, int *needlogp, int *needscanp);
-void   libxfs_dir2_data_use_free(struct xfs_da_args *args,
-               struct xfs_buf *bp, struct xfs_dir2_data_unused *dup,
-               xfs_dir2_data_aoff_t offset, xfs_dir2_data_aoff_t len,
-               int *needlogp, int *needscanp);
-
-/* xfs_da_btree.h */
-uint   libxfs_da_hashname(const __uint8_t *name_string, int name_length);
-int    libxfs_da_shrink_inode(xfs_da_args_t *args, xfs_dablk_t dead_blkno,
-                                         struct xfs_buf *dead_buf);
-int    libxfs_da_read_buf(struct xfs_trans *trans, struct xfs_inode *dp,
-                              xfs_dablk_t bno, xfs_daddr_t mappedbno,
-                              struct xfs_buf **bpp, int whichfork,
-                              const struct xfs_buf_ops *ops);
-
-
-/* xfs_inode_buf.h */
-void   libxfs_dinode_calc_crc(struct xfs_mount *, struct xfs_dinode *);
-
-/* xfs_inode_fork.h */
-void   libxfs_idata_realloc(struct xfs_inode *, int, int);
-
-/* xfs_symlink_remote.h */
-int    libxfs_symlink_blocks(struct xfs_mount *mp, int pathlen);
-bool   libxfs_symlink_hdr_ok(xfs_ino_t ino, uint32_t offset, uint32_t size,
-                             struct xfs_buf *bp);
-
-/* xfs_bit.h */
-/* XXX: these are special as they are static inline functions in the header */
-#define libxfs_highbit32       xfs_highbit32
-#define libxfs_highbit64       xfs_highbit64
-
-/* xfs_alloc.c */
-int libxfs_alloc_fix_freelist(xfs_alloc_arg_t *, int);
-
-/* xfs_attr.c */
-int libxfs_attr_get(struct xfs_inode *, const unsigned char *,
-                                       unsigned char *, int *, int);
-int libxfs_attr_set(struct xfs_inode *, const unsigned char *,
-                                       unsigned char *, int, int);
-int libxfs_attr_remove(struct xfs_inode *, const unsigned char *, int);
-
-/* xfs_bmap.c */
-xfs_bmbt_rec_host_t *xfs_bmap_search_extents(struct xfs_inode *, xfs_fileoff_t,
-                               int, int *, xfs_extnum_t *, xfs_bmbt_irec_t *,
-                               xfs_bmbt_irec_t *);
-void libxfs_bmbt_get_all(struct xfs_bmbt_rec_host *r, struct xfs_bmbt_irec *s);
-
 static inline void
 libxfs_bmbt_disk_get_all(
        struct xfs_bmbt_rec     *rp,
@@ -316,21 +198,19 @@ libxfs_bmbt_disk_get_all(
        libxfs_bmbt_get_all(&hrec, irec);
 }
 
-void libxfs_dinode_from_disk(struct xfs_icdinode *,
-                            struct xfs_dinode *);
-bool libxfs_dinode_verify(struct xfs_mount *mp, xfs_ino_t ino,
-                         struct xfs_dinode *dip);
-
-/* this file */
-/* XXX: this needs cleanup  like the xfs_bit.h stuff */
-#define libxfs_buf_verify_cksum        xfs_buf_verify_cksum
-#define libxfs_buf_update_cksum        xfs_buf_update_cksum
-
-#endif /* __LIBXFS_INTERNAL_XFS_H */
-
 /* XXX: this is clearly a bug - a shared header needs to export this */
 /* xfs_rtalloc.c */
 int libxfs_rtfree_extent(struct xfs_trans *, xfs_rtblock_t, xfs_extlen_t);
 
+/* XXX: need parts of xfs_attr.h in userspace */
+#define LIBXFS_ATTR_ROOT       0x0002  /* use attrs in root namespace */
+#define LIBXFS_ATTR_SECURE     0x0008  /* use attrs in security namespace */
+#define LIBXFS_ATTR_CREATE     0x0010  /* create, but fail if attr exists */
+#define LIBXFS_ATTR_REPLACE    0x0020  /* set, but fail if attr not exists */
+
+int xfs_attr_remove(struct xfs_inode *dp, const unsigned char *name, int flags);
+int xfs_attr_set(struct xfs_inode *dp, const unsigned char *name,
+                unsigned char *value, int valuelen, int flags);
+
 
 #endif /* __LIBXFS_H__ */
index 0afdcaf9966ddb702dae9d3b18597131effd5e27..0deaa9a0cc18800f91c88d2bccccaf12be6581b7 100644 (file)
@@ -24,7 +24,8 @@ HFILES = $(addprefix support/, $(SHFILES)) \
        xfs_dir2_priv.h
 
 # headers installed in QA targets
-SQAHFILES = libxfs_io.h \
+SQAHFILES = libxfs_api_defs.h \
+       libxfs_io.h \
        xfs_arch.h \
        xfs_btree_trace.h \
        xfs_inode.h \
diff --git a/libxfs/support/libxfs_api_defs.h b/libxfs/support/libxfs_api_defs.h
new file mode 100644 (file)
index 0000000..ebed749
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2000-2005 Silicon Graphics, Inc.
+ * All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef __LIBXFS_API_DEFS_H__
+#define __LIBXFS_API_DEFS_H__
+
+/*
+ * This file defines all the kernel based functions we expose to userspace
+ * via the libxfs_* namespace. This is kept in a separate header file so
+ * it can be included in both the internal and external libxfs header files
+ * without introducing any depenencies between the two.
+ */
+#define xfs_highbit32                  libxfs_highbit32
+#define xfs_highbit64                  libxfs_highbit64
+
+#define xfs_fs_repair_cmn_err          libxfs_fs_repair_cmn_err
+#define xfs_fs_cmn_err                 libxfs_fs_cmn_err
+
+#define xfs_trans_alloc                        libxfs_trans_alloc
+#define xfs_trans_add_item             libxfs_trans_add_item
+#define xfs_trans_bhold                        libxfs_trans_bhold
+#define xfs_trans_binval               libxfs_trans_binval
+#define xfs_trans_bjoin                        libxfs_trans_bjoin
+#define xfs_trans_brelse               libxfs_trans_brelse
+#define xfs_trans_commit               libxfs_trans_commit
+#define xfs_trans_cancel               libxfs_trans_cancel
+#define xfs_trans_del_item             libxfs_trans_del_item
+#define xfs_trans_dup                  libxfs_trans_dup
+#define xfs_trans_get_buf              libxfs_trans_get_buf
+#define xfs_trans_getsb                        libxfs_trans_getsb
+#define xfs_trans_iget                 libxfs_trans_iget
+#define xfs_trans_ichgtime             libxfs_trans_ichgtime
+#define xfs_trans_ijoin                        libxfs_trans_ijoin
+#define xfs_trans_ijoin_ref            libxfs_trans_ijoin_ref
+#define xfs_trans_init                 libxfs_trans_init
+#define xfs_trans_inode_alloc_buf      libxfs_trans_inode_alloc_buf
+#define xfs_trans_log_buf              libxfs_trans_log_buf
+#define xfs_trans_log_inode            libxfs_trans_log_inode
+#define xfs_trans_mod_sb               libxfs_trans_mod_sb
+#define xfs_trans_read_buf             libxfs_trans_read_buf
+#define xfs_trans_read_buf_map         libxfs_trans_read_buf_map
+#define xfs_trans_roll                 libxfs_trans_roll
+#define xfs_trans_get_buf_map          libxfs_trans_get_buf_map
+#define xfs_trans_reserve              libxfs_trans_reserve
+#define xfs_trans_resv_calc            libxfs_trans_resv_calc
+
+#define xfs_attr_get                   libxfs_attr_get
+#define xfs_attr_set                   libxfs_attr_set
+#define xfs_attr_remove                        libxfs_attr_remove
+#define xfs_attr_leaf_newentsize       libxfs_attr_leaf_newentsize
+
+#define xfs_alloc_fix_freelist         libxfs_alloc_fix_freelist
+#define xfs_bmap_cancel                        libxfs_bmap_cancel
+#define xfs_bmap_last_offset           libxfs_bmap_last_offset
+#define xfs_bmap_search_extents                libxfs_bmap_search_extents
+#define xfs_bmap_finish                        libxfs_bmap_finish
+#define xfs_bmapi_write                        libxfs_bmapi_write
+#define xfs_bmapi_read                 libxfs_bmapi_read
+#define xfs_bunmapi                    libxfs_bunmapi
+#define xfs_bmbt_get_all               libxfs_bmbt_get_all
+#define xfs_rtfree_extent              libxfs_rtfree_extent
+
+#define xfs_da_brelse                  libxfs_da_brelse
+#define xfs_da_hashname                        libxfs_da_hashname
+#define xfs_da_shrink_inode            libxfs_da_shrink_inode
+#define xfs_da_read_buf                        libxfs_da_read_buf
+#define xfs_dir_createname             libxfs_dir_createname
+#define xfs_dir_init                   libxfs_dir_init
+#define xfs_dir_lookup                 libxfs_dir_lookup
+#define xfs_dir_replace                        libxfs_dir_replace
+#define xfs_dir2_isblock               libxfs_dir2_isblock
+#define xfs_dir2_isleaf                        libxfs_dir2_isleaf
+#define xfs_dir2_data_freescan         libxfs_dir2_data_freescan
+#define xfs_dir2_data_log_entry                libxfs_dir2_data_log_entry
+#define xfs_dir2_data_log_header       libxfs_dir2_data_log_header
+#define xfs_dir2_data_make_free                libxfs_dir2_data_make_free
+#define xfs_dir2_data_use_free         libxfs_dir2_data_use_free
+#define xfs_dir2_shrink_inode          libxfs_dir2_shrink_inode
+
+#define xfs_dinode_from_disk           libxfs_dinode_from_disk
+#define xfs_dinode_to_disk             libxfs_dinode_to_disk
+#define xfs_dinode_calc_crc            libxfs_dinode_calc_crc
+#define xfs_idata_realloc              libxfs_idata_realloc
+#define xfs_idestroy_fork              libxfs_idestroy_fork
+#define xfs_dinode_verify              libxfs_dinode_verify
+
+#define xfs_mod_sb                     libxfs_mod_sb
+#define xfs_mod_incore_sb              libxfs_mod_incore_sb
+#define xfs_sb_from_disk               libxfs_sb_from_disk
+#define xfs_sb_quota_from_disk         libxfs_sb_quota_from_disk
+#define xfs_sb_to_disk                 libxfs_sb_to_disk
+
+#define xfs_symlink_blocks             libxfs_symlink_blocks
+#define xfs_symlink_hdr_ok             libxfs_symlink_hdr_ok
+
+#endif /* __LIBXFS_API_DEFS_H__ */
index eef28045f7cd36ad1759f78738c84a7da3cffc99..2029846bbea46316b85ce30eef3f2b7dedfef690 100644 (file)
 #ifndef __LIBXFS_INTERNAL_XFS_H__
 #define __LIBXFS_INTERNAL_XFS_H__
 
-/*
- * start by remapping all the symbols we expect external users to call
- * to the libxfs_ namespace. This ensures that all internal symbols are
- * remapped correctly throughout all the included header files
- * as well as in the C code.
- */
-#define xfs_alloc_fix_freelist         libxfs_alloc_fix_freelist
-#define xfs_attr_get                   libxfs_attr_get
-#define xfs_attr_set                   libxfs_attr_set
-#define xfs_attr_remove                        libxfs_attr_remove
-#define xfs_rtfree_extent              libxfs_rtfree_extent
-
-#define xfs_fs_repair_cmn_err          libxfs_fs_repair_cmn_err
-#define xfs_fs_cmn_err                 libxfs_fs_cmn_err
-
-#define xfs_bmap_finish                        libxfs_bmap_finish
-#define xfs_trans_ichgtime             libxfs_trans_ichgtime
-#define xfs_mod_incore_sb              libxfs_mod_incore_sb
-
-#define xfs_trans_alloc                        libxfs_trans_alloc
-#define xfs_trans_add_item             libxfs_trans_add_item
-#define xfs_trans_bhold                        libxfs_trans_bhold
-#define xfs_trans_binval               libxfs_trans_binval
-#define xfs_trans_bjoin                        libxfs_trans_bjoin
-#define xfs_trans_brelse               libxfs_trans_brelse
-#define xfs_trans_commit               libxfs_trans_commit
-#define xfs_trans_cancel               libxfs_trans_cancel
-#define xfs_trans_del_item             libxfs_trans_del_item
-#define xfs_trans_dup                  libxfs_trans_dup
-#define xfs_trans_get_buf              libxfs_trans_get_buf
-#define xfs_trans_getsb                        libxfs_trans_getsb
-#define xfs_trans_iget                 libxfs_trans_iget
-#define xfs_trans_ijoin                        libxfs_trans_ijoin
-#define xfs_trans_ijoin_ref            libxfs_trans_ijoin_ref
-#define xfs_trans_init                 libxfs_trans_init
-#define xfs_trans_inode_alloc_buf      libxfs_trans_inode_alloc_buf
-#define xfs_trans_log_buf              libxfs_trans_log_buf
-#define xfs_trans_log_inode            libxfs_trans_log_inode
-#define xfs_trans_mod_sb               libxfs_trans_mod_sb
-#define xfs_trans_read_buf             libxfs_trans_read_buf
-#define xfs_trans_read_buf_map         libxfs_trans_read_buf_map
-#define xfs_trans_roll                 libxfs_trans_roll
-#define xfs_trans_get_buf_map          libxfs_trans_get_buf_map
-#define xfs_trans_reserve              libxfs_trans_reserve
-
-/* xfs_attr_leaf.h */
-#define xfs_attr_leaf_newentsize       libxfs_attr_leaf_newentsize
-
-/* xfs_bit.h */
-#define xfs_highbit32                  libxfs_highbit32
-#define xfs_highbit64                  libxfs_highbit64
-
-/* xfs_bmap.h */
-#define xfs_bmap_cancel                        libxfs_bmap_cancel
-#define xfs_bmap_last_offset           libxfs_bmap_last_offset
-#define xfs_bmapi_write                        libxfs_bmapi_write
-#define xfs_bmapi_read                 libxfs_bmapi_read
-#define xfs_bunmapi                    libxfs_bunmapi
-
-/* xfs_bmap_btree.h */
-#define xfs_bmbt_get_all               libxfs_bmbt_get_all
-
-/* xfs_da_btree.h */
-#define xfs_da_brelse                  libxfs_da_brelse
-#define xfs_da_hashname                        libxfs_da_hashname
-#define xfs_da_shrink_inode            libxfs_da_shrink_inode
-#define xfs_da_read_buf                        libxfs_da_read_buf
-
-/* xfs_dir2.h */
-#define xfs_dir_createname             libxfs_dir_createname
-#define xfs_dir_init                   libxfs_dir_init
-#define xfs_dir_lookup                 libxfs_dir_lookup
-#define xfs_dir_replace                        libxfs_dir_replace
-#define xfs_dir2_isblock               libxfs_dir2_isblock
-#define xfs_dir2_isleaf                        libxfs_dir2_isleaf
-
-/* xfs_dir2_data.h */
-#define xfs_dir2_data_freescan         libxfs_dir2_data_freescan
-#define xfs_dir2_data_log_entry                libxfs_dir2_data_log_entry
-#define xfs_dir2_data_log_header       libxfs_dir2_data_log_header
-#define xfs_dir2_data_make_free                libxfs_dir2_data_make_free
-#define xfs_dir2_data_use_free         libxfs_dir2_data_use_free
-#define xfs_dir2_shrink_inode          libxfs_dir2_shrink_inode
-
-/* xfs_inode.h */
-#define xfs_dinode_from_disk           libxfs_dinode_from_disk
-#define xfs_dinode_to_disk             libxfs_dinode_to_disk
-#define xfs_dinode_calc_crc            libxfs_dinode_calc_crc
-#define xfs_idata_realloc              libxfs_idata_realloc
-#define xfs_idestroy_fork              libxfs_idestroy_fork
-
-#define xfs_dinode_verify              libxfs_dinode_verify
-
-/* xfs_sb.h */
-#define xfs_mod_sb                     libxfs_mod_sb
-#define xfs_sb_from_disk               libxfs_sb_from_disk
-#define xfs_sb_quota_from_disk         libxfs_sb_quota_from_disk
-#define xfs_sb_to_disk                 libxfs_sb_to_disk
-
-/* xfs_symlink.h */
-#define xfs_symlink_blocks             libxfs_symlink_blocks
-#define xfs_symlink_hdr_ok             libxfs_symlink_hdr_ok
-
-/* xfs_trans_resv.h */
-#define xfs_trans_resv_calc            libxfs_trans_resv_calc
-
+#include "libxfs_api_defs.h"
 
-/*
- * Now we've renamed and mapped everything, include the rest of the external
- * libxfs headers.
- */
 #include <xfs/platform_defs.h>
 
 #include <xfs/list.h>
index d1b4b6a5c8947ee038392ac877f58aeb6063e024..db5da4a9c67b63c5b0257d2d5f5364cd1c86bb80 100644 (file)
@@ -233,5 +233,6 @@ xfs_alloc_get_rec(
 
 int xfs_read_agf(struct xfs_mount *mp, struct xfs_trans *tp,
                        xfs_agnumber_t agno, int flags, struct xfs_buf **bpp);
+int xfs_alloc_fix_freelist(struct xfs_alloc_arg *args, int flags);
 
 #endif /* __XFS_ALLOC_H__ */
index ea53ce35de07db2a2f003dba56e6d60d5e23e774..4235c41bcf35d32a8ea4ec854f9aea0226e9e187 100644 (file)
@@ -216,4 +216,11 @@ int        xfs_bmap_shift_extents(struct xfs_trans *tp, struct xfs_inode *ip,
                int *done, xfs_fileoff_t *next_fsb, xfs_fsblock_t *firstblock,
                struct xfs_bmap_free *flist, int num_exts);
 
+struct xfs_bmbt_rec_host *
+       xfs_bmap_search_extents(struct xfs_inode *ip, xfs_fileoff_t bno,
+                               int fork, int *eofp, xfs_extnum_t *lastxp,
+                               struct xfs_bmbt_irec *gotp,
+                               struct xfs_bmbt_irec *prevp);
+
+
 #endif /* __XFS_BMAP_H__ */
index 9308c47f2a527dc08b75b66de5d064e0b13e0cfe..dd3803475a0f8eb445e27e4a6dd6f8e08ec81c8a 100644 (file)
@@ -40,6 +40,8 @@ int   xfs_iread(struct xfs_mount *, struct xfs_trans *,
 void   xfs_dinode_calc_crc(struct xfs_mount *, struct xfs_dinode *);
 void   xfs_dinode_to_disk(struct xfs_dinode *to, struct xfs_icdinode *from);
 void   xfs_dinode_from_disk(struct xfs_icdinode *to, struct xfs_dinode *from);
+bool   xfs_dinode_verify(struct xfs_mount *mp, xfs_ino_t ino,
+                         struct xfs_dinode *dip);
 
 #if defined(DEBUG)
 void   xfs_inobp_check(struct xfs_mount *, struct xfs_buf *);
index 2f9c419df2b14ddab38640c199e12669179a3152..4db8cd120045f266583f8f619cec202c7a7f2130 100644 (file)
@@ -454,7 +454,8 @@ bmap_next_offset(
            (error = xfs_iread_extents(tp, ip, whichfork)))
                return error;
        bno = *bnop + 1;
-       xfs_bmap_search_extents(ip, bno, whichfork, &eof, &lastx, &got, &prev);
+       libxfs_bmap_search_extents(ip, bno, whichfork, &eof, &lastx,
+                                  &got, &prev);
        if (eof)
                *bnop = NULLFILEOFF;
        else