diff options
author | Eric Sandeen <sandeen@sandeen.net> | 2007-02-10 02:37:40 -0500 |
---|---|---|
committer | Tim Shimmin <tes@sgi.com> | 2007-02-10 02:37:40 -0500 |
commit | 6be145bfb1ce93b2dbb854fee66fbb8d04916339 (patch) | |
tree | e723cab2dbc3a067a9d154070ad98b51b3a7fca7 /fs/xfs/xfs_rtalloc.c | |
parent | 2c36ddeda7f04c085d9a612cf8dab5f0a1cd5224 (diff) |
[XFS] Remove a bunch of unused functions from XFS.
Patch provided by Eric Sandeen (sandeen@sandeen.net).
SGI-PV: 960897
SGI-Modid: xfs-linux-melb:xfs-kern:28038a
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
-rw-r--r-- | fs/xfs/xfs_rtalloc.c | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index dcf57dc071ac..6fff19dc3cf9 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c | |||
@@ -913,57 +913,6 @@ xfs_rtcheck_alloc_range( | |||
913 | } | 913 | } |
914 | #endif | 914 | #endif |
915 | 915 | ||
916 | #ifdef DEBUG | ||
917 | /* | ||
918 | * Check whether the given block in the bitmap has the given value. | ||
919 | */ | ||
920 | STATIC int /* 1 for matches, 0 for not */ | ||
921 | xfs_rtcheck_bit( | ||
922 | xfs_mount_t *mp, /* file system mount structure */ | ||
923 | xfs_trans_t *tp, /* transaction pointer */ | ||
924 | xfs_rtblock_t start, /* bit (block) to check */ | ||
925 | int val) /* 1 for free, 0 for allocated */ | ||
926 | { | ||
927 | int bit; /* bit number in the word */ | ||
928 | xfs_rtblock_t block; /* bitmap block number */ | ||
929 | xfs_buf_t *bp; /* buf for the block */ | ||
930 | xfs_rtword_t *bufp; /* pointer into the buffer */ | ||
931 | /* REFERENCED */ | ||
932 | int error; /* error value */ | ||
933 | xfs_rtword_t wdiff; /* difference between bit & expected */ | ||
934 | int word; /* word number in the buffer */ | ||
935 | xfs_rtword_t wval; /* word value from buffer */ | ||
936 | |||
937 | block = XFS_BITTOBLOCK(mp, start); | ||
938 | error = xfs_rtbuf_get(mp, tp, block, 0, &bp); | ||
939 | bufp = (xfs_rtword_t *)XFS_BUF_PTR(bp); | ||
940 | word = XFS_BITTOWORD(mp, start); | ||
941 | bit = (int)(start & (XFS_NBWORD - 1)); | ||
942 | wval = bufp[word]; | ||
943 | xfs_trans_brelse(tp, bp); | ||
944 | wdiff = (wval ^ -val) & ((xfs_rtword_t)1 << bit); | ||
945 | return !wdiff; | ||
946 | } | ||
947 | #endif /* DEBUG */ | ||
948 | |||
949 | #if 0 | ||
950 | /* | ||
951 | * Check that the given extent (block range) is free already. | ||
952 | */ | ||
953 | STATIC int /* error */ | ||
954 | xfs_rtcheck_free_range( | ||
955 | xfs_mount_t *mp, /* file system mount point */ | ||
956 | xfs_trans_t *tp, /* transaction pointer */ | ||
957 | xfs_rtblock_t bno, /* starting block number of extent */ | ||
958 | xfs_extlen_t len, /* length of extent */ | ||
959 | int *stat) /* out: 1 for free, 0 for not */ | ||
960 | { | ||
961 | xfs_rtblock_t new; /* dummy for xfs_rtcheck_range */ | ||
962 | |||
963 | return xfs_rtcheck_range(mp, tp, bno, len, 1, &new, stat); | ||
964 | } | ||
965 | #endif | ||
966 | |||
967 | /* | 916 | /* |
968 | * Check that the given range is either all allocated (val = 0) or | 917 | * Check that the given range is either all allocated (val = 0) or |
969 | * all free (val = 1). | 918 | * all free (val = 1). |
@@ -2382,60 +2331,3 @@ xfs_rtpick_extent( | |||
2382 | *pick = b; | 2331 | *pick = b; |
2383 | return 0; | 2332 | return 0; |
2384 | } | 2333 | } |
2385 | |||
2386 | #ifdef DEBUG | ||
2387 | /* | ||
2388 | * Debug code: print out the value of a range in the bitmap. | ||
2389 | */ | ||
2390 | void | ||
2391 | xfs_rtprint_range( | ||
2392 | xfs_mount_t *mp, /* file system mount structure */ | ||
2393 | xfs_trans_t *tp, /* transaction pointer */ | ||
2394 | xfs_rtblock_t start, /* starting block to print */ | ||
2395 | xfs_extlen_t len) /* length to print */ | ||
2396 | { | ||
2397 | xfs_extlen_t i; /* block number in the extent */ | ||
2398 | |||
2399 | cmn_err(CE_DEBUG, "%Ld: ", (long long)start); | ||
2400 | for (i = 0; i < len; i++) | ||
2401 | cmn_err(CE_DEBUG, "%d", xfs_rtcheck_bit(mp, tp, start + i, 1)); | ||
2402 | cmn_err(CE_DEBUG, "\n"); | ||
2403 | } | ||
2404 | |||
2405 | /* | ||
2406 | * Debug code: print the summary file. | ||
2407 | */ | ||
2408 | void | ||
2409 | xfs_rtprint_summary( | ||
2410 | xfs_mount_t *mp, /* file system mount structure */ | ||
2411 | xfs_trans_t *tp) /* transaction pointer */ | ||
2412 | { | ||
2413 | xfs_suminfo_t c; /* summary data */ | ||
2414 | xfs_rtblock_t i; /* bitmap block number */ | ||
2415 | int l; /* summary information level */ | ||
2416 | int p; /* flag for printed anything */ | ||
2417 | xfs_fsblock_t sb; /* summary block number */ | ||
2418 | xfs_buf_t *sumbp; /* summary block buffer */ | ||
2419 | |||
2420 | sumbp = NULL; | ||
2421 | for (l = 0; l < mp->m_rsumlevels; l++) { | ||
2422 | for (p = 0, i = 0; i < mp->m_sb.sb_rbmblocks; i++) { | ||
2423 | (void)xfs_rtget_summary(mp, tp, l, i, &sumbp, &sb, &c); | ||
2424 | if (c) { | ||
2425 | if (!p) { | ||
2426 | cmn_err(CE_DEBUG, "%Ld-%Ld:", 1LL << l, | ||
2427 | XFS_RTMIN((1LL << l) + | ||
2428 | ((1LL << l) - 1LL), | ||
2429 | mp->m_sb.sb_rextents)); | ||
2430 | p = 1; | ||
2431 | } | ||
2432 | cmn_err(CE_DEBUG, " %Ld:%d", (long long)i, c); | ||
2433 | } | ||
2434 | } | ||
2435 | if (p) | ||
2436 | cmn_err(CE_DEBUG, "\n"); | ||
2437 | } | ||
2438 | if (sumbp) | ||
2439 | xfs_trans_brelse(tp, sumbp); | ||
2440 | } | ||
2441 | #endif /* DEBUG */ | ||