aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2008-10-30 01:58:41 -0400
committerLachlan McIlroy <lachlan@sgi.com>2008-10-30 01:58:41 -0400
commit3cc7524c8445e6244b055f3fa338529188c7c260 (patch)
treeb550a7e063bf1af270b25cc32b8d3b6aee198347 /fs/xfs
parent4a26e66e7728112f0e1cd7eca3bcc430b3a221c9 (diff)
[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: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: Bill O'Donnell <billodo@sgi.com> Signed-off-by: David Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_btree.c22
-rw-r--r--fs/xfs/xfs_btree.h67
2 files changed, 11 insertions, 78 deletions
diff --git a/fs/xfs/xfs_btree.c b/fs/xfs/xfs_btree.c
index d667d30210a8..b735c7299a8e 100644
--- a/fs/xfs/xfs_btree.c
+++ b/fs/xfs/xfs_btree.c
@@ -87,7 +87,7 @@ xfs_btree_check_lblock(
87 return 0; 87 return 0;
88} 88}
89 89
90int /* error (0 or EFSCORRUPTED) */ 90STATIC int /* error (0 or EFSCORRUPTED) */
91xfs_btree_check_sblock( 91xfs_btree_check_sblock(
92 struct xfs_btree_cur *cur, /* btree cursor */ 92 struct xfs_btree_cur *cur, /* btree cursor */
93 struct xfs_btree_sblock *block, /* btree short form block pointer */ 93 struct xfs_btree_sblock *block, /* btree short form block pointer */
@@ -163,7 +163,7 @@ xfs_btree_check_lptr(
163/* 163/*
164 * Check that (short) pointer is ok. 164 * Check that (short) pointer is ok.
165 */ 165 */
166int /* error (0 or EFSCORRUPTED) */ 166STATIC int /* error (0 or EFSCORRUPTED) */
167xfs_btree_check_sptr( 167xfs_btree_check_sptr(
168 struct xfs_btree_cur *cur, /* btree cursor */ 168 struct xfs_btree_cur *cur, /* btree cursor */
169 xfs_agblock_t bno, /* btree block disk address */ 169 xfs_agblock_t bno, /* btree block disk address */
@@ -182,7 +182,7 @@ xfs_btree_check_sptr(
182/* 182/*
183 * Check that block ptr is ok. 183 * Check that block ptr is ok.
184 */ 184 */
185int /* error (0 or EFSCORRUPTED) */ 185STATIC int /* error (0 or EFSCORRUPTED) */
186xfs_btree_check_ptr( 186xfs_btree_check_ptr(
187 struct xfs_btree_cur *cur, /* btree cursor */ 187 struct xfs_btree_cur *cur, /* btree cursor */
188 union xfs_btree_ptr *ptr, /* btree block disk address */ 188 union xfs_btree_ptr *ptr, /* btree block disk address */
@@ -523,7 +523,7 @@ xfs_btree_islastblock(
523 * Change the cursor to point to the first record at the given level. 523 * Change the cursor to point to the first record at the given level.
524 * Other levels are unaffected. 524 * Other levels are unaffected.
525 */ 525 */
526int /* success=1, failure=0 */ 526STATIC int /* success=1, failure=0 */
527xfs_btree_firstrec( 527xfs_btree_firstrec(
528 xfs_btree_cur_t *cur, /* btree cursor */ 528 xfs_btree_cur_t *cur, /* btree cursor */
529 int level) /* level to change */ 529 int level) /* level to change */
@@ -552,7 +552,7 @@ xfs_btree_firstrec(
552 * Change the cursor to point to the last record in the current block 552 * Change the cursor to point to the last record in the current block
553 * at the given level. Other levels are unaffected. 553 * at the given level. Other levels are unaffected.
554 */ 554 */
555int /* success=1, failure=0 */ 555STATIC int /* success=1, failure=0 */
556xfs_btree_lastrec( 556xfs_btree_lastrec(
557 xfs_btree_cur_t *cur, /* btree cursor */ 557 xfs_btree_cur_t *cur, /* btree cursor */
558 int level) /* level to change */ 558 int level) /* level to change */
@@ -775,7 +775,7 @@ xfs_btree_readahead_sblock(
775 * Read-ahead btree blocks, at the given level. 775 * Read-ahead btree blocks, at the given level.
776 * Bits in lr are set from XFS_BTCUR_{LEFT,RIGHT}RA. 776 * Bits in lr are set from XFS_BTCUR_{LEFT,RIGHT}RA.
777 */ 777 */
778int 778STATIC int
779xfs_btree_readahead( 779xfs_btree_readahead(
780 struct xfs_btree_cur *cur, /* btree cursor */ 780 struct xfs_btree_cur *cur, /* btree cursor */
781 int lev, /* level in btree */ 781 int lev, /* level in btree */
@@ -1711,7 +1711,7 @@ error0:
1711/* 1711/*
1712 * Update keys at all levels from here to the root along the cursor's path. 1712 * Update keys at all levels from here to the root along the cursor's path.
1713 */ 1713 */
1714int 1714STATIC int
1715xfs_btree_updkey( 1715xfs_btree_updkey(
1716 struct xfs_btree_cur *cur, 1716 struct xfs_btree_cur *cur,
1717 union xfs_btree_key *keyp, 1717 union xfs_btree_key *keyp,
@@ -1821,7 +1821,7 @@ error0:
1821 * Move 1 record left from cur/level if possible. 1821 * Move 1 record left from cur/level if possible.
1822 * Update cur to reflect the new path. 1822 * Update cur to reflect the new path.
1823 */ 1823 */
1824int /* error */ 1824STATIC int /* error */
1825xfs_btree_lshift( 1825xfs_btree_lshift(
1826 struct xfs_btree_cur *cur, 1826 struct xfs_btree_cur *cur,
1827 int level, 1827 int level,
@@ -2004,7 +2004,7 @@ error0:
2004 * Move 1 record right from cur/level if possible. 2004 * Move 1 record right from cur/level if possible.
2005 * Update cur to reflect the new path. 2005 * Update cur to reflect the new path.
2006 */ 2006 */
2007int /* error */ 2007STATIC int /* error */
2008xfs_btree_rshift( 2008xfs_btree_rshift(
2009 struct xfs_btree_cur *cur, 2009 struct xfs_btree_cur *cur,
2010 int level, 2010 int level,
@@ -2180,7 +2180,7 @@ error1:
2180 * Return new block number and the key to its first 2180 * Return new block number and the key to its first
2181 * record (to be inserted into parent). 2181 * record (to be inserted into parent).
2182 */ 2182 */
2183int /* error */ 2183STATIC int /* error */
2184xfs_btree_split( 2184xfs_btree_split(
2185 struct xfs_btree_cur *cur, 2185 struct xfs_btree_cur *cur,
2186 int level, 2186 int level,
@@ -2465,7 +2465,7 @@ error0:
2465/* 2465/*
2466 * Allocate a new root block, fill it in. 2466 * Allocate a new root block, fill it in.
2467 */ 2467 */
2468int /* error */ 2468STATIC int /* error */
2469xfs_btree_new_root( 2469xfs_btree_new_root(
2470 struct xfs_btree_cur *cur, /* btree cursor */ 2470 struct xfs_btree_cur *cur, /* btree cursor */
2471 int *stat) /* success/failure */ 2471 int *stat) /* success/failure */
diff --git a/fs/xfs/xfs_btree.h b/fs/xfs/xfs_btree.h
index 25a488d4da18..2a22c587f1ae 100644
--- a/fs/xfs/xfs_btree.h
+++ b/fs/xfs/xfs_btree.h
@@ -340,16 +340,6 @@ xfs_btree_check_lblock(
340 struct xfs_buf *bp); /* buffer containing block, if any */ 340 struct xfs_buf *bp); /* buffer containing block, if any */
341 341
342/* 342/*
343 * Check that short form block header is ok.
344 */
345int /* error (0 or EFSCORRUPTED) */
346xfs_btree_check_sblock(
347 struct xfs_btree_cur *cur, /* btree cursor */
348 struct xfs_btree_sblock *block, /* btree short form block pointer */
349 int level, /* level of the btree block */
350 struct xfs_buf *bp); /* buffer containing block */
351
352/*
353 * Check that block header is ok. 343 * Check that block header is ok.
354 */ 344 */
355int 345int
@@ -368,29 +358,6 @@ xfs_btree_check_lptr(
368 xfs_dfsbno_t ptr, /* btree block disk address */ 358 xfs_dfsbno_t ptr, /* btree block disk address */
369 int level); /* btree block level */ 359 int level); /* btree block level */
370 360
371#define xfs_btree_check_lptr_disk(cur, ptr, level) \
372 xfs_btree_check_lptr(cur, be64_to_cpu(ptr), level)
373
374
375/*
376 * Check that (short) pointer is ok.
377 */
378int /* error (0 or EFSCORRUPTED) */
379xfs_btree_check_sptr(
380 struct xfs_btree_cur *cur, /* btree cursor */
381 xfs_agblock_t ptr, /* btree block disk address */
382 int level); /* btree block level */
383
384/*
385 * Check that (short) pointer is ok.
386 */
387int /* error (0 or EFSCORRUPTED) */
388xfs_btree_check_ptr(
389 struct xfs_btree_cur *cur, /* btree cursor */
390 union xfs_btree_ptr *ptr, /* btree block disk address */
391 int index, /* offset from ptr to check */
392 int level); /* btree block level */
393
394/* 361/*
395 * Delete the btree cursor. 362 * Delete the btree cursor.
396 */ 363 */
@@ -409,15 +376,6 @@ xfs_btree_dup_cursor(
409 xfs_btree_cur_t **ncur);/* output cursor */ 376 xfs_btree_cur_t **ncur);/* output cursor */
410 377
411/* 378/*
412 * Change the cursor to point to the first record in the current block
413 * at the given level. Other levels are unaffected.
414 */
415int /* success=1, failure=0 */
416xfs_btree_firstrec(
417 xfs_btree_cur_t *cur, /* btree cursor */
418 int level); /* level to change */
419
420/*
421 * Get a buffer for the block, return it with no data read. 379 * Get a buffer for the block, return it with no data read.
422 * Long-form addressing. 380 * Long-form addressing.
423 */ 381 */
@@ -449,15 +407,6 @@ xfs_btree_islastblock(
449 int level); /* level to check */ 407 int level); /* level to check */
450 408
451/* 409/*
452 * Change the cursor to point to the last record in the current block
453 * at the given level. Other levels are unaffected.
454 */
455int /* success=1, failure=0 */
456xfs_btree_lastrec(
457 xfs_btree_cur_t *cur, /* btree cursor */
458 int level); /* level to change */
459
460/*
461 * Compute first and last byte offsets for the fields given. 410 * Compute first and last byte offsets for the fields given.
462 * Interprets the offsets table, which contains struct field offsets. 411 * Interprets the offsets table, which contains struct field offsets.
463 */ 412 */
@@ -518,16 +467,6 @@ xfs_btree_reada_bufs(
518 xfs_extlen_t count); /* count of filesystem blocks */ 467 xfs_extlen_t count); /* count of filesystem blocks */
519 468
520/* 469/*
521 * Read-ahead btree blocks, at the given level.
522 * Bits in lr are set from XFS_BTCUR_{LEFT,RIGHT}RA.
523 */
524int /* readahead block count */
525xfs_btree_readahead(
526 xfs_btree_cur_t *cur, /* btree cursor */
527 int lev, /* level in btree */
528 int lr); /* left/right bits */
529
530/*
531 * Set the buffer for level "lev" in the cursor to bp, releasing 470 * Set the buffer for level "lev" in the cursor to bp, releasing
532 * any previous buffer. 471 * any previous buffer.
533 */ 472 */
@@ -544,13 +483,7 @@ xfs_btree_setbuf(
544int xfs_btree_increment(struct xfs_btree_cur *, int, int *); 483int xfs_btree_increment(struct xfs_btree_cur *, int, int *);
545int xfs_btree_decrement(struct xfs_btree_cur *, int, int *); 484int xfs_btree_decrement(struct xfs_btree_cur *, int, int *);
546int xfs_btree_lookup(struct xfs_btree_cur *, xfs_lookup_t, int *); 485int xfs_btree_lookup(struct xfs_btree_cur *, xfs_lookup_t, int *);
547int xfs_btree_updkey(struct xfs_btree_cur *, union xfs_btree_key *, int);
548int xfs_btree_update(struct xfs_btree_cur *, union xfs_btree_rec *); 486int xfs_btree_update(struct xfs_btree_cur *, union xfs_btree_rec *);
549int xfs_btree_lshift(struct xfs_btree_cur *, int, int *);
550int xfs_btree_rshift(struct xfs_btree_cur *, int, int *);
551int xfs_btree_split(struct xfs_btree_cur *, int, union xfs_btree_ptr *,
552 union xfs_btree_key *, struct xfs_btree_cur **, int *);
553int xfs_btree_new_root(struct xfs_btree_cur *, int *);
554int xfs_btree_new_iroot(struct xfs_btree_cur *, int *, int *); 487int xfs_btree_new_iroot(struct xfs_btree_cur *, int *, int *);
555int xfs_btree_kill_iroot(struct xfs_btree_cur *); 488int xfs_btree_kill_iroot(struct xfs_btree_cur *);
556int xfs_btree_insert(struct xfs_btree_cur *, int *); 489int xfs_btree_insert(struct xfs_btree_cur *, int *);