aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_bmap_btree.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2011-07-13 07:43:50 -0400
committerChristoph Hellwig <hch@lst.de>2011-07-13 07:43:50 -0400
commitc84470dda7a1165d90f55c2025c4c8ca403d485e (patch)
treeee30dc29f914ab809f2388b3e184e738b712c22f /fs/xfs/xfs_bmap_btree.c
parentea15ab3cdda1bc6822f572ce9ce5d86f097f9b08 (diff)
xfs: remove leftovers of the old btree tracing code
Remove various bits left over from the old kdb-only btree tracing code, but leave the actual trace point stubs in place to ease adding new event based btree tracing. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Alex Elder <aelder@sgi.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_bmap_btree.c')
-rw-r--r--fs/xfs/xfs_bmap_btree.c98
1 files changed, 0 insertions, 98 deletions
diff --git a/fs/xfs/xfs_bmap_btree.c b/fs/xfs/xfs_bmap_btree.c
index 50a28442a544..e2f5d59cbeaf 100644
--- a/fs/xfs/xfs_bmap_btree.c
+++ b/fs/xfs/xfs_bmap_btree.c
@@ -33,7 +33,6 @@
33#include "xfs_inode_item.h" 33#include "xfs_inode_item.h"
34#include "xfs_alloc.h" 34#include "xfs_alloc.h"
35#include "xfs_btree.h" 35#include "xfs_btree.h"
36#include "xfs_btree_trace.h"
37#include "xfs_itable.h" 36#include "xfs_itable.h"
38#include "xfs_bmap.h" 37#include "xfs_bmap.h"
39#include "xfs_error.h" 38#include "xfs_error.h"
@@ -732,95 +731,6 @@ xfs_bmbt_recs_inorder(
732} 731}
733#endif /* DEBUG */ 732#endif /* DEBUG */
734 733
735#ifdef XFS_BTREE_TRACE
736ktrace_t *xfs_bmbt_trace_buf;
737
738STATIC void
739xfs_bmbt_trace_enter(
740 struct xfs_btree_cur *cur,
741 const char *func,
742 char *s,
743 int type,
744 int line,
745 __psunsigned_t a0,
746 __psunsigned_t a1,
747 __psunsigned_t a2,
748 __psunsigned_t a3,
749 __psunsigned_t a4,
750 __psunsigned_t a5,
751 __psunsigned_t a6,
752 __psunsigned_t a7,
753 __psunsigned_t a8,
754 __psunsigned_t a9,
755 __psunsigned_t a10)
756{
757 struct xfs_inode *ip = cur->bc_private.b.ip;
758 int whichfork = cur->bc_private.b.whichfork;
759
760 ktrace_enter(xfs_bmbt_trace_buf,
761 (void *)((__psint_t)type | (whichfork << 8) | (line << 16)),
762 (void *)func, (void *)s, (void *)ip, (void *)cur,
763 (void *)a0, (void *)a1, (void *)a2, (void *)a3,
764 (void *)a4, (void *)a5, (void *)a6, (void *)a7,
765 (void *)a8, (void *)a9, (void *)a10);
766}
767
768STATIC void
769xfs_bmbt_trace_cursor(
770 struct xfs_btree_cur *cur,
771 __uint32_t *s0,
772 __uint64_t *l0,
773 __uint64_t *l1)
774{
775 struct xfs_bmbt_rec_host r;
776
777 xfs_bmbt_set_all(&r, &cur->bc_rec.b);
778
779 *s0 = (cur->bc_nlevels << 24) |
780 (cur->bc_private.b.flags << 16) |
781 cur->bc_private.b.allocated;
782 *l0 = r.l0;
783 *l1 = r.l1;
784}
785
786STATIC void
787xfs_bmbt_trace_key(
788 struct xfs_btree_cur *cur,
789 union xfs_btree_key *key,
790 __uint64_t *l0,
791 __uint64_t *l1)
792{
793 *l0 = be64_to_cpu(key->bmbt.br_startoff);
794 *l1 = 0;
795}
796
797/* Endian flipping versions of the bmbt extraction functions */
798STATIC void
799xfs_bmbt_disk_get_all(
800 xfs_bmbt_rec_t *r,
801 xfs_bmbt_irec_t *s)
802{
803 __xfs_bmbt_get_all(get_unaligned_be64(&r->l0),
804 get_unaligned_be64(&r->l1), s);
805}
806
807STATIC void
808xfs_bmbt_trace_record(
809 struct xfs_btree_cur *cur,
810 union xfs_btree_rec *rec,
811 __uint64_t *l0,
812 __uint64_t *l1,
813 __uint64_t *l2)
814{
815 struct xfs_bmbt_irec irec;
816
817 xfs_bmbt_disk_get_all(&rec->bmbt, &irec);
818 *l0 = irec.br_startoff;
819 *l1 = irec.br_startblock;
820 *l2 = irec.br_blockcount;
821}
822#endif /* XFS_BTREE_TRACE */
823
824static const struct xfs_btree_ops xfs_bmbt_ops = { 734static const struct xfs_btree_ops xfs_bmbt_ops = {
825 .rec_len = sizeof(xfs_bmbt_rec_t), 735 .rec_len = sizeof(xfs_bmbt_rec_t),
826 .key_len = sizeof(xfs_bmbt_key_t), 736 .key_len = sizeof(xfs_bmbt_key_t),
@@ -837,18 +747,10 @@ static const struct xfs_btree_ops xfs_bmbt_ops = {
837 .init_rec_from_cur = xfs_bmbt_init_rec_from_cur, 747 .init_rec_from_cur = xfs_bmbt_init_rec_from_cur,
838 .init_ptr_from_cur = xfs_bmbt_init_ptr_from_cur, 748 .init_ptr_from_cur = xfs_bmbt_init_ptr_from_cur,
839 .key_diff = xfs_bmbt_key_diff, 749 .key_diff = xfs_bmbt_key_diff,
840
841#ifdef DEBUG 750#ifdef DEBUG
842 .keys_inorder = xfs_bmbt_keys_inorder, 751 .keys_inorder = xfs_bmbt_keys_inorder,
843 .recs_inorder = xfs_bmbt_recs_inorder, 752 .recs_inorder = xfs_bmbt_recs_inorder,
844#endif 753#endif
845
846#ifdef XFS_BTREE_TRACE
847 .trace_enter = xfs_bmbt_trace_enter,
848 .trace_cursor = xfs_bmbt_trace_cursor,
849 .trace_key = xfs_bmbt_trace_key,
850 .trace_record = xfs_bmbt_trace_record,
851#endif
852}; 754};
853 755
854/* 756/*