diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-10-30 01:58:21 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@sgi.com> | 2008-10-30 01:58:21 -0400 |
commit | fd6bcc5b63051392ba709a8fd33173b263669e0a (patch) | |
tree | fe3898818a9c8e09011a98de8d1caa9e98ae2479 /fs/xfs/xfs_bmap_btree.c | |
parent | 8cc938fe4237e50bea4aa557ed53b06de2319d49 (diff) |
[XFS] kill xfs_bmbt_log_block and xfs_bmbt_log_recs
These are equivalent to the xfs_btree_* versions, and the only remaining
caller can be switched to the generic one after they are exported. Also
remove some now dead infrastructure in xfs_bmap_btree.c.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32207a
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/xfs_bmap_btree.c')
-rw-r--r-- | fs/xfs/xfs_bmap_btree.c | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/fs/xfs/xfs_bmap_btree.c b/fs/xfs/xfs_bmap_btree.c index 5b8030561d78..7a02d391afec 100644 --- a/fs/xfs/xfs_bmap_btree.c +++ b/fs/xfs/xfs_bmap_btree.c | |||
@@ -44,33 +44,6 @@ | |||
44 | #include "xfs_error.h" | 44 | #include "xfs_error.h" |
45 | #include "xfs_quota.h" | 45 | #include "xfs_quota.h" |
46 | 46 | ||
47 | #undef EXIT | ||
48 | |||
49 | #define ENTRY XBT_ENTRY | ||
50 | #define ERROR XBT_ERROR | ||
51 | #define EXIT XBT_EXIT | ||
52 | |||
53 | /* | ||
54 | * Keep the XFS_BMBT_TRACE_ names around for now until all code using them | ||
55 | * is converted to be generic and thus switches to the XFS_BTREE_TRACE_ names. | ||
56 | */ | ||
57 | #define XFS_BMBT_TRACE_ARGBI(c,b,i) \ | ||
58 | XFS_BTREE_TRACE_ARGBI(c,b,i) | ||
59 | #define XFS_BMBT_TRACE_ARGBII(c,b,i,j) \ | ||
60 | XFS_BTREE_TRACE_ARGBII(c,b,i,j) | ||
61 | #define XFS_BMBT_TRACE_ARGFFFI(c,o,b,i,j) \ | ||
62 | XFS_BTREE_TRACE_ARGFFFI(c,o,b,i,j) | ||
63 | #define XFS_BMBT_TRACE_ARGI(c,i) \ | ||
64 | XFS_BTREE_TRACE_ARGI(c,i) | ||
65 | #define XFS_BMBT_TRACE_ARGIFK(c,i,f,s) \ | ||
66 | XFS_BTREE_TRACE_ARGIPK(c,i,(union xfs_btree_ptr)f,s) | ||
67 | #define XFS_BMBT_TRACE_ARGIFR(c,i,f,r) \ | ||
68 | XFS_BTREE_TRACE_ARGIPR(c,i, \ | ||
69 | (union xfs_btree_ptr)f, (union xfs_btree_rec *)r) | ||
70 | #define XFS_BMBT_TRACE_ARGIK(c,i,k) \ | ||
71 | XFS_BTREE_TRACE_ARGIK(c,i,(union xfs_btree_key *)k) | ||
72 | #define XFS_BMBT_TRACE_CURSOR(c,s) \ | ||
73 | XFS_BTREE_TRACE_CURSOR(c,s) | ||
74 | 47 | ||
75 | /* | 48 | /* |
76 | * Determine the extent state. | 49 | * Determine the extent state. |
@@ -259,67 +232,6 @@ xfs_bmbt_disk_get_startoff( | |||
259 | XFS_MASK64LO(64 - BMBT_EXNTFLAG_BITLEN)) >> 9; | 232 | XFS_MASK64LO(64 - BMBT_EXNTFLAG_BITLEN)) >> 9; |
260 | } | 233 | } |
261 | 234 | ||
262 | /* | ||
263 | * Log fields from the btree block header. | ||
264 | */ | ||
265 | void | ||
266 | xfs_bmbt_log_block( | ||
267 | xfs_btree_cur_t *cur, | ||
268 | xfs_buf_t *bp, | ||
269 | int fields) | ||
270 | { | ||
271 | int first; | ||
272 | int last; | ||
273 | xfs_trans_t *tp; | ||
274 | static const short offsets[] = { | ||
275 | offsetof(xfs_bmbt_block_t, bb_magic), | ||
276 | offsetof(xfs_bmbt_block_t, bb_level), | ||
277 | offsetof(xfs_bmbt_block_t, bb_numrecs), | ||
278 | offsetof(xfs_bmbt_block_t, bb_leftsib), | ||
279 | offsetof(xfs_bmbt_block_t, bb_rightsib), | ||
280 | sizeof(xfs_bmbt_block_t) | ||
281 | }; | ||
282 | |||
283 | XFS_BMBT_TRACE_CURSOR(cur, ENTRY); | ||
284 | XFS_BMBT_TRACE_ARGBI(cur, bp, fields); | ||
285 | tp = cur->bc_tp; | ||
286 | if (bp) { | ||
287 | xfs_btree_offsets(fields, offsets, XFS_BB_NUM_BITS, &first, | ||
288 | &last); | ||
289 | xfs_trans_log_buf(tp, bp, first, last); | ||
290 | } else | ||
291 | xfs_trans_log_inode(tp, cur->bc_private.b.ip, | ||
292 | XFS_ILOG_FBROOT(cur->bc_private.b.whichfork)); | ||
293 | XFS_BMBT_TRACE_CURSOR(cur, EXIT); | ||
294 | } | ||
295 | |||
296 | /* | ||
297 | * Log record values from the btree block. | ||
298 | */ | ||
299 | void | ||
300 | xfs_bmbt_log_recs( | ||
301 | xfs_btree_cur_t *cur, | ||
302 | xfs_buf_t *bp, | ||
303 | int rfirst, | ||
304 | int rlast) | ||
305 | { | ||
306 | xfs_bmbt_block_t *block; | ||
307 | int first; | ||
308 | int last; | ||
309 | xfs_bmbt_rec_t *rp; | ||
310 | xfs_trans_t *tp; | ||
311 | |||
312 | XFS_BMBT_TRACE_CURSOR(cur, ENTRY); | ||
313 | XFS_BMBT_TRACE_ARGBII(cur, bp, rfirst, rlast); | ||
314 | ASSERT(bp); | ||
315 | tp = cur->bc_tp; | ||
316 | block = XFS_BUF_TO_BMBT_BLOCK(bp); | ||
317 | rp = XFS_BMAP_REC_DADDR(block, 1, cur); | ||
318 | first = (int)((xfs_caddr_t)&rp[rfirst - 1] - (xfs_caddr_t)block); | ||
319 | last = (int)(((xfs_caddr_t)&rp[rlast] - 1) - (xfs_caddr_t)block); | ||
320 | xfs_trans_log_buf(tp, bp, first, last); | ||
321 | XFS_BMBT_TRACE_CURSOR(cur, EXIT); | ||
322 | } | ||
323 | 235 | ||
324 | /* | 236 | /* |
325 | * Set all the fields in a bmap extent record from the arguments. | 237 | * Set all the fields in a bmap extent record from the arguments. |