Commit 3cc7524c8445e6244b055f3fa338529188c7c260
Committed by
Lachlan McIlroy
1 parent
4a26e66e77
Exists in
master
and in
39 other branches
[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>
Showing 2 changed files with 11 additions and 78 deletions Side-by-side Diff
fs/xfs/xfs_btree.c
... | ... | @@ -87,7 +87,7 @@ |
87 | 87 | return 0; |
88 | 88 | } |
89 | 89 | |
90 | -int /* error (0 or EFSCORRUPTED) */ | |
90 | +STATIC int /* error (0 or EFSCORRUPTED) */ | |
91 | 91 | xfs_btree_check_sblock( |
92 | 92 | struct xfs_btree_cur *cur, /* btree cursor */ |
93 | 93 | struct xfs_btree_sblock *block, /* btree short form block pointer */ |
... | ... | @@ -163,7 +163,7 @@ |
163 | 163 | /* |
164 | 164 | * Check that (short) pointer is ok. |
165 | 165 | */ |
166 | -int /* error (0 or EFSCORRUPTED) */ | |
166 | +STATIC int /* error (0 or EFSCORRUPTED) */ | |
167 | 167 | xfs_btree_check_sptr( |
168 | 168 | struct xfs_btree_cur *cur, /* btree cursor */ |
169 | 169 | xfs_agblock_t bno, /* btree block disk address */ |
... | ... | @@ -182,7 +182,7 @@ |
182 | 182 | /* |
183 | 183 | * Check that block ptr is ok. |
184 | 184 | */ |
185 | -int /* error (0 or EFSCORRUPTED) */ | |
185 | +STATIC int /* error (0 or EFSCORRUPTED) */ | |
186 | 186 | xfs_btree_check_ptr( |
187 | 187 | struct xfs_btree_cur *cur, /* btree cursor */ |
188 | 188 | union xfs_btree_ptr *ptr, /* btree block disk address */ |
... | ... | @@ -523,7 +523,7 @@ |
523 | 523 | * Change the cursor to point to the first record at the given level. |
524 | 524 | * Other levels are unaffected. |
525 | 525 | */ |
526 | -int /* success=1, failure=0 */ | |
526 | +STATIC int /* success=1, failure=0 */ | |
527 | 527 | xfs_btree_firstrec( |
528 | 528 | xfs_btree_cur_t *cur, /* btree cursor */ |
529 | 529 | int level) /* level to change */ |
... | ... | @@ -552,7 +552,7 @@ |
552 | 552 | * Change the cursor to point to the last record in the current block |
553 | 553 | * at the given level. Other levels are unaffected. |
554 | 554 | */ |
555 | -int /* success=1, failure=0 */ | |
555 | +STATIC int /* success=1, failure=0 */ | |
556 | 556 | xfs_btree_lastrec( |
557 | 557 | xfs_btree_cur_t *cur, /* btree cursor */ |
558 | 558 | int level) /* level to change */ |
... | ... | @@ -775,7 +775,7 @@ |
775 | 775 | * Read-ahead btree blocks, at the given level. |
776 | 776 | * Bits in lr are set from XFS_BTCUR_{LEFT,RIGHT}RA. |
777 | 777 | */ |
778 | -int | |
778 | +STATIC int | |
779 | 779 | xfs_btree_readahead( |
780 | 780 | struct xfs_btree_cur *cur, /* btree cursor */ |
781 | 781 | int lev, /* level in btree */ |
... | ... | @@ -1711,7 +1711,7 @@ |
1711 | 1711 | /* |
1712 | 1712 | * Update keys at all levels from here to the root along the cursor's path. |
1713 | 1713 | */ |
1714 | -int | |
1714 | +STATIC int | |
1715 | 1715 | xfs_btree_updkey( |
1716 | 1716 | struct xfs_btree_cur *cur, |
1717 | 1717 | union xfs_btree_key *keyp, |
... | ... | @@ -1821,7 +1821,7 @@ |
1821 | 1821 | * Move 1 record left from cur/level if possible. |
1822 | 1822 | * Update cur to reflect the new path. |
1823 | 1823 | */ |
1824 | -int /* error */ | |
1824 | +STATIC int /* error */ | |
1825 | 1825 | xfs_btree_lshift( |
1826 | 1826 | struct xfs_btree_cur *cur, |
1827 | 1827 | int level, |
... | ... | @@ -2004,7 +2004,7 @@ |
2004 | 2004 | * Move 1 record right from cur/level if possible. |
2005 | 2005 | * Update cur to reflect the new path. |
2006 | 2006 | */ |
2007 | -int /* error */ | |
2007 | +STATIC int /* error */ | |
2008 | 2008 | xfs_btree_rshift( |
2009 | 2009 | struct xfs_btree_cur *cur, |
2010 | 2010 | int level, |
... | ... | @@ -2180,7 +2180,7 @@ |
2180 | 2180 | * Return new block number and the key to its first |
2181 | 2181 | * record (to be inserted into parent). |
2182 | 2182 | */ |
2183 | -int /* error */ | |
2183 | +STATIC int /* error */ | |
2184 | 2184 | xfs_btree_split( |
2185 | 2185 | struct xfs_btree_cur *cur, |
2186 | 2186 | int level, |
... | ... | @@ -2465,7 +2465,7 @@ |
2465 | 2465 | /* |
2466 | 2466 | * Allocate a new root block, fill it in. |
2467 | 2467 | */ |
2468 | -int /* error */ | |
2468 | +STATIC int /* error */ | |
2469 | 2469 | xfs_btree_new_root( |
2470 | 2470 | struct xfs_btree_cur *cur, /* btree cursor */ |
2471 | 2471 | int *stat) /* success/failure */ |
fs/xfs/xfs_btree.h
... | ... | @@ -340,16 +340,6 @@ |
340 | 340 | struct xfs_buf *bp); /* buffer containing block, if any */ |
341 | 341 | |
342 | 342 | /* |
343 | - * Check that short form block header is ok. | |
344 | - */ | |
345 | -int /* error (0 or EFSCORRUPTED) */ | |
346 | -xfs_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 | 343 | * Check that block header is ok. |
354 | 344 | */ |
355 | 345 | int |
356 | 346 | |
... | ... | @@ -368,30 +358,7 @@ |
368 | 358 | xfs_dfsbno_t ptr, /* btree block disk address */ |
369 | 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 | 361 | /* |
376 | - * Check that (short) pointer is ok. | |
377 | - */ | |
378 | -int /* error (0 or EFSCORRUPTED) */ | |
379 | -xfs_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 | - */ | |
387 | -int /* error (0 or EFSCORRUPTED) */ | |
388 | -xfs_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 | -/* | |
395 | 362 | * Delete the btree cursor. |
396 | 363 | */ |
397 | 364 | void |
... | ... | @@ -409,15 +376,6 @@ |
409 | 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 | - */ | |
415 | -int /* success=1, failure=0 */ | |
416 | -xfs_btree_firstrec( | |
417 | - xfs_btree_cur_t *cur, /* btree cursor */ | |
418 | - int level); /* level to change */ | |
419 | - | |
420 | -/* | |
421 | 379 | * Get a buffer for the block, return it with no data read. |
422 | 380 | * Long-form addressing. |
423 | 381 | */ |
... | ... | @@ -449,15 +407,6 @@ |
449 | 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 | - */ | |
455 | -int /* success=1, failure=0 */ | |
456 | -xfs_btree_lastrec( | |
457 | - xfs_btree_cur_t *cur, /* btree cursor */ | |
458 | - int level); /* level to change */ | |
459 | - | |
460 | -/* | |
461 | 410 | * Compute first and last byte offsets for the fields given. |
462 | 411 | * Interprets the offsets table, which contains struct field offsets. |
463 | 412 | */ |
... | ... | @@ -518,16 +467,6 @@ |
518 | 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 | - */ | |
524 | -int /* readahead block count */ | |
525 | -xfs_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 | 470 | * Set the buffer for level "lev" in the cursor to bp, releasing |
532 | 471 | * any previous buffer. |
533 | 472 | */ |
534 | 473 | |
... | ... | @@ -544,13 +483,7 @@ |
544 | 483 | int xfs_btree_increment(struct xfs_btree_cur *, int, int *); |
545 | 484 | int xfs_btree_decrement(struct xfs_btree_cur *, int, int *); |
546 | 485 | int xfs_btree_lookup(struct xfs_btree_cur *, xfs_lookup_t, int *); |
547 | -int xfs_btree_updkey(struct xfs_btree_cur *, union xfs_btree_key *, int); | |
548 | 486 | int xfs_btree_update(struct xfs_btree_cur *, union xfs_btree_rec *); |
549 | -int xfs_btree_lshift(struct xfs_btree_cur *, int, int *); | |
550 | -int xfs_btree_rshift(struct xfs_btree_cur *, int, int *); | |
551 | -int xfs_btree_split(struct xfs_btree_cur *, int, union xfs_btree_ptr *, | |
552 | - union xfs_btree_key *, struct xfs_btree_cur **, int *); | |
553 | -int xfs_btree_new_root(struct xfs_btree_cur *, int *); | |
554 | 487 | int xfs_btree_new_iroot(struct xfs_btree_cur *, int *, int *); |
555 | 488 | int xfs_btree_kill_iroot(struct xfs_btree_cur *); |
556 | 489 | int xfs_btree_insert(struct xfs_btree_cur *, int *); |