]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Fix compilation for xfs_repair after recent optimisations. __inline -> static inline...
authorNathan Scott <nathans@sgi.com>
Mon, 15 May 2006 15:29:58 +0000 (15:29 +0000)
committerNathan Scott <nathans@sgi.com>
Mon, 15 May 2006 15:29:58 +0000 (15:29 +0000)
Merge of master-melb:xfs-cmds:25940a by kenmcd.

repair/avl.h
repair/incore.h
repair/incore_ino.c

index d65a76ff61ef9e028c08b76febeac99c5492f409..2e335180dc0cd948972229d5fb24aab63729034c 100644 (file)
@@ -84,7 +84,7 @@ avl_init_tree(
        avltree_desc_t  *tree,
        avlops_t *ops);
 
-__inline avlnode_t *
+static inline avlnode_t *
 avl_findrange(
        avltree_desc_t *tree,
        __psunsigned_t value)
index 25eabdc19f6432f7ee176dccdfe90a50d3b3fff5..80d94b1ad5f8b7d876598278639853248e009152 100644 (file)
@@ -239,7 +239,7 @@ void                add_dup_extent(xfs_agnumber_t agno,
 
 extern avltree_desc_t   **extent_tree_ptrs;
 /* ARGSUSED */
-static __inline int
+static inline int
 search_dup_extent(xfs_mount_t *mp, xfs_agnumber_t agno, xfs_agblock_t agbno)
 {
        ASSERT(agno < glob_agcount);
@@ -368,12 +368,12 @@ void              free_inode_rec(xfs_agnumber_t agno, ino_tree_node_t *ino_rec);
 void           get_inode_rec(xfs_agnumber_t agno, ino_tree_node_t *ino_rec);
 
 extern avltree_desc_t     **inode_tree_ptrs;
-static __inline ino_tree_node_t *
+static inline ino_tree_node_t *
 findfirst_inode_rec(xfs_agnumber_t agno)
 {
        return((ino_tree_node_t *) inode_tree_ptrs[agno]->avl_firstino);
 }
-static __inline ino_tree_node_t *
+static inline ino_tree_node_t *
 find_inode_rec(xfs_agnumber_t agno, xfs_agino_t ino)
 {
        return((ino_tree_node_t *)
@@ -515,14 +515,14 @@ void                      clear_uncertain_ino_cache(xfs_agnumber_t agno);
  * an inode that we've counted is removed.
  */
 
-static __inline int
+static inline int
 is_inode_reached(ino_tree_node_t *ino_rec, int ino_offset)
 {
        ASSERT(ino_rec->ino_un.backptrs != NULL);
        return(XFS_INO_RCHD_IS_RCHD(ino_rec, ino_offset));
 }
 
-static __inline void
+static inline void
 add_inode_reached(ino_tree_node_t *ino_rec, int ino_offset)
 {
        ASSERT(ino_rec->ino_un.backptrs != NULL);
@@ -533,7 +533,7 @@ add_inode_reached(ino_tree_node_t *ino_rec, int ino_offset)
        ASSERT(is_inode_reached(ino_rec, ino_offset));
 }
 
-static __inline void
+static inline void
 add_inode_ref(ino_tree_node_t *ino_rec, int ino_offset)
 {
        ASSERT(ino_rec->ino_un.backptrs != NULL);
@@ -541,7 +541,7 @@ add_inode_ref(ino_tree_node_t *ino_rec, int ino_offset)
        ino_rec->ino_un.backptrs->nlinks[ino_offset]++;
 }
 
-static __inline void
+static inline void
 drop_inode_ref(ino_tree_node_t *ino_rec, int ino_offset)
 {
        ASSERT(ino_rec->ino_un.backptrs != NULL);
@@ -551,14 +551,14 @@ drop_inode_ref(ino_tree_node_t *ino_rec, int ino_offset)
                XFS_INO_RCHD_CLR_RCHD(ino_rec, ino_offset);
 }
 
-static __inline int
+static inline int
 is_inode_referenced(ino_tree_node_t *ino_rec, int ino_offset)
 {
        ASSERT(ino_rec->ino_un.backptrs != NULL);
        return(ino_rec->ino_un.backptrs->nlinks[ino_offset] > 0);
 }
 
-static __inline __uint32_t
+static inline __uint32_t
 num_inode_references(ino_tree_node_t *ino_rec, int ino_offset)
 {
        ASSERT(ino_rec->ino_un.backptrs != NULL);
index 39093fc195e6aa36b7f74a26451f1d62cf40e257..4f3e072d8736b3ce80449099390acbb3abf40cfb 100644 (file)
@@ -518,23 +518,6 @@ set_inode_parent(ino_tree_node_t *irec, int offset, xfs_ino_t parent)
        return;
 }
 
-#if 0
-/*
- * not needed for now since we don't set the parent info
- * until phase 4 -- at which point we know that the directory
- * inode won't be going away -- so we won't ever need to clear
- * directory parent data that we set.
- */
-void
-clear_inode_parent(ino_tree_node_t *irec, int offset)
-{
-       ASSERT(full_backptrs == 0);
-       ASSERT(irec->ino_un.plist != NULL);
-
-       return;
-}
-#endif
-
 xfs_ino_t
 get_inode_parent(ino_tree_node_t *irec, int offset)
 {
@@ -566,104 +549,6 @@ get_inode_parent(ino_tree_node_t *irec, int offset)
        return(0LL);
 }
 
-/*
- * code that deals with the inode descriptor appendages -- the back
- * pointers, link counts and reached bits for phase 6 and phase 7.
- */
-
-#ifdef DEBUG
-void
-add_inode_reached(ino_tree_node_t *ino_rec, int ino_offset)
-{
-       ASSERT(ino_rec->ino_un.backptrs != NULL);
-
-       ino_rec->ino_un.backptrs->nlinks[ino_offset]++;
-       XFS_INO_RCHD_SET_RCHD(ino_rec, ino_offset);
-
-       ASSERT(is_inode_reached(ino_rec, ino_offset));
-
-       return;
-}
-
-int
-is_inode_reached(ino_tree_node_t *ino_rec, int ino_offset)
-{
-       ASSERT(ino_rec->ino_un.backptrs != NULL);
-       return(XFS_INO_RCHD_IS_RCHD(ino_rec, ino_offset));
-}
-
-void
-add_inode_ref(ino_tree_node_t *ino_rec, int ino_offset)
-{
-       ASSERT(ino_rec->ino_un.backptrs != NULL);
-
-       ino_rec->ino_un.backptrs->nlinks[ino_offset]++;
-
-       return;
-}
-
-void
-drop_inode_ref(ino_tree_node_t *ino_rec, int ino_offset)
-{
-       ASSERT(ino_rec->ino_un.backptrs != NULL);
-       ASSERT(ino_rec->ino_un.backptrs->nlinks[ino_offset] > 0);
-
-       if (--ino_rec->ino_un.backptrs->nlinks[ino_offset] == 0)
-               XFS_INO_RCHD_CLR_RCHD(ino_rec, ino_offset);
-
-       return;
-}
-
-int
-is_inode_referenced(ino_tree_node_t *ino_rec, int ino_offset)
-{
-       ASSERT(ino_rec->ino_un.backptrs != NULL);
-       return(ino_rec->ino_un.backptrs->nlinks[ino_offset] > 0);
-}
-
-__uint32_t
-num_inode_references(ino_tree_node_t *ino_rec, int ino_offset)
-{
-       ASSERT(ino_rec->ino_un.backptrs != NULL);
-       return(ino_rec->ino_un.backptrs->nlinks[ino_offset]);
-}
-#endif /* DEBUG */
-
-#if 0
-static backptrs_t      *bptrs;
-static int             bptrs_index;
-#define BPTR_ALLOC_NUM 1000
-
-backptrs_t *
-get_backptr(void)
-{
-       backptrs_t *bptr;
-
-       if (bptrs_index == BPTR_ALLOC_NUM)  {
-               ASSERT(bptrs == NULL);
-
-               if ((bptrs = malloc(sizeof(backptrs_t[BPTR_ALLOC_NUM])))
-                               == NULL)  {
-                       do_error(_("couldn't malloc ino rec backptrs.\n"));
-               }
-
-               bptrs_index = 0;
-       }
-
-       ASSERT(bptrs != NULL);
-
-       bptr = &bptrs[bptrs_index];
-       bptrs_index++;
-
-       if (bptrs_index == BPTR_ALLOC_NUM)
-               bptrs = NULL;
-
-       bzero(bptr, sizeof(backptrs_t));
-
-       return(bptr);
-}
-#endif
-
 backptrs_t *
 get_backptr(void)
 {