Commit 3cc7524c authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Lachlan McIlroy

[XFS] mark various functions in xfs_btree.c static

Lots of functionality in xfs_btree.c isn't needed by callers outside of
this file anymore, so mark these functions static.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32209a
Signed-off-by: default avatarChristoph Hellwig <hch@infradead.org>
Signed-off-by: default avatarLachlan McIlroy <lachlan@sgi.com>
Signed-off-by: default avatarBill O'Donnell <billodo@sgi.com>
Signed-off-by: default avatarDavid Chinner <david@fromorbit.com>
parent 4a26e66e
...@@ -87,7 +87,7 @@ xfs_btree_check_lblock( ...@@ -87,7 +87,7 @@ xfs_btree_check_lblock(
return 0; return 0;
} }
int /* error (0 or EFSCORRUPTED) */ STATIC int /* error (0 or EFSCORRUPTED) */
xfs_btree_check_sblock( xfs_btree_check_sblock(
struct xfs_btree_cur *cur, /* btree cursor */ struct xfs_btree_cur *cur, /* btree cursor */
struct xfs_btree_sblock *block, /* btree short form block pointer */ struct xfs_btree_sblock *block, /* btree short form block pointer */
...@@ -163,7 +163,7 @@ xfs_btree_check_lptr( ...@@ -163,7 +163,7 @@ xfs_btree_check_lptr(
/* /*
* Check that (short) pointer is ok. * Check that (short) pointer is ok.
*/ */
int /* error (0 or EFSCORRUPTED) */ STATIC int /* error (0 or EFSCORRUPTED) */
xfs_btree_check_sptr( xfs_btree_check_sptr(
struct xfs_btree_cur *cur, /* btree cursor */ struct xfs_btree_cur *cur, /* btree cursor */
xfs_agblock_t bno, /* btree block disk address */ xfs_agblock_t bno, /* btree block disk address */
...@@ -182,7 +182,7 @@ xfs_btree_check_sptr( ...@@ -182,7 +182,7 @@ xfs_btree_check_sptr(
/* /*
* Check that block ptr is ok. * Check that block ptr is ok.
*/ */
int /* error (0 or EFSCORRUPTED) */ STATIC int /* error (0 or EFSCORRUPTED) */
xfs_btree_check_ptr( xfs_btree_check_ptr(
struct xfs_btree_cur *cur, /* btree cursor */ struct xfs_btree_cur *cur, /* btree cursor */
union xfs_btree_ptr *ptr, /* btree block disk address */ union xfs_btree_ptr *ptr, /* btree block disk address */
...@@ -523,7 +523,7 @@ xfs_btree_islastblock( ...@@ -523,7 +523,7 @@ xfs_btree_islastblock(
* Change the cursor to point to the first record at the given level. * Change the cursor to point to the first record at the given level.
* Other levels are unaffected. * Other levels are unaffected.
*/ */
int /* success=1, failure=0 */ STATIC int /* success=1, failure=0 */
xfs_btree_firstrec( xfs_btree_firstrec(
xfs_btree_cur_t *cur, /* btree cursor */ xfs_btree_cur_t *cur, /* btree cursor */
int level) /* level to change */ int level) /* level to change */
...@@ -552,7 +552,7 @@ xfs_btree_firstrec( ...@@ -552,7 +552,7 @@ xfs_btree_firstrec(
* Change the cursor to point to the last record in the current block * Change the cursor to point to the last record in the current block
* at the given level. Other levels are unaffected. * at the given level. Other levels are unaffected.
*/ */
int /* success=1, failure=0 */ STATIC int /* success=1, failure=0 */
xfs_btree_lastrec( xfs_btree_lastrec(
xfs_btree_cur_t *cur, /* btree cursor */ xfs_btree_cur_t *cur, /* btree cursor */
int level) /* level to change */ int level) /* level to change */
...@@ -775,7 +775,7 @@ xfs_btree_readahead_sblock( ...@@ -775,7 +775,7 @@ xfs_btree_readahead_sblock(
* Read-ahead btree blocks, at the given level. * Read-ahead btree blocks, at the given level.
* Bits in lr are set from XFS_BTCUR_{LEFT,RIGHT}RA. * Bits in lr are set from XFS_BTCUR_{LEFT,RIGHT}RA.
*/ */
int STATIC int
xfs_btree_readahead( xfs_btree_readahead(
struct xfs_btree_cur *cur, /* btree cursor */ struct xfs_btree_cur *cur, /* btree cursor */
int lev, /* level in btree */ int lev, /* level in btree */
...@@ -1711,7 +1711,7 @@ xfs_btree_lookup( ...@@ -1711,7 +1711,7 @@ xfs_btree_lookup(
/* /*
* Update keys at all levels from here to the root along the cursor's path. * Update keys at all levels from here to the root along the cursor's path.
*/ */
int STATIC int
xfs_btree_updkey( xfs_btree_updkey(
struct xfs_btree_cur *cur, struct xfs_btree_cur *cur,
union xfs_btree_key *keyp, union xfs_btree_key *keyp,
...@@ -1821,7 +1821,7 @@ xfs_btree_update( ...@@ -1821,7 +1821,7 @@ xfs_btree_update(
* Move 1 record left from cur/level if possible. * Move 1 record left from cur/level if possible.
* Update cur to reflect the new path. * Update cur to reflect the new path.
*/ */
int /* error */ STATIC int /* error */
xfs_btree_lshift( xfs_btree_lshift(
struct xfs_btree_cur *cur, struct xfs_btree_cur *cur,
int level, int level,
...@@ -2004,7 +2004,7 @@ xfs_btree_lshift( ...@@ -2004,7 +2004,7 @@ xfs_btree_lshift(
* Move 1 record right from cur/level if possible. * Move 1 record right from cur/level if possible.
* Update cur to reflect the new path. * Update cur to reflect the new path.
*/ */
int /* error */ STATIC int /* error */
xfs_btree_rshift( xfs_btree_rshift(
struct xfs_btree_cur *cur, struct xfs_btree_cur *cur,
int level, int level,
...@@ -2180,7 +2180,7 @@ xfs_btree_rshift( ...@@ -2180,7 +2180,7 @@ xfs_btree_rshift(
* Return new block number and the key to its first * Return new block number and the key to its first
* record (to be inserted into parent). * record (to be inserted into parent).
*/ */
int /* error */ STATIC int /* error */
xfs_btree_split( xfs_btree_split(
struct xfs_btree_cur *cur, struct xfs_btree_cur *cur,
int level, int level,
...@@ -2465,7 +2465,7 @@ xfs_btree_new_iroot( ...@@ -2465,7 +2465,7 @@ xfs_btree_new_iroot(
/* /*
* Allocate a new root block, fill it in. * Allocate a new root block, fill it in.
*/ */
int /* error */ STATIC int /* error */
xfs_btree_new_root( xfs_btree_new_root(
struct xfs_btree_cur *cur, /* btree cursor */ struct xfs_btree_cur *cur, /* btree cursor */
int *stat) /* success/failure */ int *stat) /* success/failure */
......
...@@ -339,16 +339,6 @@ xfs_btree_check_lblock( ...@@ -339,16 +339,6 @@ xfs_btree_check_lblock(
int level, /* level of the btree block */ int level, /* level of the btree block */
struct xfs_buf *bp); /* buffer containing block, if any */ struct xfs_buf *bp); /* buffer containing block, if any */
/*
* Check that short form block header is ok.
*/
int /* error (0 or EFSCORRUPTED) */
xfs_btree_check_sblock(
struct xfs_btree_cur *cur, /* btree cursor */
struct xfs_btree_sblock *block, /* btree short form block pointer */
int level, /* level of the btree block */
struct xfs_buf *bp); /* buffer containing block */
/* /*
* Check that block header is ok. * Check that block header is ok.
*/ */
...@@ -368,29 +358,6 @@ xfs_btree_check_lptr( ...@@ -368,29 +358,6 @@ xfs_btree_check_lptr(
xfs_dfsbno_t ptr, /* btree block disk address */ xfs_dfsbno_t ptr, /* btree block disk address */
int level); /* btree block level */ int level); /* btree block level */
#define xfs_btree_check_lptr_disk(cur, ptr, level) \
xfs_btree_check_lptr(cur, be64_to_cpu(ptr), level)
/*
* Check that (short) pointer is ok.
*/
int /* error (0 or EFSCORRUPTED) */
xfs_btree_check_sptr(
struct xfs_btree_cur *cur, /* btree cursor */
xfs_agblock_t ptr, /* btree block disk address */
int level); /* btree block level */
/*
* Check that (short) pointer is ok.
*/
int /* error (0 or EFSCORRUPTED) */
xfs_btree_check_ptr(
struct xfs_btree_cur *cur, /* btree cursor */
union xfs_btree_ptr *ptr, /* btree block disk address */
int index, /* offset from ptr to check */
int level); /* btree block level */
/* /*
* Delete the btree cursor. * Delete the btree cursor.
*/ */
...@@ -408,15 +375,6 @@ xfs_btree_dup_cursor( ...@@ -408,15 +375,6 @@ xfs_btree_dup_cursor(
xfs_btree_cur_t *cur, /* input cursor */ xfs_btree_cur_t *cur, /* input cursor */
xfs_btree_cur_t **ncur);/* output cursor */ xfs_btree_cur_t **ncur);/* output cursor */
/*
* Change the cursor to point to the first record in the current block
* at the given level. Other levels are unaffected.
*/
int /* success=1, failure=0 */
xfs_btree_firstrec(
xfs_btree_cur_t *cur, /* btree cursor */
int level); /* level to change */
/* /*
* Get a buffer for the block, return it with no data read. * Get a buffer for the block, return it with no data read.
* Long-form addressing. * Long-form addressing.
...@@ -448,15 +406,6 @@ xfs_btree_islastblock( ...@@ -448,15 +406,6 @@ xfs_btree_islastblock(
xfs_btree_cur_t *cur, /* btree cursor */ xfs_btree_cur_t *cur, /* btree cursor */
int level); /* level to check */ int level); /* level to check */
/*
* Change the cursor to point to the last record in the current block
* at the given level. Other levels are unaffected.
*/
int /* success=1, failure=0 */
xfs_btree_lastrec(
xfs_btree_cur_t *cur, /* btree cursor */
int level); /* level to change */
/* /*
* Compute first and last byte offsets for the fields given. * Compute first and last byte offsets for the fields given.
* Interprets the offsets table, which contains struct field offsets. * Interprets the offsets table, which contains struct field offsets.
...@@ -517,16 +466,6 @@ xfs_btree_reada_bufs( ...@@ -517,16 +466,6 @@ xfs_btree_reada_bufs(
xfs_agblock_t agbno, /* allocation group block number */ xfs_agblock_t agbno, /* allocation group block number */
xfs_extlen_t count); /* count of filesystem blocks */ xfs_extlen_t count); /* count of filesystem blocks */
/*
* Read-ahead btree blocks, at the given level.
* Bits in lr are set from XFS_BTCUR_{LEFT,RIGHT}RA.
*/
int /* readahead block count */
xfs_btree_readahead(
xfs_btree_cur_t *cur, /* btree cursor */
int lev, /* level in btree */
int lr); /* left/right bits */
/* /*
* Set the buffer for level "lev" in the cursor to bp, releasing * Set the buffer for level "lev" in the cursor to bp, releasing
* any previous buffer. * any previous buffer.
...@@ -544,13 +483,7 @@ xfs_btree_setbuf( ...@@ -544,13 +483,7 @@ xfs_btree_setbuf(
int xfs_btree_increment(struct xfs_btree_cur *, int, int *); int xfs_btree_increment(struct xfs_btree_cur *, int, int *);
int xfs_btree_decrement(struct xfs_btree_cur *, int, int *); int xfs_btree_decrement(struct xfs_btree_cur *, int, int *);
int xfs_btree_lookup(struct xfs_btree_cur *, xfs_lookup_t, int *); int xfs_btree_lookup(struct xfs_btree_cur *, xfs_lookup_t, int *);
int xfs_btree_updkey(struct xfs_btree_cur *, union xfs_btree_key *, int);
int xfs_btree_update(struct xfs_btree_cur *, union xfs_btree_rec *); int xfs_btree_update(struct xfs_btree_cur *, union xfs_btree_rec *);
int xfs_btree_lshift(struct xfs_btree_cur *, int, int *);
int xfs_btree_rshift(struct xfs_btree_cur *, int, int *);
int xfs_btree_split(struct xfs_btree_cur *, int, union xfs_btree_ptr *,
union xfs_btree_key *, struct xfs_btree_cur **, int *);
int xfs_btree_new_root(struct xfs_btree_cur *, int *);
int xfs_btree_new_iroot(struct xfs_btree_cur *, int *, int *); int xfs_btree_new_iroot(struct xfs_btree_cur *, int *, int *);
int xfs_btree_kill_iroot(struct xfs_btree_cur *); int xfs_btree_kill_iroot(struct xfs_btree_cur *);
int xfs_btree_insert(struct xfs_btree_cur *, int *); int xfs_btree_insert(struct xfs_btree_cur *, int *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment