]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
repair: move extern declarations to headers
authorChristoph Hellwig <hch@infradead.org>
Fri, 2 Dec 2011 17:46:30 +0000 (12:46 -0500)
committerChristoph Hellwig <hch@lst.de>
Sun, 5 Feb 2012 14:00:34 +0000 (14:00 +0000)
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
repair/avl.h
repair/bmap.h
repair/incore.h
repair/incore_ext.c
repair/incore_ino.c
repair/init.c
repair/phase4.c
repair/phase5.c
repair/protos.h
repair/scan.c
repair/xfs_repair.c

index 2e335180dc0cd948972229d5fb24aab63729034c..2fad1eca62fb9eb00e6f108b75a495c92ae55524 100644 (file)
@@ -134,6 +134,15 @@ avl_findranges(
        avlnode_t               **startp,
        avlnode_t               **endp);
 
+avlnode_t *
+avl_firstino(
+       avlnode_t               *root);
+
+avlnode_t *
+avl_lastino(
+       avlnode_t               *root);
+
+
 #define AVL_PRECEED    0x1
 #define AVL_SUCCEED    0x2
 
index 19720b1dad514f32127a082d23da7a1e1ded0122..ad7164ac2c76e026a1eaefd900ed6a83992f9eb7 100644 (file)
@@ -53,6 +53,9 @@ typedef       struct blkmap {
 #define BLKMAP_NEXTS_MAX       INT_MAX
 #endif
 
+extern pthread_key_t dblkmap_key;
+extern pthread_key_t ablkmap_key;
+
 blkmap_t       *blkmap_alloc(xfs_extnum_t nex, int whichfork);
 void           blkmap_free(blkmap_t *blkmap);
 
index 8e311c9e40bd38edde17cfd6de1151d6e981eaae..20f778d3dfb264ab091692c9bc12cc7e59cbf9a1 100644 (file)
@@ -209,9 +209,12 @@ void               incore_ext_init(xfs_mount_t *);
  * the nodes.
  */
 void           incore_ext_teardown(xfs_mount_t *mp);
-
 void           incore_ino_init(xfs_mount_t *);
 
+int            count_bno_extents(xfs_agnumber_t);
+int            count_bno_extents_blocks(xfs_agnumber_t, uint *);
+int            count_bcnt_extents(xfs_agnumber_t);
+
 /*
  * inode definitions
  */
index 28648d1066894ec5480288e3458b2588e6e44ee4..a7d61e087181e33095160c8dc5a2f8b3ed9ccbb0 100644 (file)
@@ -386,8 +386,6 @@ findfirst_bcnt_extent(xfs_agnumber_t agno)
 extent_tree_node_t *
 findbiggest_bcnt_extent(xfs_agnumber_t agno)
 {
-       extern avlnode_t *avl_lastino(avlnode_t *root);
-
        ASSERT(extent_bcnt_ptrs != NULL);
        ASSERT(extent_bcnt_ptrs[agno] != NULL);
 
index fa88944d003d437b7c32506af51b175df582a313..81b465879ed7ab5756df9dc8205b7bf1013082ed 100644 (file)
@@ -25,8 +25,6 @@
 #include "threads.h"
 #include "err_protos.h"
 
-extern avlnode_t       *avl_firstino(avlnode_t *root);
-
 /*
  * array of inode tree ptrs, one per ag
  */
index bc10cc483efe3b0bd5ff75e5922bd3846aae72e1..d51d6e481fdcf7bfaceac8aa85e069ad4940d359 100644 (file)
@@ -34,9 +34,6 @@ static pthread_key_t dirbuf_key;
 static pthread_key_t dir_freemap_key;
 static pthread_key_t attr_freemap_key;
 
-extern pthread_key_t dblkmap_key;
-extern pthread_key_t ablkmap_key;
-
 static void
 ts_alloc(pthread_key_t key, unsigned n, size_t size)
 {
index b71ce4b019d5f25f0514e54ece5fce3ee8b0dbe5..ef1d2960531bfad2e0081e4e39aac2ff84a9e0cb 100644 (file)
@@ -196,8 +196,6 @@ phase4(xfs_mount_t *mp)
        int                     ag_hdr_len = 4 * mp->m_sb.sb_sectsize;
        int                     ag_hdr_block;
        int                     bstate;
-       int                     count_bcnt_extents(xfs_agnumber_t agno);
-       int                     count_bno_extents(xfs_agnumber_t agno);
 
        ag_hdr_block = howmany(ag_hdr_len, mp->m_sb.sb_blocksize);
 
index 49f3dfb9b7c70a9598fbd4bfe21b4c7d0bdafad6..7d5cd49a1fcf857344d080edc45f8a4cd0b85052 100644 (file)
@@ -1404,11 +1404,6 @@ phase5_func(
        xfs_extlen_t    freeblks2;
 #endif
        xfs_agblock_t   num_extents;
-       extern int      count_bno_extents(xfs_agnumber_t);
-       extern int      count_bno_extents_blocks(xfs_agnumber_t, uint *);
-#ifdef XR_BLD_FREE_TRACE
-       extern int      count_bcnt_extents(xfs_agnumber_t);
-#endif
 
        if (verbose)
                do_log(_("        - agno = %d\n"), agno);
index ce79089f4d8f5ca26e4856e0fa3dbe7da48b1173..b66eea1375d6e048e4edc633e1cddcdfd0c2d86a 100644 (file)
@@ -39,11 +39,23 @@ void        get_sb_geometry(struct fs_geometry      *geo,
 char   *alloc_ag_buf(int size);
 
 void   print_inode_list(xfs_agnumber_t i);
-char * err_string(int err_code);
-
-extern void *ts_attr_freemap(void);
-extern void *ts_dir_freemap(void);
-extern void *ts_dirbuf(void);
-extern void ts_init(void);
-extern void thread_init(void);
+char   *err_string(int err_code);
+
+void   *ts_attr_freemap(void);
+void   *ts_dir_freemap(void);
+void   *ts_dirbuf(void);
+void   ts_init(void);
+void   thread_init(void);
+
+void   phase1(struct xfs_mount *);
+void   phase2(struct xfs_mount *, int);
+void   phase3(struct xfs_mount *);
+void   phase4(struct xfs_mount *);
+void   phase5(struct xfs_mount *);
+void   phase6(struct xfs_mount *);
+void   phase7(struct xfs_mount *);
+
+int    verify_set_agheader(struct xfs_mount *, struct xfs_buf *,
+               struct xfs_sb *, struct xfs_agf *, struct xfs_agi *,
+               xfs_agnumber_t);
 
index 489d5251c1dce2bb41f23940570bacc449b0fc2c..2b1b9b4b5f6b0d067a7a5b7aadbd5eecc6376811 100644 (file)
@@ -30,9 +30,6 @@
 #include "progress.h"
 #include "threads.h"
 
-extern int verify_set_agheader(xfs_mount_t *mp, xfs_buf_t *sbuf, xfs_sb_t *sb,
-               xfs_agf_t *agf, xfs_agi_t *agi, xfs_agnumber_t i);
-
 static xfs_mount_t     *mp = NULL;
 
 /*
index aaa7204b8c206a0a11a0e83f9e90020275e0553c..67a74465545051d53f115d416280ae9723785597 100644 (file)
 
 #define        rounddown(x, y) (((x)/(y))*(y))
 
-extern void    phase1(xfs_mount_t *);
-extern void    phase2(xfs_mount_t *, int);
-extern void    phase3(xfs_mount_t *);
-extern void    phase4(xfs_mount_t *);
-extern void    phase5(xfs_mount_t *);
-extern void    phase6(xfs_mount_t *);
-extern void    phase7(xfs_mount_t *);
-
 #define                XR_MAX_SECT_SIZE        (64 * 1024)
 
 /*