aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_super.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2008-10-30 01:55:13 -0400
committerLachlan McIlroy <lachlan@sgi.com>2008-10-30 01:55:13 -0400
commit8c4ed633e65d0bd0a25d45aad9b4646e3236cad7 (patch)
tree36877f1d34c0dbd20cfd0315112d62dbf4571b80 /fs/xfs/linux-2.6/xfs_super.c
parent854929f05831d3a290a802815ee955b96c740c61 (diff)
[XFS] make btree tracing generic
Make the existing bmap btree tracing generic so that it applies to all btree types. Some fragments lifted from a patch by Dave Chinner. SGI-PV: 985583 SGI-Modid: xfs-linux-melb:xfs-kern:32187a 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/linux-2.6/xfs_super.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index 9bfb26066a84..0c71c2158535 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -36,6 +36,7 @@
36#include "xfs_dinode.h" 36#include "xfs_dinode.h"
37#include "xfs_inode.h" 37#include "xfs_inode.h"
38#include "xfs_btree.h" 38#include "xfs_btree.h"
39#include "xfs_btree_trace.h"
39#include "xfs_ialloc.h" 40#include "xfs_ialloc.h"
40#include "xfs_bmap.h" 41#include "xfs_bmap.h"
41#include "xfs_rtalloc.h" 42#include "xfs_rtalloc.h"
@@ -1916,10 +1917,19 @@ xfs_alloc_trace_bufs(void)
1916 if (!xfs_bmap_trace_buf) 1917 if (!xfs_bmap_trace_buf)
1917 goto out_free_alloc_trace; 1918 goto out_free_alloc_trace;
1918#endif 1919#endif
1919#ifdef XFS_BMBT_TRACE 1920#ifdef XFS_BTREE_TRACE
1921 xfs_allocbt_trace_buf = ktrace_alloc(XFS_ALLOCBT_TRACE_SIZE,
1922 KM_MAYFAIL);
1923 if (!xfs_allocbt_trace_buf)
1924 goto out_free_bmap_trace;
1925
1926 xfs_inobt_trace_buf = ktrace_alloc(XFS_INOBT_TRACE_SIZE, KM_MAYFAIL);
1927 if (!xfs_inobt_trace_buf)
1928 goto out_free_allocbt_trace;
1929
1920 xfs_bmbt_trace_buf = ktrace_alloc(XFS_BMBT_TRACE_SIZE, KM_MAYFAIL); 1930 xfs_bmbt_trace_buf = ktrace_alloc(XFS_BMBT_TRACE_SIZE, KM_MAYFAIL);
1921 if (!xfs_bmbt_trace_buf) 1931 if (!xfs_bmbt_trace_buf)
1922 goto out_free_bmap_trace; 1932 goto out_free_inobt_trace;
1923#endif 1933#endif
1924#ifdef XFS_ATTR_TRACE 1934#ifdef XFS_ATTR_TRACE
1925 xfs_attr_trace_buf = ktrace_alloc(XFS_ATTR_TRACE_SIZE, KM_MAYFAIL); 1935 xfs_attr_trace_buf = ktrace_alloc(XFS_ATTR_TRACE_SIZE, KM_MAYFAIL);
@@ -1941,8 +1951,12 @@ xfs_alloc_trace_bufs(void)
1941 ktrace_free(xfs_attr_trace_buf); 1951 ktrace_free(xfs_attr_trace_buf);
1942 out_free_bmbt_trace: 1952 out_free_bmbt_trace:
1943#endif 1953#endif
1944#ifdef XFS_BMBT_TRACE 1954#ifdef XFS_BTREE_TRACE
1945 ktrace_free(xfs_bmbt_trace_buf); 1955 ktrace_free(xfs_bmbt_trace_buf);
1956 out_free_inobt_trace:
1957 ktrace_free(xfs_inobt_trace_buf);
1958 out_free_allocbt_trace:
1959 ktrace_free(xfs_allocbt_trace_buf);
1946 out_free_bmap_trace: 1960 out_free_bmap_trace:
1947#endif 1961#endif
1948#ifdef XFS_BMAP_TRACE 1962#ifdef XFS_BMAP_TRACE
@@ -1965,8 +1979,10 @@ xfs_free_trace_bufs(void)
1965#ifdef XFS_ATTR_TRACE 1979#ifdef XFS_ATTR_TRACE
1966 ktrace_free(xfs_attr_trace_buf); 1980 ktrace_free(xfs_attr_trace_buf);
1967#endif 1981#endif
1968#ifdef XFS_BMBT_TRACE 1982#ifdef XFS_BTREE_TRACE
1969 ktrace_free(xfs_bmbt_trace_buf); 1983 ktrace_free(xfs_bmbt_trace_buf);
1984 ktrace_free(xfs_inobt_trace_buf);
1985 ktrace_free(xfs_allocbt_trace_buf);
1970#endif 1986#endif
1971#ifdef XFS_BMAP_TRACE 1987#ifdef XFS_BMAP_TRACE
1972 ktrace_free(xfs_bmap_trace_buf); 1988 ktrace_free(xfs_bmap_trace_buf);