From: Christoph Hellwig <hch@lst.de>
To: xfs@oss.sgi.com
Subject: [PATCH 25/26] kill xfs_bmbt_log_block
Date: Mon, 4 Aug 2008 03:36:02 +0200 [thread overview]
Message-ID: <20080804013602.GZ8819@lst.de> (raw)
[-- Attachment #1: xfs-kill-xfs_bmbt_log_block --]
[-- Type: text/plain, Size: 4158 bytes --]
Only one caller left, which can just use xfs_btree_log_block if we export it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6-xfs/fs/xfs/xfs_bmap_btree.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/xfs_bmap_btree.c 2008-08-04 01:20:43.000000000 +0200
+++ linux-2.6-xfs/fs/xfs/xfs_bmap_btree.c 2008-08-04 01:21:46.000000000 +0200
@@ -44,34 +44,6 @@
#include "xfs_error.h"
#include "xfs_quota.h"
-#undef EXIT
-
-#define ENTRY XBT_ENTRY
-#define ERROR XBT_ERROR
-#define EXIT XBT_EXIT
-
-/*
- * Keep the XFS_BMBT_TRACE_ names around for now until all code using them
- * is converted to be generic and thus switches to the XFS_BTREE_TRACE_ names.
- */
-#define XFS_BMBT_TRACE_ARGBI(c,b,i) \
- XFS_BTREE_TRACE_ARGBI(c,b,i)
-#define XFS_BMBT_TRACE_ARGBII(c,b,i,j) \
- XFS_BTREE_TRACE_ARGBII(c,b,i,j)
-#define XFS_BMBT_TRACE_ARGFFFI(c,o,b,i,j) \
- XFS_BTREE_TRACE_ARGFFFI(c,o,b,i,j)
-#define XFS_BMBT_TRACE_ARGI(c,i) \
- XFS_BTREE_TRACE_ARGI(c,i)
-#define XFS_BMBT_TRACE_ARGIFK(c,i,f,s) \
- XFS_BTREE_TRACE_ARGIPK(c,i,(union xfs_btree_ptr)f,s)
-#define XFS_BMBT_TRACE_ARGIFR(c,i,f,r) \
- XFS_BTREE_TRACE_ARGIPR(c,i, \
- (union xfs_btree_ptr)f, (union xfs_btree_rec *)r)
-#define XFS_BMBT_TRACE_ARGIK(c,i,k) \
- XFS_BTREE_TRACE_ARGIK(c,i,(union xfs_btree_key *)k)
-#define XFS_BMBT_TRACE_CURSOR(c,s) \
- XFS_BTREE_TRACE_CURSOR(c,s)
-
/*
* Determine the extent state.
@@ -261,40 +233,6 @@ xfs_bmbt_disk_get_startoff(
}
/*
- * Log fields from the btree block header.
- */
-void
-xfs_bmbt_log_block(
- xfs_btree_cur_t *cur,
- xfs_buf_t *bp,
- int fields)
-{
- int first;
- int last;
- xfs_trans_t *tp;
- static const short offsets[] = {
- offsetof(xfs_bmbt_block_t, bb_magic),
- offsetof(xfs_bmbt_block_t, bb_level),
- offsetof(xfs_bmbt_block_t, bb_numrecs),
- offsetof(xfs_bmbt_block_t, bb_leftsib),
- offsetof(xfs_bmbt_block_t, bb_rightsib),
- sizeof(xfs_bmbt_block_t)
- };
-
- XFS_BMBT_TRACE_CURSOR(cur, ENTRY);
- XFS_BMBT_TRACE_ARGBI(cur, bp, fields);
- tp = cur->bc_tp;
- if (bp) {
- xfs_btree_offsets(fields, offsets, XFS_BB_NUM_BITS, &first,
- &last);
- xfs_trans_log_buf(tp, bp, first, last);
- } else
- xfs_trans_log_inode(tp, cur->bc_private.b.ip,
- XFS_ILOG_FBROOT(cur->bc_private.b.whichfork));
- XFS_BMBT_TRACE_CURSOR(cur, EXIT);
-}
-
-/*
* Set all the fields in a bmap extent record from the arguments.
*/
void
Index: linux-2.6-xfs/fs/xfs/xfs_btree.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/xfs_btree.c 2008-08-04 01:20:43.000000000 +0200
+++ linux-2.6-xfs/fs/xfs/xfs_btree.c 2008-08-04 01:21:46.000000000 +0200
@@ -1139,7 +1139,7 @@ xfs_btree_log_ptrs(
/*
* Log fields from the short from btree block header.
*/
-STATIC void
+void
xfs_btree_log_block(
struct xfs_btree_cur *cur, /* btree cursor */
struct xfs_buf *bp, /* buffer containing btree block */
Index: linux-2.6-xfs/fs/xfs/xfs_bmap.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/xfs_bmap.c 2008-08-04 01:20:43.000000000 +0200
+++ linux-2.6-xfs/fs/xfs/xfs_bmap.c 2008-08-04 01:21:46.000000000 +0200
@@ -3563,7 +3563,7 @@ xfs_bmap_extents_to_btree(
* Do all this logging at the end so that
* the root is at the right level.
*/
- xfs_bmbt_log_block(cur, abp, XFS_BB_ALL_BITS);
+ xfs_btree_log_block(cur, abp, XFS_BB_ALL_BITS);
xfs_bmbt_log_recs(cur, abp, 1, be16_to_cpu(ablock->bb_numrecs));
ASSERT(*curp == NULL);
*curp = cur;
Index: linux-2.6-xfs/fs/xfs/xfs_btree.h
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/xfs_btree.h 2008-08-04 01:21:53.000000000 +0200
+++ linux-2.6-xfs/fs/xfs/xfs_btree.h 2008-08-04 01:22:37.000000000 +0200
@@ -605,6 +605,11 @@ int xfs_btree_insert(struct xfs_btree_cu
int xfs_btree_delete(struct xfs_btree_cur *, int *);
int xfs_btree_getrec(struct xfs_btree_cur *, union xfs_btree_rec **, int *);
+/*
+ * Internal btree helpers also used by xfs_bmap.c.
+ */
+void xfs_btree_log_block(struct xfs_btree_cur *, struct xfs_buf *, int);
+
/*
* Helpers.
--
next reply other threads:[~2008-08-04 1:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-04 1:36 Christoph Hellwig [this message]
2008-08-05 1:43 ` [PATCH 25/26] kill xfs_bmbt_log_block Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080804013602.GZ8819@lst.de \
--to=hch@lst.de \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.