Skip to contentSkip to conversation

xfs: event tracing support

RFC PATCH In review Christoph Hellwig 4 participants 11 messages Jun 16, 2009 – Jul 18, 2009 XFS filesystem

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 xfs: event tracing support

Convert the old xfs tracing support that could only be used with the out of tree kdb and xfsidbg patches to use the generic event tracer.

To use it make sure CONFIG_EVENT_TRACING is enabled and then enable all xfs trace channels by:

echo 1 > /sys/kernel/debug/tracing/events/xfs/enable

Alternatively you can also enable invivididual trace events in XFS or even filter on them. Take a look at Documentation/trace/events.txt for details. To reads the events do a

cat /sys/kernel/debug/tracing/trace

which will give output like this:

# tracer: nop
#
# TASK-PID CPU# TIMESTAMP FUNCTION
# | | | | |

           <...>-23195 [000] 1884167.739031: xfs_alloc_extent: dev 253:21 first agno 0 agbno 5448 minlen 1 maxlen 1 mod 0 prod 1 minleft 2 total 0 alignment 1 len 1 type NEAR_BNO otype START_BNO wasdel 0 wasfromfl 0 isfl 0 userdata 1 by trace_xfs_alloc_extent
           <...>-23195 [000] 1884167.739031: xfs_agf: dev 253:21 agno 0 flags FREEBLKS length 579819 roots b 1 c 2 levels b 1 c 1 flfirst 62 fllast 65 flcount 4 freeblks 574368 longest 531488 by xfs_alloc_ag_vextent
           <...>-23195 [000] 1884167.739031: xfs_buf_item: dev 253:21 BLOG bip 0xd6cb54a0 bp 0xf5a90bd8 flags |DIRTY|LOGGED recur 0 refcount 15 blkno 0x1 blen 0x200 bpflags |MAPPED|ASYNC|DONE|DELWRI|TRYLOCK|PAGE_CACHE|DELWRI_Q pincount 14 lockval 0 lidesc 0xeba5cb58 liflags IN_AIL
           <...>-23195 [000] 1884167.739032: xfs_alloc_busy: dev 253:21 notfound agno 0 agbno 5448 len 1 slot 0 by xfs_alloc_search_busy
           <...>-23195 [000] 1884167.739033: xfs_bmap: dev 253:21 ino 0x4349 pre xfs_bmap_add_extent_hole_real:LC df idx 15 offset1 67 block1 1675 count1 3773 flag1 0 offset2 0 block2 1675 count2 0 flag2 0
           <...>-23195 [000] 1884167.739033: xfs_bmap: dev 253:21 ino 0x4349 post xfs_bmap_add_extent_hole_real:LC df idx 15 offset1 67 block1 1675 count1 3774 flag1 0 offset2 0 block2 1675 count2 0 flag2 0
           <...>-23195 [000] 1884167.739035: xfs_buf: dev 253:21 got_lock hold 3 lock 0 val 0x0 offset 0x5f9000 size 0x1000 flags MAPPED|ASYNC|DONE|DELWRI|PAGE_CACHE|DELWRI_Q by xfs_buf_get_flags
           <...>-23195 [000] 1884167.739035: xfs_buf: dev 253:21 get hold 3 lock 0 val 0x14005 offset 0x5f9000 size 0x1000 flags MAPPED|ASYNC|DONE|DELWRI|PAGE_CACHE|DELWRI_Q by xfs_buf_read_flags

This patch converts most existing trace points in XFS
more or less fully to the event tracer. Note that the infrastructure already provides pid value (and theoretically the task name, although that's buggy currently) so we don't have to record
them ourselves. There also are a couple of places where we provide information more usefull for general tracing instead of pointers for gdb, e.g. the inode number instead of the inode pointer address.

A couple of tracers are not converted currently:

- the log grant tracing is gone. There was just one callsite left with most state changes missing, indicating severe bitrot. I don't plan to re-introduce it for now.
- the filestreams tracing is left as-is for now. It has some very funky tracers covering all kinds of special cases. If anyone cares enough about filestreams they should take a look.
- the btree tracer. Due to the different record/key types we can't handle it with the current tracing infrastructure. I'm working with Steve to get some infrastructure to get this back.

All this gives a quite massive patch of:

     67 files changed, 1563 insertions(+), 2237 deletions(-)

So while adding actual tracing support without xfsidbg we actually remove lots of lines of code.

I'd love to get this out and into 2.6.31 still if possible so that we can have a tracing option out there in the field ASAP.

fs/xfs/Makefile +1 -5
Index: linux-2.6/fs/xfs/Makefile
===================================================================
@@ -90,8 +90,7 @@ xfs-y				+= xfs_alloc.o \
 				   xfs_rw.o \
 				   xfs_dmops.o
 
-xfs-$(CONFIG_XFS_TRACE)		+= xfs_btree_trace.o \
-				   xfs_dir2_trace.o
+xfs-$(CONFIG_XFS_TRACE)		+= xfs_btree_trace.o
 
 # Objects in linux/
 xfs-y				+= $(addprefix $(XFS_LINUX)/, \
@@ -113,6 +112,3 @@ xfs-y				+= $(addprefix $(XFS_LINUX)/, \
 xfs-y				+= $(addprefix support/, \
 				   debug.o \
 				   uuid.o)
-
-xfs-$(CONFIG_XFS_TRACE)		+= support/ktrace.o
-
fs/xfs/linux-2.6/xfs_aops.c +5 -47

88 lines not on this page · raw message

fs/xfs/linux-2.6/xfs_buf.c +38 -73

325 lines not on this page · raw message

fs/xfs/linux-2.6/xfs_buf.h +22 -11
Index: linux-2.6/fs/xfs/linux-2.6/xfs_buf.h
===================================================================
@@ -95,6 +95,28 @@ typedef enum {
 	_XFS_BARRIER_FAILED = (1 << 23),
 } xfs_buf_flags_t;
 
+#define XFS_BUF_FLAGS \
+	{ XBF_READ,		"READ" }, \
+	{ XBF_WRITE,		"WRITE" }, \
+	{ XBF_MAPPED,		"MAPPED" }, \
+	{ XBF_ASYNC,		"ASYNC" }, \
+	{ XBF_DONE,		"DONE" }, \
+	{ XBF_DELWRI,		"DELWRI" }, \
+	{ XBF_STALE,		"STALE" }, \
+	{ XBF_FS_MANAGED,	"FS_MANAGED" }, \
+ 	{ XBF_ORDERED,		"ORDERED" }, \
+	{ XBF_READ_AHEAD,	"READ_AHEAD" }, \
+	{ XBF_LOCK,		"LOCK" },  	/* should never be set */\
+	{ XBF_TRYLOCK,		"TRYLOCK" }, 	/* ditto */\
+	{ XBF_DONT_BLOCK,	"DONT_BLOCK" },	/* ditto */\
+	{ _XBF_PAGE_CACHE,	"PAGE_CACHE" }, \
+	{ _XBF_PAGES,		"PAGES" }, \
+	{ _XBF_RUN_QUEUES,	"RUN_QUEUES" }, \
+	{ _XBF_DELWRI_Q,	"DELWRI_Q" }, \
+	{ _XBF_PAGE_LOCKED,	"PAGE_LOCKED" }, \
+	{ _XFS_BARRIER_FAILED,	"BARRIER_FAILED" }
+
+
 typedef enum {
 	XBT_FORCE_SLEEP = 0,
 	XBT_FORCE_FLUSH = 1,
@@ -248,13 +270,6 @@ extern void xfs_buf_delwri_dequeue(xfs_b
 extern int xfs_buf_init(void);
 extern void xfs_buf_terminate(void);
 
-#ifdef XFS_BUF_TRACE
-extern ktrace_t *xfs_buf_trace_buf;
-extern void xfs_buf_trace(xfs_buf_t *, char *, void *, void *);
-#else
-#define xfs_buf_trace(bp,id,ptr,ra)	do { } while (0)
-#endif
-
 #define xfs_buf_target_name(target)	\
 	({ char __b[BDEVNAME_SIZE]; bdevname((target)->bt_bdev, __b); __b; })
 
@@ -370,10 +385,6 @@ static inline void xfs_buf_relse(xfs_buf
 
 #define xfs_bpin(bp)		xfs_buf_pin(bp)
 #define xfs_bunpin(bp)		xfs_buf_unpin(bp)
-
-#define xfs_buftrace(id, bp)	\
-	    xfs_buf_trace(bp, id, NULL, (void *)__builtin_return_address(0))
-
 #define xfs_biodone(bp)		xfs_buf_ioend(bp, 0)
 
 #define xfs_biomove(bp, off, len, data, rw) \
fs/xfs/linux-2.6/xfs_lrw.c +11 -76

146 lines not on this page · raw message

fs/xfs/linux-2.6/xfs_super.c +6 -99

160 lines not on this page · raw message

fs/xfs/quota/xfs_dquot.c +2 -55

90 lines not on this page · raw message

fs/xfs/quota/xfs_dquot.h +0 -21
Index: linux-2.6/fs/xfs/quota/xfs_dquot.h
===================================================================
@@ -85,9 +85,6 @@ typedef struct xfs_dquot {
 	struct completion q_flush;	/* flush completion queue */
 	atomic_t          q_pincount;	/* dquot pin count */
 	wait_queue_head_t q_pinwait;	/* dquot pinning wait queue */
-#ifdef XFS_DQUOT_TRACE
-	struct ktrace	*q_trace;	/* trace header structure */
-#endif
 } xfs_dquot_t;
 
 
@@ -144,24 +141,6 @@ static inline void xfs_dqfunlock(xfs_dqu
 				     (XFS_IS_UQUOTA_ON((d)->q_mount)) : \
 				     (XFS_IS_OQUOTA_ON((d)->q_mount))))
 
-#ifdef XFS_DQUOT_TRACE
-/*
- * Dquot Tracing stuff.
- */
-#define DQUOT_TRACE_SIZE	64
-#define DQUOT_KTRACE_ENTRY	1
-
-extern void		__xfs_dqtrace_entry(xfs_dquot_t *dqp, char *func,
-					    void *, xfs_inode_t *);
-#define xfs_dqtrace_entry_ino(a,b,ip) \
-		__xfs_dqtrace_entry((a), (b), (void*)__return_address, (ip))
-#define xfs_dqtrace_entry(a,b) \
-		__xfs_dqtrace_entry((a), (b), (void*)__return_address, NULL)
-#else
-#define xfs_dqtrace_entry(a,b)
-#define xfs_dqtrace_entry_ino(a,b,ip)
-#endif
-
 #ifdef QUOTADEBUG
 extern void		xfs_qm_dqprint(xfs_dquot_t *);
 #else
fs/xfs/support/ktrace.c deleted +0 -323

323 lines not on this page · raw message

fs/xfs/support/ktrace.h deleted +0 -85

85 lines not on this page · raw message

fs/xfs/xfs_alloc.h +10 -8
Index: linux-2.6/fs/xfs/xfs_alloc.h
===================================================================
@@ -37,6 +37,15 @@ typedef enum xfs_alloctype
 	XFS_ALLOCTYPE_THIS_BNO		/* at exactly this block */
 } xfs_alloctype_t;
 
+#define XFS_ALLOC_TYPES \
+	{ XFS_ALLOCTYPE_ANY_AG,		"ANY_AG" }, \
+	{ XFS_ALLOCTYPE_FIRST_AG,	"FIRST_AG" }, \
+	{ XFS_ALLOCTYPE_START_AG,	"START_AG" }, \
+	{ XFS_ALLOCTYPE_THIS_AG,	"THIS_AG" }, \
+	{ XFS_ALLOCTYPE_START_BNO,	"START_BNO" }, \
+	{ XFS_ALLOCTYPE_NEAR_BNO,	"NEAR_BNO" }, \
+	{ XFS_ALLOCTYPE_THIS_BNO,	"THIS_BNO" }
+
 /*
  * Flags for xfs_alloc_fix_freelist.
  */
@@ -109,13 +118,6 @@ xfs_alloc_longest_free_extent(struct xfs
 
 #ifdef __KERNEL__
 
-#if defined(XFS_ALLOC_TRACE)
-/*
- * Allocation tracing buffer size.
- */
-#define	XFS_ALLOC_TRACE_SIZE	4096
-extern ktrace_t *xfs_alloc_trace_buf;
-
 /*
  * Types for alloc tracing.
  */
@@ -125,7 +127,7 @@ extern ktrace_t *xfs_alloc_trace_buf;
 #define	XFS_ALLOC_KTRACE_BUSY	4
 #define	XFS_ALLOC_KTRACE_UNBUSY	5
 #define	XFS_ALLOC_KTRACE_BUSYSEARCH	6
-#endif
+
 
 void
 xfs_alloc_mark_busy(xfs_trans_t *tp,
fs/xfs/xfs_attr.c +16 -51

107 lines not on this page · raw message

fs/xfs/xfs_attr_sf.h +4 -18
Index: linux-2.6/fs/xfs/xfs_attr_sf.h
===================================================================
@@ -25,6 +25,10 @@
  * to fit into the literal area of the inode.
  */
 
+struct xfs_attr_list_context;
+struct xfs_da_intnode;
+struct xfs_da_node_entry;
+struct xfs_attr_leafblock;
 struct xfs_inode;
 
 /*
@@ -69,17 +73,9 @@ typedef struct xfs_attr_sf_sort {
 	(be16_to_cpu(((xfs_attr_shortform_t *)	\
 		((dp)->i_afp->if_u1.if_data))->hdr.totsize))
 
-#if defined(XFS_ATTR_TRACE)
 /*
  * Kernel tracing support for attribute lists
  */
-struct xfs_attr_list_context;
-struct xfs_da_intnode;
-struct xfs_da_node_entry;
-struct xfs_attr_leafblock;
-
-#define	XFS_ATTR_TRACE_SIZE	4096	/* size of global trace buffer */
-extern ktrace_t	*xfs_attr_trace_buf;
 
 /*
  * Trace record types.
@@ -96,15 +92,5 @@ void xfs_attr_trace_l_cb(char *where, st
 			      struct xfs_da_node_entry *btree);
 void xfs_attr_trace_l_cl(char *where, struct xfs_attr_list_context *context,
 			      struct xfs_attr_leafblock *leaf);
-void xfs_attr_trace_enter(int type, char *where,
-			     struct xfs_attr_list_context *context,
-			     __psunsigned_t a13, __psunsigned_t a14,
-			     __psunsigned_t a15);
-#else
-#define	xfs_attr_trace_l_c(w,c)
-#define	xfs_attr_trace_l_cn(w,c,n)
-#define	xfs_attr_trace_l_cb(w,c,b)
-#define	xfs_attr_trace_l_cl(w,c,l)
-#endif /* XFS_ATTR_TRACE */
 
 #endif	/* __XFS_ATTR_SF_H__ */
fs/xfs/xfs_bmap.c +52 -264

371 lines not on this page · raw message

fs/xfs/xfs_bmap.h +25 -9
Index: linux-2.6/fs/xfs/xfs_bmap.h
===================================================================
@@ -95,6 +95,21 @@ typedef	struct xfs_bmap_free
 					/* need write cache flushing and no */
 					/* additional allocation alignments */
 
+#define XFS_BMAPI_FLAGS \
+	{ XFS_BMAPI_WRITE,	"WRITE" }, \
+	{ XFS_BMAPI_DELAY,	"DELAY" }, \
+	{ XFS_BMAPI_ENTIRE,	"ENTIRE" }, \
+	{ XFS_BMAPI_METADATA,	"METADATA" }, \
+	{ XFS_BMAPI_EXACT,	"EXACT" }, \
+	{ XFS_BMAPI_ATTRFORK,	"ATTRFORK" }, \
+	{ XFS_BMAPI_ASYNC,	"ASYNC" }, \
+	{ XFS_BMAPI_RSVBLOCKS,	"RSVBLOCKS" }, \
+	{ XFS_BMAPI_PREALLOC,	"PREALLOC" }, \
+	{ XFS_BMAPI_IGSTATE,	"IGSTATE" }, \
+	{ XFS_BMAPI_CONTIG,	"CONTIG" }, \
+	{ XFS_BMAPI_CONVERT,	"CONVERT" }
+
+
 static inline int xfs_bmapi_aflag(int w)
 {
 	return (w == XFS_ATTR_FORK ? XFS_BMAPI_ATTRFORK : 0);
@@ -135,7 +150,6 @@ typedef struct xfs_bmalloca {
 	char			conv;	/* overwriting unwritten extents */
 } xfs_bmalloca_t;
 
-#if defined(__KERNEL__) && defined(XFS_BMAP_TRACE)
 /*
  * Trace operations for bmap extent tracing
  */
@@ -144,13 +158,18 @@ typedef struct xfs_bmalloca {
 #define	XFS_BMAP_KTRACE_PRE_UP	3
 #define	XFS_BMAP_KTRACE_POST_UP	4
 
-#define	XFS_BMAP_TRACE_SIZE	4096	/* size of global trace buffer */
-#define	XFS_BMAP_KTRACE_SIZE	32	/* size of per-inode trace buffer */
-extern ktrace_t	*xfs_bmap_trace_buf;
+#define XFS_BMAP_KTRACE_TYPES \
+	{ XFS_BMAP_KTRACE_DELETE,	"delete" }, \
+	{ XFS_BMAP_KTRACE_INSERT,	"insert" }, \
+	{ XFS_BMAP_KTRACE_PRE_UP,	"pre" }, \
+	{ XFS_BMAP_KTRACE_POST_UP,	"post"}
 
 /*
  * Add bmap trace insert entries for all the contents of the extent list.
+ *
+ * Quite excessive tracing.  Only do this for debug builds.
  */
+#if defined(__KERNEL) && defined(DEBUG)
 void
 xfs_bmap_trace_exlist(
 	const char		*fname,		/* function name */
@@ -159,12 +178,9 @@ xfs_bmap_trace_exlist(
 	int			whichfork);	/* data or attr fork */
 #define	XFS_BMAP_TRACE_EXLIST(ip,c,w)	\
 	xfs_bmap_trace_exlist(__func__,ip,c,w)
-
-#else	/* __KERNEL__ && XFS_BMAP_TRACE */
-
+#else
 #define	XFS_BMAP_TRACE_EXLIST(ip,c,w)
-
-#endif	/* __KERNEL__ && XFS_BMAP_TRACE */
+#endif
 
 /*
  * Convert inode from non-attributed to attributed.
fs/xfs/xfs_bmap_btree.c +0 -6
Index: linux-2.6/fs/xfs/xfs_bmap_btree.c
===================================================================
@@ -779,12 +779,6 @@ xfs_bmbt_trace_enter(
 		(void *)a0, (void *)a1, (void *)a2, (void *)a3,
 		(void *)a4, (void *)a5, (void *)a6, (void *)a7,
 		(void *)a8, (void *)a9, (void *)a10);
-	ktrace_enter(ip->i_btrace,
-		(void *)((__psint_t)type | (whichfork << 8) | (line << 16)),
-		(void *)func, (void *)s, (void *)ip, (void *)cur,
-		(void *)a0, (void *)a1, (void *)a2, (void *)a3,
-		(void *)a4, (void *)a5, (void *)a6, (void *)a7,
-		(void *)a8, (void *)a9, (void *)a10);
 }
 
 STATIC void
fs/xfs/xfs_buf_item.c +9 -47

137 lines not on this page · raw message

fs/xfs/xfs_buf_item.h +8 -12
Index: linux-2.6/fs/xfs/xfs_buf_item.h
===================================================================
@@ -70,22 +70,21 @@ typedef struct xfs_buf_log_format_t {
 #define	XFS_BLI_INODE_ALLOC_BUF	0x10
 #define XFS_BLI_STALE_INODE	0x20
 
+#define XFS_BLI_FLAGS \
+	{ XFS_BLI_HOLD,		"HOLD" }, \
+	{ XFS_BLI_DIRTY,	"DIRTY" }, \
+	{ XFS_BLI_STALE,	"STALE" }, \
+	{ XFS_BLI_LOGGED,	"LOGGED" }, \
+	{ XFS_BLI_INODE_ALLOC_BUF, "INODE_ALLOC" }, \
+	{ XFS_BLI_STALE_INODE,	"STALE_INODE" }
+
 
 #ifdef __KERNEL__
 
 struct xfs_buf;
-struct ktrace;
 struct xfs_mount;
 struct xfs_buf_log_item;
 
-#if defined(XFS_BLI_TRACE)
-#define	XFS_BLI_TRACE_SIZE	32
-
-void	xfs_buf_item_trace(char *, struct xfs_buf_log_item *);
-#else
-#define	xfs_buf_item_trace(id, bip)
-#endif
-
 /*
  * This is the in core log item structure used to track information
  * needed to log buffers.  It tracks how many times the lock has been
@@ -97,9 +96,6 @@ typedef struct xfs_buf_log_item {
 	unsigned int		bli_flags;	/* misc flags */
 	unsigned int		bli_recur;	/* lock recursion count */
 	atomic_t		bli_refcount;	/* cnt of tp refs */
-#ifdef XFS_BLI_TRACE
-	struct ktrace		*bli_trace;	/* event trace buf */
-#endif
 #ifdef XFS_TRANS_DEBUG
 	char			*bli_orig;	/* original buffer copy */
 	char			*bli_logged;	/* bytes logged (bitmap) */
fs/xfs/xfs_dir2_trace.c deleted +0 -216

216 lines not on this page · raw message

fs/xfs/xfs_dir2_trace.h deleted +0 -72

72 lines not on this page · raw message

fs/xfs/xfs_filestream.c +2 -6
Index: linux-2.6/fs/xfs/xfs_filestream.c
===================================================================
@@ -34,6 +34,7 @@
 #include "xfs_utils.h"
 #include "xfs_mru_cache.h"
 #include "xfs_filestream.h"
+#include "xfs_trace.h"
 
 #ifdef XFS_FILESTREAMS_TRACE
 
@@ -394,9 +395,7 @@ xfs_filestream_init(void)
 	item_zone = kmem_zone_init(sizeof(fstrm_item_t), "fstrm_item");
 	if (!item_zone)
 		return -ENOMEM;
-#ifdef XFS_FILESTREAMS_TRACE
-	xfs_filestreams_trace_buf = ktrace_alloc(XFS_FSTRM_KTRACE_SIZE, KM_NOFS);
-#endif
+
 	return 0;
 }
 
@@ -407,9 +406,6 @@ xfs_filestream_init(void)
 void
 xfs_filestream_uninit(void)
 {
-#ifdef XFS_FILESTREAMS_TRACE
-	ktrace_free(xfs_filestreams_trace_buf);
-#endif
 	kmem_zone_destroy(item_zone);
 }
 
fs/xfs/xfs_iget.c +9 -95

168 lines not on this page · raw message

fs/xfs/xfs_inode.c +5 -58

102 lines not on this page · raw message

fs/xfs/xfs_inode.h +19 -52

125 lines not on this page · raw message

fs/xfs/xfs_iomap.c +11 -77

143 lines not on this page · raw message

fs/xfs/xfs_log.c +3 -89

25 lines not on this page · raw message

fs/xfs/xfs_log_priv.h +0 -14
Index: linux-2.6/fs/xfs/xfs_log_priv.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_trace.h new file +1035 -0

1,035 lines not on this page · raw message

fs/xfs/xfs.h +0 -16
Index: linux-2.6/fs/xfs/xfs.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/quota/xfs_qm.c +3 -1
Index: linux-2.6/fs/xfs/quota/xfs_qm.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/quota/xfs_qm_syscalls.c +1 -0
Index: linux-2.6/fs/xfs/quota/xfs_qm_syscalls.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_btree.c +3 -2
Index: linux-2.6/fs/xfs/xfs_btree.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_da_btree.c +2 -1
Index: linux-2.6/fs/xfs/xfs_da_btree.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_inode_item.c +2 -1
Index: linux-2.6/fs/xfs/xfs_inode_item.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_rw.c +1 -2
Index: linux-2.6/fs/xfs/xfs_rw.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_trans_buf.c +12 -11
Index: linux-2.6/fs/xfs/xfs_trans_buf.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_super.h +0 -7
Index: linux-2.6/fs/xfs/linux-2.6/xfs_super.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_ioctl.c +1 -0
Index: linux-2.6/fs/xfs/linux-2.6/xfs_ioctl.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_iops.c +1 -0
Index: linux-2.6/fs/xfs/linux-2.6/xfs_iops.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_dfrag.c +1 -1
Index: linux-2.6/fs/xfs/xfs_dfrag.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_dir2.c +5 -3
Index: linux-2.6/fs/xfs/xfs_dir2.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_log_recover.c +1 -0
Index: linux-2.6/fs/xfs/xfs_log_recover.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_mount.c +2 -0
Index: linux-2.6/fs/xfs/xfs_mount.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_rename.c +1 -0
Index: linux-2.6/fs/xfs/xfs_rename.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_rtalloc.c +1 -0
Index: linux-2.6/fs/xfs/xfs_rtalloc.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_vnodeops.c +1 -1
Index: linux-2.6/fs/xfs/xfs_vnodeops.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_btree_trace.h +0 -17
Index: linux-2.6/fs/xfs/xfs_btree_trace.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_lrw.h +0 -45

45 lines not on this page · raw message

fs/xfs/linux-2.6/xfs_vnode.h +5 -0
Index: linux-2.6/fs/xfs/linux-2.6/xfs_vnode.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_attr.h +10 -0
Index: linux-2.6/fs/xfs/xfs_attr.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_iomap.h +8 -0
Index: linux-2.6/fs/xfs/xfs_iomap.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_quota.h +8 -0
Index: linux-2.6/fs/xfs/xfs_quota.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_trans.h +48 -0

48 lines not on this page · raw message

fs/xfs/xfs_error.c +16 -0
Index: linux-2.6/fs/xfs/xfs_error.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_fs_subr.c +3 -0
Index: linux-2.6/fs/xfs/linux-2.6/xfs_fs_subr.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_ag.h +14 -0
Index: linux-2.6/fs/xfs/xfs_ag.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_alloc.c +45 -184

229 lines not on this page · raw message

fs/xfs/xfs_alloc_btree.c +3 -0
Index: linux-2.6/fs/xfs/xfs_alloc_btree.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_fsops.c +3 -0
Index: linux-2.6/fs/xfs/xfs_fsops.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_da_btree.h +7 -0
Index: linux-2.6/fs/xfs/xfs_da_btree.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_dir2_block.c +13 -7
Index: linux-2.6/fs/xfs/xfs_dir2_block.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_dir2_leaf.c +14 -7
Index: linux-2.6/fs/xfs/xfs_dir2_leaf.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_dir2_node.c +17 -10
Index: linux-2.6/fs/xfs/xfs_dir2_node.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_dir2_sf.c +17 -9
Index: linux-2.6/fs/xfs/xfs_dir2_sf.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_btree_trace.c +0 -22
Index: linux-2.6/fs/xfs/xfs_btree_trace.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_acl.c +1 -0
Index: linux-2.6/fs/xfs/linux-2.6/xfs_acl.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_linux.h +0 -1
Index: linux-2.6/fs/xfs/linux-2.6/xfs_linux.h
===================================================================

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Part of the diff is not shown here. View the raw message.

#1 lore raw
Quoted 7 lines · Christoph Hellwig

Convert the old xfs tracing support that could only be used with the out of tree kdb and xfsidbg patches to use the generic event tracer.

To use it make sure CONFIG_EVENT_TRACING is enabled and then enable all xfs trace channels by:

echo 1 > /sys/kernel/debug/tracing/events/xfs/enable

Does event tracing work on ia64 platform?
I spent some time on it over weekend, but was not able even to force "CONFIG_EVENT_TRACING=y" setting in the .config. Seems to build ok on x86_64, which does have CONFIG_TRACING in defconfig, and allows to set CONFIG_EVENT_TRACING.

If tracing is not available on all platforms, especially on ia64, which is one of preferred platforms at SGI, we need to preserve the original XFS tracing facilities. I know, it'll be PIA to keep both tracing methods, but we can't drop the working feature without good replacement.

Hope, though, that I missed something on ia64, and it's fixable.

Felix

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#2 lore raw
Quoted 11 lines · Felix Blyakher
Quoted 5 lines

To use it make sure CONFIG_EVENT_TRACING is enabled and then enable all
xfs trace channels by:

echo 1 > /sys/kernel/debug/tracing/events/xfs/enable

Does event tracing work on ia64 platform?
I spent some time on it over weekend, but was not able even to force "CONFIG_EVENT_TRACING=y" setting in the .config. Seems to build ok on x86_64, which does have CONFIG_TRACING in defconfig, and allows to set CONFIG_EVENT_TRACING.

IA64 ftrace support was added earlier this year, but it seems it can't be enabled anymore since the big config option reshuffle. Now tracing support requires the architecture to define the TRACE_IRQFLAGS_SUPPORT and STACKTRACE_SUPPORT symbols, which seems to be missing on ia64.

Quoted 5 lines

If tracing is not available on all platforms, especially on ia64, which is one of preferred platforms at SGI, we need to preserve the original XFS tracing facilities. I know, it'll be PIA to keep both tracing methods, but we can't drop the working feature without good replacement.

It's not working at all in mainline and never had. And for about a year thaere hasn't been any tree around that actuall supports it..

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#3 lore raw
Quoted 13 lines · Christoph Hellwig
Quoted 11 lines · Felix Blyakher
Quoted 5 lines

To use it make sure CONFIG_EVENT_TRACING is enabled and then enable all
xfs trace channels by:

echo 1 > /sys/kernel/debug/tracing/events/xfs/enable

Does event tracing work on ia64 platform?
I spent some time on it over weekend, but was not able even to force "CONFIG_EVENT_TRACING=y" setting in the .config. Seems to build ok on x86_64, which does have CONFIG_TRACING in defconfig, and allows to set CONFIG_EVENT_TRACING.

Quoted 4 lines

IA64 ftrace support was added earlier this year, but it seems it can't be enabled anymore since the big config option reshuffle. Now tracing support requires the architecture to define the TRACE_IRQFLAGS_SUPPORT and STACKTRACE_SUPPORT symbols, which seems to be missing on ia64.

That's what I found.
What would it take to add ftrace support on IA64?

Quoted 8 lines
Quoted 5 lines

If tracing is not available on all platforms, especially on ia64, which is one of preferred platforms at SGI, we need to preserve the original XFS tracing facilities. I know, it'll be PIA to keep both tracing methods, but we can't drop the working feature without good replacement.

It's not working at all in mainline and never had. And for about a year thaere hasn't been any tree around that actuall supports it..

True. But with simple patch (basically restoring xfsidbg.c) and adding kdb support I was using xfs trace successfully. I know, it doesn't help much if it's not in the mainline, but it's real working code. Btw, that helped me recently identify the deadlock in xfs_growfs (xfs qa test 104). I'll post those to the xfs list or bugzilla shortly.

I hope tracing support for ia64 could be added, and this issue won't be a showstopper.

Thanks,
Felix

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#4 lore raw
In reply to Christoph Hellwig
Quoted 12 lines · Christoph Hellwig
Quoted 10 lines · Felix Blyakher
Quoted 5 lines

To use it make sure CONFIG_EVENT_TRACING is enabled and then enable all
xfs trace channels by:

echo 1 > /sys/kernel/debug/tracing/events/xfs/enable

Does event tracing work on ia64 platform?
I spent some time on it over weekend, but was not able even to force "CONFIG_EVENT_TRACING=y" setting in the .config. Seems to build ok on x86_64, which does have CONFIG_TRACING in defconfig, and allows to set CONFIG_EVENT_TRACING.

Quoted 4 lines

IA64 ftrace support was added earlier this year, but it seems it can't be enabled anymore since the big config option reshuffle. Now tracing support requires the architecture to define the TRACE_IRQFLAGS_SUPPORT and STACKTRACE_SUPPORT symbols, which seems to be missing on ia64.

Where are we at with this one, I'd like to get this in for XFS but I agree w/ Felix that throwing out a "working" trace infrastructure w/ nothing to replace it on ia64 would not be great.

Is this just config confusion, or is the functionality actually missing on ia64?

Thanks,
-Eric

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#5 lore raw

Added Ingo as well.

Quoted 18 lines · Eric Sandeen
Quoted 12 lines · Christoph Hellwig
Quoted 10 lines · Felix Blyakher
Quoted 5 lines

To use it make sure CONFIG_EVENT_TRACING is enabled and then enable all
xfs trace channels by:

echo 1 > /sys/kernel/debug/tracing/events/xfs/enable

Does event tracing work on ia64 platform?
I spent some time on it over weekend, but was not able even to force "CONFIG_EVENT_TRACING=y" setting in the .config. Seems to build ok on x86_64, which does have CONFIG_TRACING in defconfig, and allows to set CONFIG_EVENT_TRACING.

Quoted 4 lines

IA64 ftrace support was added earlier this year, but it seems it can't be enabled anymore since the big config option reshuffle. Now tracing support requires the architecture to define the TRACE_IRQFLAGS_SUPPORT and STACKTRACE_SUPPORT symbols, which seems to be missing on ia64.

Quoted 6 lines

Where are we at with this one, I'd like to get this in for XFS but I agree w/ Felix that throwing out a "working" trace infrastructure w/ nothing to replace it on ia64 would not be great.

Is this just config confusion, or is the functionality actually missing on ia64?

For PPC32, we have stacktrace support but there was lots of issues with the IRQFLAGS support. Namely, issues with handling traces in assembly when interrupts are off.

Hence, we have an exception for PPC32 with the IRQFLAGS config. Is there a reason that we can't have STACKTRACE_SUPPORT for ia64? Perhaps it should be implemented? Probably not that difficult.

Then we can add an exception for ia64 too if there's a technical reason that IRQFLAGS is not supported. Otherwise, IRQFLAGS should also be ported. That way, ia64 would benefit from lockdep as well.

-- Steve

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#6 lore raw
In reply to Eric Sandeen
Quoted 3 lines · Eric Sandeen

Where are we at with this one, I'd like to get this in for XFS but I agree w/ Felix that throwing out a "working" trace infrastructure w/ nothing to replace it on ia64 would not be great.

Well, it's not actuall working in these sense of that it isn't and never has been in mainline and also is utterly bit-rotted. I have absolutely no interested in keeping a tracing implementation away from mainline that just works out of the box (not just on x86 but also on powerpc and others) just because ia64 is too slow to get modern features.

And it's not like we got any interesting amount of IA64 users, nor have does SGI who seems to be interested in IA64 do a lot of patches to XFS.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#7 lore raw

PATCH 1/1 xfs: event tracing support

In reply to Christoph Hellwig

Subject: xfs: event tracing support
From: Christoph Hellwig <[email protected]>

Convert the old xfs tracing support that could only be used with the out of tree kdb and xfsidbg patches to use the generic event tracer.

To use it make sure CONFIG_EVENT_TRACING is enabled and then enable all xfs trace channels by:

echo 1 > /sys/kernel/debug/tracing/events/xfs/enable

Alternatively you can also enable invivididual trace events in XFS or even filter on them. Take a look at Documentation/trace/events.txt for details. To reads the events do a

cat /sys/kernel/debug/tracing/trace

which will give output like this:

# tracer: nop
#
# TASK-PID CPU# TIMESTAMP FUNCTION
# | | | | |

           <...>-23195 [000] 1884167.739031: xfs_alloc_extent: dev 253:21 first agno 0 agbno 5448 minlen 1 maxlen 1 mod 0 prod 1 minleft 2 total 0 alignment 1 len 1 type NEAR_BNO otype START_BNO wasdel 0 wasfromfl 0 isfl 0 userdata 1 by trace_xfs_alloc_extent
           <...>-23195 [000] 1884167.739031: xfs_agf: dev 253:21 agno 0 flags FREEBLKS length 579819 roots b 1 c 2 levels b 1 c 1 flfirst 62 fllast 65 flcount 4 freeblks 574368 longest 531488 by xfs_alloc_ag_vextent
           <...>-23195 [000] 1884167.739031: xfs_buf_item: dev 253:21 BLOG bip 0xd6cb54a0 bp 0xf5a90bd8 flags |DIRTY|LOGGED recur 0 refcount 15 blkno 0x1 blen 0x200 bpflags |MAPPED|ASYNC|DONE|DELWRI|TRYLOCK|PAGE_CACHE|DELWRI_Q pincount 14 lockval 0 lidesc 0xeba5cb58 liflags IN_AIL
           <...>-23195 [000] 1884167.739032: xfs_alloc_busy: dev 253:21 notfound agno 0 agbno 5448 len 1 slot 0 by xfs_alloc_search_busy
           <...>-23195 [000] 1884167.739033: xfs_bmap: dev 253:21 ino 0x4349 pre xfs_bmap_add_extent_hole_real:LC df idx 15 offset1 67 block1 1675 count1 3773 flag1 0 offset2 0 block2 1675 count2 0 flag2 0
           <...>-23195 [000] 1884167.739033: xfs_bmap: dev 253:21 ino 0x4349 post xfs_bmap_add_extent_hole_real:LC df idx 15 offset1 67 block1 1675 count1 3774 flag1 0 offset2 0 block2 1675 count2 0 flag2 0
           <...>-23195 [000] 1884167.739035: xfs_buf: dev 253:21 got_lock hold 3 lock 0 val 0x0 offset 0x5f9000 size 0x1000 flags MAPPED|ASYNC|DONE|DELWRI|PAGE_CACHE|DELWRI_Q by xfs_buf_get_flags
           <...>-23195 [000] 1884167.739035: xfs_buf: dev 253:21 get hold 3 lock 0 val 0x14005 offset 0x5f9000 size 0x1000 flags MAPPED|ASYNC|DONE|DELWRI|PAGE_CACHE|DELWRI_Q by xfs_buf_read_flags

This patch converts most existing trace points in XFS
more or less fully to the event tracer. Note that the infrastructure already provides pid value (and theoretically the task name, although that's buggy currently) so we don't have to record
them ourselves. There also are a couple of places where we provide information more usefull for general tracing instead of pointers for gdb, e.g. the inode number instead of the inode pointer address.

A couple of tracers are not converted currently:

- the log grant tracing is gone. There was just one callsite left with most state changes missing, indicating severe bitrot. I don't plan to re-introduce it for now.
- the filestreams tracing is left as-is for now. It has some very funky tracers covering all kinds of special cases. If anyone cares enough about filestreams they should take a look.
- the btree tracer. Due to the different record/key types we can't handle it with the current tracing infrastructure. I'm working with Steve to get some infrastructure to get this back.

All this gives a quite massive patch of:

     67 files changed, 1563 insertions(+), 2237 deletions(-)

So while adding actual tracing support without xfsidbg we actually remove lots of lines of code.

--

Updates since v1:

- move the TRACE_SYSTEM define out of the include guard
- add a few missing xfs_trace.h inclusions that escaped quilt
- fixed a couple of format string warnings on x86-64, now also tested on x86-64.

fs/xfs/Makefile +1 -5
Index: linux-2.6/fs/xfs/Makefile
===================================================================
@@ -90,8 +90,7 @@ xfs-y				+= xfs_alloc.o \
 				   xfs_rw.o \
 				   xfs_dmops.o
 
-xfs-$(CONFIG_XFS_TRACE)		+= xfs_btree_trace.o \
-				   xfs_dir2_trace.o
+xfs-$(CONFIG_XFS_TRACE)		+= xfs_btree_trace.o
 
 # Objects in linux/
 xfs-y				+= $(addprefix $(XFS_LINUX)/, \
@@ -113,6 +112,3 @@ xfs-y				+= $(addprefix $(XFS_LINUX)/, \
 xfs-y				+= $(addprefix support/, \
 				   debug.o \
 				   uuid.o)
-
-xfs-$(CONFIG_XFS_TRACE)		+= support/ktrace.o
-
fs/xfs/linux-2.6/xfs_aops.c +5 -47

88 lines not on this page · raw message

fs/xfs/linux-2.6/xfs_buf.c +38 -73

325 lines not on this page · raw message

fs/xfs/linux-2.6/xfs_buf.h +22 -11
Index: linux-2.6/fs/xfs/linux-2.6/xfs_buf.h
===================================================================
@@ -95,6 +95,28 @@ typedef enum {
 	_XFS_BARRIER_FAILED = (1 << 23),
 } xfs_buf_flags_t;
 
+#define XFS_BUF_FLAGS \
+	{ XBF_READ,		"READ" }, \
+	{ XBF_WRITE,		"WRITE" }, \
+	{ XBF_MAPPED,		"MAPPED" }, \
+	{ XBF_ASYNC,		"ASYNC" }, \
+	{ XBF_DONE,		"DONE" }, \
+	{ XBF_DELWRI,		"DELWRI" }, \
+	{ XBF_STALE,		"STALE" }, \
+	{ XBF_FS_MANAGED,	"FS_MANAGED" }, \
+ 	{ XBF_ORDERED,		"ORDERED" }, \
+	{ XBF_READ_AHEAD,	"READ_AHEAD" }, \
+	{ XBF_LOCK,		"LOCK" },  	/* should never be set */\
+	{ XBF_TRYLOCK,		"TRYLOCK" }, 	/* ditto */\
+	{ XBF_DONT_BLOCK,	"DONT_BLOCK" },	/* ditto */\
+	{ _XBF_PAGE_CACHE,	"PAGE_CACHE" }, \
+	{ _XBF_PAGES,		"PAGES" }, \
+	{ _XBF_RUN_QUEUES,	"RUN_QUEUES" }, \
+	{ _XBF_DELWRI_Q,	"DELWRI_Q" }, \
+	{ _XBF_PAGE_LOCKED,	"PAGE_LOCKED" }, \
+	{ _XFS_BARRIER_FAILED,	"BARRIER_FAILED" }
+
+
 typedef enum {
 	XBT_FORCE_SLEEP = 0,
 	XBT_FORCE_FLUSH = 1,
@@ -248,13 +270,6 @@ extern void xfs_buf_delwri_dequeue(xfs_b
 extern int xfs_buf_init(void);
 extern void xfs_buf_terminate(void);
 
-#ifdef XFS_BUF_TRACE
-extern ktrace_t *xfs_buf_trace_buf;
-extern void xfs_buf_trace(xfs_buf_t *, char *, void *, void *);
-#else
-#define xfs_buf_trace(bp,id,ptr,ra)	do { } while (0)
-#endif
-
 #define xfs_buf_target_name(target)	\
 	({ char __b[BDEVNAME_SIZE]; bdevname((target)->bt_bdev, __b); __b; })
 
@@ -370,10 +385,6 @@ static inline void xfs_buf_relse(xfs_buf
 
 #define xfs_bpin(bp)		xfs_buf_pin(bp)
 #define xfs_bunpin(bp)		xfs_buf_unpin(bp)
-
-#define xfs_buftrace(id, bp)	\
-	    xfs_buf_trace(bp, id, NULL, (void *)__builtin_return_address(0))
-
 #define xfs_biodone(bp)		xfs_buf_ioend(bp, 0)
 
 #define xfs_biomove(bp, off, len, data, rw) \
fs/xfs/linux-2.6/xfs_lrw.c +11 -76

146 lines not on this page · raw message

fs/xfs/linux-2.6/xfs_super.c +6 -99

160 lines not on this page · raw message

fs/xfs/quota/xfs_dquot.c +2 -55

90 lines not on this page · raw message

fs/xfs/quota/xfs_dquot.h +0 -21
Index: linux-2.6/fs/xfs/quota/xfs_dquot.h
===================================================================
@@ -85,9 +85,6 @@ typedef struct xfs_dquot {
 	struct completion q_flush;	/* flush completion queue */
 	atomic_t          q_pincount;	/* dquot pin count */
 	wait_queue_head_t q_pinwait;	/* dquot pinning wait queue */
-#ifdef XFS_DQUOT_TRACE
-	struct ktrace	*q_trace;	/* trace header structure */
-#endif
 } xfs_dquot_t;
 
 
@@ -144,24 +141,6 @@ static inline void xfs_dqfunlock(xfs_dqu
 				     (XFS_IS_UQUOTA_ON((d)->q_mount)) : \
 				     (XFS_IS_OQUOTA_ON((d)->q_mount))))
 
-#ifdef XFS_DQUOT_TRACE
-/*
- * Dquot Tracing stuff.
- */
-#define DQUOT_TRACE_SIZE	64
-#define DQUOT_KTRACE_ENTRY	1
-
-extern void		__xfs_dqtrace_entry(xfs_dquot_t *dqp, char *func,
-					    void *, xfs_inode_t *);
-#define xfs_dqtrace_entry_ino(a,b,ip) \
-		__xfs_dqtrace_entry((a), (b), (void*)__return_address, (ip))
-#define xfs_dqtrace_entry(a,b) \
-		__xfs_dqtrace_entry((a), (b), (void*)__return_address, NULL)
-#else
-#define xfs_dqtrace_entry(a,b)
-#define xfs_dqtrace_entry_ino(a,b,ip)
-#endif
-
 #ifdef QUOTADEBUG
 extern void		xfs_qm_dqprint(xfs_dquot_t *);
 #else
fs/xfs/support/ktrace.c deleted +0 -323

323 lines not on this page · raw message

fs/xfs/support/ktrace.h deleted +0 -85

85 lines not on this page · raw message

fs/xfs/xfs_alloc.h +10 -8
Index: linux-2.6/fs/xfs/xfs_alloc.h
===================================================================
@@ -37,6 +37,15 @@ typedef enum xfs_alloctype
 	XFS_ALLOCTYPE_THIS_BNO		/* at exactly this block */
 } xfs_alloctype_t;
 
+#define XFS_ALLOC_TYPES \
+	{ XFS_ALLOCTYPE_ANY_AG,		"ANY_AG" }, \
+	{ XFS_ALLOCTYPE_FIRST_AG,	"FIRST_AG" }, \
+	{ XFS_ALLOCTYPE_START_AG,	"START_AG" }, \
+	{ XFS_ALLOCTYPE_THIS_AG,	"THIS_AG" }, \
+	{ XFS_ALLOCTYPE_START_BNO,	"START_BNO" }, \
+	{ XFS_ALLOCTYPE_NEAR_BNO,	"NEAR_BNO" }, \
+	{ XFS_ALLOCTYPE_THIS_BNO,	"THIS_BNO" }
+
 /*
  * Flags for xfs_alloc_fix_freelist.
  */
@@ -109,13 +118,6 @@ xfs_alloc_longest_free_extent(struct xfs
 
 #ifdef __KERNEL__
 
-#if defined(XFS_ALLOC_TRACE)
-/*
- * Allocation tracing buffer size.
- */
-#define	XFS_ALLOC_TRACE_SIZE	4096
-extern ktrace_t *xfs_alloc_trace_buf;
-
 /*
  * Types for alloc tracing.
  */
@@ -125,7 +127,7 @@ extern ktrace_t *xfs_alloc_trace_buf;
 #define	XFS_ALLOC_KTRACE_BUSY	4
 #define	XFS_ALLOC_KTRACE_UNBUSY	5
 #define	XFS_ALLOC_KTRACE_BUSYSEARCH	6
-#endif
+
 
 void
 xfs_alloc_mark_busy(xfs_trans_t *tp,
fs/xfs/xfs_attr.c +16 -51

107 lines not on this page · raw message

fs/xfs/xfs_attr_sf.h +4 -18
Index: linux-2.6/fs/xfs/xfs_attr_sf.h
===================================================================
@@ -25,6 +25,10 @@
  * to fit into the literal area of the inode.
  */
 
+struct xfs_attr_list_context;
+struct xfs_da_intnode;
+struct xfs_da_node_entry;
+struct xfs_attr_leafblock;
 struct xfs_inode;
 
 /*
@@ -69,17 +73,9 @@ typedef struct xfs_attr_sf_sort {
 	(be16_to_cpu(((xfs_attr_shortform_t *)	\
 		((dp)->i_afp->if_u1.if_data))->hdr.totsize))
 
-#if defined(XFS_ATTR_TRACE)
 /*
  * Kernel tracing support for attribute lists
  */
-struct xfs_attr_list_context;
-struct xfs_da_intnode;
-struct xfs_da_node_entry;
-struct xfs_attr_leafblock;
-
-#define	XFS_ATTR_TRACE_SIZE	4096	/* size of global trace buffer */
-extern ktrace_t	*xfs_attr_trace_buf;
 
 /*
  * Trace record types.
@@ -96,15 +92,5 @@ void xfs_attr_trace_l_cb(char *where, st
 			      struct xfs_da_node_entry *btree);
 void xfs_attr_trace_l_cl(char *where, struct xfs_attr_list_context *context,
 			      struct xfs_attr_leafblock *leaf);
-void xfs_attr_trace_enter(int type, char *where,
-			     struct xfs_attr_list_context *context,
-			     __psunsigned_t a13, __psunsigned_t a14,
-			     __psunsigned_t a15);
-#else
-#define	xfs_attr_trace_l_c(w,c)
-#define	xfs_attr_trace_l_cn(w,c,n)
-#define	xfs_attr_trace_l_cb(w,c,b)
-#define	xfs_attr_trace_l_cl(w,c,l)
-#endif /* XFS_ATTR_TRACE */
 
 #endif	/* __XFS_ATTR_SF_H__ */
fs/xfs/xfs_bmap.c +52 -264

371 lines not on this page · raw message

fs/xfs/xfs_bmap.h +25 -9
Index: linux-2.6/fs/xfs/xfs_bmap.h
===================================================================
@@ -95,6 +95,21 @@ typedef	struct xfs_bmap_free
 					/* need write cache flushing and no */
 					/* additional allocation alignments */
 
+#define XFS_BMAPI_FLAGS \
+	{ XFS_BMAPI_WRITE,	"WRITE" }, \
+	{ XFS_BMAPI_DELAY,	"DELAY" }, \
+	{ XFS_BMAPI_ENTIRE,	"ENTIRE" }, \
+	{ XFS_BMAPI_METADATA,	"METADATA" }, \
+	{ XFS_BMAPI_EXACT,	"EXACT" }, \
+	{ XFS_BMAPI_ATTRFORK,	"ATTRFORK" }, \
+	{ XFS_BMAPI_ASYNC,	"ASYNC" }, \
+	{ XFS_BMAPI_RSVBLOCKS,	"RSVBLOCKS" }, \
+	{ XFS_BMAPI_PREALLOC,	"PREALLOC" }, \
+	{ XFS_BMAPI_IGSTATE,	"IGSTATE" }, \
+	{ XFS_BMAPI_CONTIG,	"CONTIG" }, \
+	{ XFS_BMAPI_CONVERT,	"CONVERT" }
+
+
 static inline int xfs_bmapi_aflag(int w)
 {
 	return (w == XFS_ATTR_FORK ? XFS_BMAPI_ATTRFORK : 0);
@@ -135,7 +150,6 @@ typedef struct xfs_bmalloca {
 	char			conv;	/* overwriting unwritten extents */
 } xfs_bmalloca_t;
 
-#if defined(__KERNEL__) && defined(XFS_BMAP_TRACE)
 /*
  * Trace operations for bmap extent tracing
  */
@@ -144,13 +158,18 @@ typedef struct xfs_bmalloca {
 #define	XFS_BMAP_KTRACE_PRE_UP	3
 #define	XFS_BMAP_KTRACE_POST_UP	4
 
-#define	XFS_BMAP_TRACE_SIZE	4096	/* size of global trace buffer */
-#define	XFS_BMAP_KTRACE_SIZE	32	/* size of per-inode trace buffer */
-extern ktrace_t	*xfs_bmap_trace_buf;
+#define XFS_BMAP_KTRACE_TYPES \
+	{ XFS_BMAP_KTRACE_DELETE,	"delete" }, \
+	{ XFS_BMAP_KTRACE_INSERT,	"insert" }, \
+	{ XFS_BMAP_KTRACE_PRE_UP,	"pre" }, \
+	{ XFS_BMAP_KTRACE_POST_UP,	"post"}
 
 /*
  * Add bmap trace insert entries for all the contents of the extent list.
+ *
+ * Quite excessive tracing.  Only do this for debug builds.
  */
+#if defined(__KERNEL) && defined(DEBUG)
 void
 xfs_bmap_trace_exlist(
 	const char		*fname,		/* function name */
@@ -159,12 +178,9 @@ xfs_bmap_trace_exlist(
 	int			whichfork);	/* data or attr fork */
 #define	XFS_BMAP_TRACE_EXLIST(ip,c,w)	\
 	xfs_bmap_trace_exlist(__func__,ip,c,w)
-
-#else	/* __KERNEL__ && XFS_BMAP_TRACE */
-
+#else
 #define	XFS_BMAP_TRACE_EXLIST(ip,c,w)
-
-#endif	/* __KERNEL__ && XFS_BMAP_TRACE */
+#endif
 
 /*
  * Convert inode from non-attributed to attributed.
fs/xfs/xfs_bmap_btree.c +0 -6
Index: linux-2.6/fs/xfs/xfs_bmap_btree.c
===================================================================
@@ -779,12 +779,6 @@ xfs_bmbt_trace_enter(
 		(void *)a0, (void *)a1, (void *)a2, (void *)a3,
 		(void *)a4, (void *)a5, (void *)a6, (void *)a7,
 		(void *)a8, (void *)a9, (void *)a10);
-	ktrace_enter(ip->i_btrace,
-		(void *)((__psint_t)type | (whichfork << 8) | (line << 16)),
-		(void *)func, (void *)s, (void *)ip, (void *)cur,
-		(void *)a0, (void *)a1, (void *)a2, (void *)a3,
-		(void *)a4, (void *)a5, (void *)a6, (void *)a7,
-		(void *)a8, (void *)a9, (void *)a10);
 }
 
 STATIC void
fs/xfs/xfs_buf_item.c +9 -47

137 lines not on this page · raw message

fs/xfs/xfs_buf_item.h +8 -12
Index: linux-2.6/fs/xfs/xfs_buf_item.h
===================================================================
@@ -70,22 +70,21 @@ typedef struct xfs_buf_log_format_t {
 #define	XFS_BLI_INODE_ALLOC_BUF	0x10
 #define XFS_BLI_STALE_INODE	0x20
 
+#define XFS_BLI_FLAGS \
+	{ XFS_BLI_HOLD,		"HOLD" }, \
+	{ XFS_BLI_DIRTY,	"DIRTY" }, \
+	{ XFS_BLI_STALE,	"STALE" }, \
+	{ XFS_BLI_LOGGED,	"LOGGED" }, \
+	{ XFS_BLI_INODE_ALLOC_BUF, "INODE_ALLOC" }, \
+	{ XFS_BLI_STALE_INODE,	"STALE_INODE" }
+
 
 #ifdef __KERNEL__
 
 struct xfs_buf;
-struct ktrace;
 struct xfs_mount;
 struct xfs_buf_log_item;
 
-#if defined(XFS_BLI_TRACE)
-#define	XFS_BLI_TRACE_SIZE	32
-
-void	xfs_buf_item_trace(char *, struct xfs_buf_log_item *);
-#else
-#define	xfs_buf_item_trace(id, bip)
-#endif
-
 /*
  * This is the in core log item structure used to track information
  * needed to log buffers.  It tracks how many times the lock has been
@@ -97,9 +96,6 @@ typedef struct xfs_buf_log_item {
 	unsigned int		bli_flags;	/* misc flags */
 	unsigned int		bli_recur;	/* lock recursion count */
 	atomic_t		bli_refcount;	/* cnt of tp refs */
-#ifdef XFS_BLI_TRACE
-	struct ktrace		*bli_trace;	/* event trace buf */
-#endif
 #ifdef XFS_TRANS_DEBUG
 	char			*bli_orig;	/* original buffer copy */
 	char			*bli_logged;	/* bytes logged (bitmap) */
fs/xfs/xfs_dir2_trace.c deleted +0 -216

216 lines not on this page · raw message

fs/xfs/xfs_dir2_trace.h deleted +0 -72

72 lines not on this page · raw message

fs/xfs/xfs_filestream.c +2 -6
Index: linux-2.6/fs/xfs/xfs_filestream.c
===================================================================
@@ -34,6 +34,7 @@
 #include "xfs_utils.h"
 #include "xfs_mru_cache.h"
 #include "xfs_filestream.h"
+#include "xfs_trace.h"
 
 #ifdef XFS_FILESTREAMS_TRACE
 
@@ -394,9 +395,7 @@ xfs_filestream_init(void)
 	item_zone = kmem_zone_init(sizeof(fstrm_item_t), "fstrm_item");
 	if (!item_zone)
 		return -ENOMEM;
-#ifdef XFS_FILESTREAMS_TRACE
-	xfs_filestreams_trace_buf = ktrace_alloc(XFS_FSTRM_KTRACE_SIZE, KM_NOFS);
-#endif
+
 	return 0;
 }
 
@@ -407,9 +406,6 @@ xfs_filestream_init(void)
 void
 xfs_filestream_uninit(void)
 {
-#ifdef XFS_FILESTREAMS_TRACE
-	ktrace_free(xfs_filestreams_trace_buf);
-#endif
 	kmem_zone_destroy(item_zone);
 }
 
fs/xfs/xfs_iget.c +9 -95

168 lines not on this page · raw message

fs/xfs/xfs_inode.c +5 -58

102 lines not on this page · raw message

fs/xfs/xfs_inode.h +19 -52

125 lines not on this page · raw message

fs/xfs/xfs_iomap.c +11 -77

143 lines not on this page · raw message

fs/xfs/xfs_log.c +3 -89

25 lines not on this page · raw message

fs/xfs/xfs_log_priv.h +0 -14
Index: linux-2.6/fs/xfs/xfs_log_priv.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_trace.h new file +1035 -0

1,035 lines not on this page · raw message

fs/xfs/xfs.h +0 -16
Index: linux-2.6/fs/xfs/xfs.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/quota/xfs_qm.c +3 -1
Index: linux-2.6/fs/xfs/quota/xfs_qm.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/quota/xfs_qm_syscalls.c +1 -0
Index: linux-2.6/fs/xfs/quota/xfs_qm_syscalls.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_btree.c +3 -2
Index: linux-2.6/fs/xfs/xfs_btree.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_da_btree.c +2 -1
Index: linux-2.6/fs/xfs/xfs_da_btree.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_inode_item.c +2 -1
Index: linux-2.6/fs/xfs/xfs_inode_item.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_rw.c +1 -2
Index: linux-2.6/fs/xfs/xfs_rw.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_trans_buf.c +12 -11
Index: linux-2.6/fs/xfs/xfs_trans_buf.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_super.h +0 -7
Index: linux-2.6/fs/xfs/linux-2.6/xfs_super.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_ioctl.c +1 -0
Index: linux-2.6/fs/xfs/linux-2.6/xfs_ioctl.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_iops.c +1 -0
Index: linux-2.6/fs/xfs/linux-2.6/xfs_iops.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_dfrag.c +1 -1
Index: linux-2.6/fs/xfs/xfs_dfrag.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_dir2.c +5 -3
Index: linux-2.6/fs/xfs/xfs_dir2.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_log_recover.c +1 -0
Index: linux-2.6/fs/xfs/xfs_log_recover.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_mount.c +2 -0
Index: linux-2.6/fs/xfs/xfs_mount.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_rename.c +1 -0
Index: linux-2.6/fs/xfs/xfs_rename.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_rtalloc.c +1 -0
Index: linux-2.6/fs/xfs/xfs_rtalloc.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_vnodeops.c +1 -1
Index: linux-2.6/fs/xfs/xfs_vnodeops.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_btree_trace.h +0 -17
Index: linux-2.6/fs/xfs/xfs_btree_trace.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_lrw.h +0 -45

45 lines not on this page · raw message

fs/xfs/linux-2.6/xfs_vnode.h +5 -0
Index: linux-2.6/fs/xfs/linux-2.6/xfs_vnode.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_attr.h +10 -0
Index: linux-2.6/fs/xfs/xfs_attr.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_iomap.h +8 -0
Index: linux-2.6/fs/xfs/xfs_iomap.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_quota.h +8 -0
Index: linux-2.6/fs/xfs/xfs_quota.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_trans.h +48 -0

48 lines not on this page · raw message

fs/xfs/xfs_error.c +16 -0
Index: linux-2.6/fs/xfs/xfs_error.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_fs_subr.c +3 -0
Index: linux-2.6/fs/xfs/linux-2.6/xfs_fs_subr.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_ag.h +14 -0
Index: linux-2.6/fs/xfs/xfs_ag.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_alloc.c +45 -184

229 lines not on this page · raw message

fs/xfs/xfs_alloc_btree.c +3 -0
Index: linux-2.6/fs/xfs/xfs_alloc_btree.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_fsops.c +3 -0
Index: linux-2.6/fs/xfs/xfs_fsops.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_da_btree.h +7 -0
Index: linux-2.6/fs/xfs/xfs_da_btree.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_dir2_block.c +13 -7
Index: linux-2.6/fs/xfs/xfs_dir2_block.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_dir2_leaf.c +14 -7
Index: linux-2.6/fs/xfs/xfs_dir2_leaf.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_dir2_node.c +17 -10
Index: linux-2.6/fs/xfs/xfs_dir2_node.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_dir2_sf.c +17 -9
Index: linux-2.6/fs/xfs/xfs_dir2_sf.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_btree_trace.c +0 -22
Index: linux-2.6/fs/xfs/xfs_btree_trace.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_acl.c +1 -0
Index: linux-2.6/fs/xfs/linux-2.6/xfs_acl.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_linux.h +0 -1
Index: linux-2.6/fs/xfs/linux-2.6/xfs_linux.h
===================================================================

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Part of the diff is not shown here. View the raw message.

#8 lore raw

PATCH 1/1 xfs: event tracing support

[and now really the updated version instead of reposting the old one]

Convert the old xfs tracing support that could only be used with the out of tree kdb and xfsidbg patches to use the generic event tracer.

To use it make sure CONFIG_EVENT_TRACING is enabled and then enable all xfs trace channels by:

echo 1 > /sys/kernel/debug/tracing/events/xfs/enable

Alternatively you can also enable invivididual trace events in XFS or even filter on them. Take a look at Documentation/trace/events.txt for details. To reads the events do a

cat /sys/kernel/debug/tracing/trace

which will give output like this:

# tracer: nop
#
# TASK-PID CPU# TIMESTAMP FUNCTION
# | | | | |

           <...>-23195 [000] 1884167.739031: xfs_alloc_extent: dev 253:21 first agno 0 agbno 5448 minlen 1 maxlen 1 mod 0 prod 1 minleft 2 total 0 alignment 1 len 1 type NEAR_BNO otype START_BNO wasdel 0 wasfromfl 0 isfl 0 userdata 1 by trace_xfs_alloc_extent
           <...>-23195 [000] 1884167.739031: xfs_agf: dev 253:21 agno 0 flags FREEBLKS length 579819 roots b 1 c 2 levels b 1 c 1 flfirst 62 fllast 65 flcount 4 freeblks 574368 longest 531488 by xfs_alloc_ag_vextent
           <...>-23195 [000] 1884167.739031: xfs_buf_item: dev 253:21 BLOG bip 0xd6cb54a0 bp 0xf5a90bd8 flags |DIRTY|LOGGED recur 0 refcount 15 blkno 0x1 blen 0x200 bpflags |MAPPED|ASYNC|DONE|DELWRI|TRYLOCK|PAGE_CACHE|DELWRI_Q pincount 14 lockval 0 lidesc 0xeba5cb58 liflags IN_AIL
           <...>-23195 [000] 1884167.739032: xfs_alloc_busy: dev 253:21 notfound agno 0 agbno 5448 len 1 slot 0 by xfs_alloc_search_busy
           <...>-23195 [000] 1884167.739033: xfs_bmap: dev 253:21 ino 0x4349 pre xfs_bmap_add_extent_hole_real:LC df idx 15 offset1 67 block1 1675 count1 3773 flag1 0 offset2 0 block2 1675 count2 0 flag2 0
           <...>-23195 [000] 1884167.739033: xfs_bmap: dev 253:21 ino 0x4349 post xfs_bmap_add_extent_hole_real:LC df idx 15 offset1 67 block1 1675 count1 3774 flag1 0 offset2 0 block2 1675 count2 0 flag2 0
           <...>-23195 [000] 1884167.739035: xfs_buf: dev 253:21 got_lock hold 3 lock 0 val 0x0 offset 0x5f9000 size 0x1000 flags MAPPED|ASYNC|DONE|DELWRI|PAGE_CACHE|DELWRI_Q by xfs_buf_get_flags
           <...>-23195 [000] 1884167.739035: xfs_buf: dev 253:21 get hold 3 lock 0 val 0x14005 offset 0x5f9000 size 0x1000 flags MAPPED|ASYNC|DONE|DELWRI|PAGE_CACHE|DELWRI_Q by xfs_buf_read_flags

This patch converts most existing trace points in XFS
more or less fully to the event tracer. Note that the infrastructure already provides pid value (and theoretically the task name, although that's buggy currently) so we don't have to record
them ourselves. There also are a couple of places where we provide information more usefull for general tracing instead of pointers for gdb, e.g. the inode number instead of the inode pointer address.

A couple of tracers are not converted currently:

- the log grant tracing is gone. There was just one callsite left with most state changes missing, indicating severe bitrot. I don't plan to re-introduce it for now.
- the filestreams tracing is left as-is for now. It has some very funky tracers covering all kinds of special cases. If anyone cares enough about filestreams they should take a look.
- the btree tracer. Due to the different record/key types we can't handle it with the current tracing infrastructure. I'm working with Steve to get some infrastructure to get this back.

All this gives a quite massive patch of:

     67 files changed, 1563 insertions(+), 2237 deletions(-)

So while adding actual tracing support without xfsidbg we actually remove lots of lines of code.

I'd love to get this out and into 2.6.31 still if possible so that we can have a tracing option out there in the field ASAP.

--

Updates since v1:

- move the TRACE_SYSTEM define out of the include guard
- add a few missing xfs_trace.h inclusions that escaped quilt
- fixed a couple of format string warnings on x86-64, now also tested on x86-64.

fs/xfs/Makefile +1 -5
Index: linux-2.6/fs/xfs/Makefile
===================================================================
@@ -90,8 +90,7 @@ xfs-y				+= xfs_alloc.o \
 				   xfs_rw.o \
 				   xfs_dmops.o
 
-xfs-$(CONFIG_XFS_TRACE)		+= xfs_btree_trace.o \
-				   xfs_dir2_trace.o
+xfs-$(CONFIG_XFS_TRACE)		+= xfs_btree_trace.o
 
 # Objects in linux/
 xfs-y				+= $(addprefix $(XFS_LINUX)/, \
@@ -113,6 +112,3 @@ xfs-y				+= $(addprefix $(XFS_LINUX)/, \
 xfs-y				+= $(addprefix support/, \
 				   debug.o \
 				   uuid.o)
-
-xfs-$(CONFIG_XFS_TRACE)		+= support/ktrace.o
-
fs/xfs/linux-2.6/xfs_aops.c +5 -47

88 lines not on this page · raw message

fs/xfs/linux-2.6/xfs_buf.c +38 -73

325 lines not on this page · raw message

fs/xfs/linux-2.6/xfs_buf.h +22 -11
Index: linux-2.6/fs/xfs/linux-2.6/xfs_buf.h
===================================================================
@@ -95,6 +95,28 @@ typedef enum {
 	_XFS_BARRIER_FAILED = (1 << 23),
 } xfs_buf_flags_t;
 
+#define XFS_BUF_FLAGS \
+	{ XBF_READ,		"READ" }, \
+	{ XBF_WRITE,		"WRITE" }, \
+	{ XBF_MAPPED,		"MAPPED" }, \
+	{ XBF_ASYNC,		"ASYNC" }, \
+	{ XBF_DONE,		"DONE" }, \
+	{ XBF_DELWRI,		"DELWRI" }, \
+	{ XBF_STALE,		"STALE" }, \
+	{ XBF_FS_MANAGED,	"FS_MANAGED" }, \
+ 	{ XBF_ORDERED,		"ORDERED" }, \
+	{ XBF_READ_AHEAD,	"READ_AHEAD" }, \
+	{ XBF_LOCK,		"LOCK" },  	/* should never be set */\
+	{ XBF_TRYLOCK,		"TRYLOCK" }, 	/* ditto */\
+	{ XBF_DONT_BLOCK,	"DONT_BLOCK" },	/* ditto */\
+	{ _XBF_PAGE_CACHE,	"PAGE_CACHE" }, \
+	{ _XBF_PAGES,		"PAGES" }, \
+	{ _XBF_RUN_QUEUES,	"RUN_QUEUES" }, \
+	{ _XBF_DELWRI_Q,	"DELWRI_Q" }, \
+	{ _XBF_PAGE_LOCKED,	"PAGE_LOCKED" }, \
+	{ _XFS_BARRIER_FAILED,	"BARRIER_FAILED" }
+
+
 typedef enum {
 	XBT_FORCE_SLEEP = 0,
 	XBT_FORCE_FLUSH = 1,
@@ -248,13 +270,6 @@ extern void xfs_buf_delwri_dequeue(xfs_b
 extern int xfs_buf_init(void);
 extern void xfs_buf_terminate(void);
 
-#ifdef XFS_BUF_TRACE
-extern ktrace_t *xfs_buf_trace_buf;
-extern void xfs_buf_trace(xfs_buf_t *, char *, void *, void *);
-#else
-#define xfs_buf_trace(bp,id,ptr,ra)	do { } while (0)
-#endif
-
 #define xfs_buf_target_name(target)	\
 	({ char __b[BDEVNAME_SIZE]; bdevname((target)->bt_bdev, __b); __b; })
 
@@ -370,10 +385,6 @@ static inline void xfs_buf_relse(xfs_buf
 
 #define xfs_bpin(bp)		xfs_buf_pin(bp)
 #define xfs_bunpin(bp)		xfs_buf_unpin(bp)
-
-#define xfs_buftrace(id, bp)	\
-	    xfs_buf_trace(bp, id, NULL, (void *)__builtin_return_address(0))
-
 #define xfs_biodone(bp)		xfs_buf_ioend(bp, 0)
 
 #define xfs_biomove(bp, off, len, data, rw) \
fs/xfs/linux-2.6/xfs_lrw.c +11 -76

146 lines not on this page · raw message

fs/xfs/linux-2.6/xfs_super.c +6 -99

160 lines not on this page · raw message

fs/xfs/quota/xfs_dquot.c +2 -55

90 lines not on this page · raw message

fs/xfs/quota/xfs_dquot.h +0 -21
Index: linux-2.6/fs/xfs/quota/xfs_dquot.h
===================================================================
@@ -85,9 +85,6 @@ typedef struct xfs_dquot {
 	struct completion q_flush;	/* flush completion queue */
 	atomic_t          q_pincount;	/* dquot pin count */
 	wait_queue_head_t q_pinwait;	/* dquot pinning wait queue */
-#ifdef XFS_DQUOT_TRACE
-	struct ktrace	*q_trace;	/* trace header structure */
-#endif
 } xfs_dquot_t;
 
 
@@ -144,24 +141,6 @@ static inline void xfs_dqfunlock(xfs_dqu
 				     (XFS_IS_UQUOTA_ON((d)->q_mount)) : \
 				     (XFS_IS_OQUOTA_ON((d)->q_mount))))
 
-#ifdef XFS_DQUOT_TRACE
-/*
- * Dquot Tracing stuff.
- */
-#define DQUOT_TRACE_SIZE	64
-#define DQUOT_KTRACE_ENTRY	1
-
-extern void		__xfs_dqtrace_entry(xfs_dquot_t *dqp, char *func,
-					    void *, xfs_inode_t *);
-#define xfs_dqtrace_entry_ino(a,b,ip) \
-		__xfs_dqtrace_entry((a), (b), (void*)__return_address, (ip))
-#define xfs_dqtrace_entry(a,b) \
-		__xfs_dqtrace_entry((a), (b), (void*)__return_address, NULL)
-#else
-#define xfs_dqtrace_entry(a,b)
-#define xfs_dqtrace_entry_ino(a,b,ip)
-#endif
-
 #ifdef QUOTADEBUG
 extern void		xfs_qm_dqprint(xfs_dquot_t *);
 #else
fs/xfs/support/ktrace.c deleted +0 -323

323 lines not on this page · raw message

fs/xfs/support/ktrace.h deleted +0 -85

85 lines not on this page · raw message

fs/xfs/xfs_alloc.h +10 -8
Index: linux-2.6/fs/xfs/xfs_alloc.h
===================================================================
@@ -37,6 +37,15 @@ typedef enum xfs_alloctype
 	XFS_ALLOCTYPE_THIS_BNO		/* at exactly this block */
 } xfs_alloctype_t;
 
+#define XFS_ALLOC_TYPES \
+	{ XFS_ALLOCTYPE_ANY_AG,		"ANY_AG" }, \
+	{ XFS_ALLOCTYPE_FIRST_AG,	"FIRST_AG" }, \
+	{ XFS_ALLOCTYPE_START_AG,	"START_AG" }, \
+	{ XFS_ALLOCTYPE_THIS_AG,	"THIS_AG" }, \
+	{ XFS_ALLOCTYPE_START_BNO,	"START_BNO" }, \
+	{ XFS_ALLOCTYPE_NEAR_BNO,	"NEAR_BNO" }, \
+	{ XFS_ALLOCTYPE_THIS_BNO,	"THIS_BNO" }
+
 /*
  * Flags for xfs_alloc_fix_freelist.
  */
@@ -109,13 +118,6 @@ xfs_alloc_longest_free_extent(struct xfs
 
 #ifdef __KERNEL__
 
-#if defined(XFS_ALLOC_TRACE)
-/*
- * Allocation tracing buffer size.
- */
-#define	XFS_ALLOC_TRACE_SIZE	4096
-extern ktrace_t *xfs_alloc_trace_buf;
-
 /*
  * Types for alloc tracing.
  */
@@ -125,7 +127,7 @@ extern ktrace_t *xfs_alloc_trace_buf;
 #define	XFS_ALLOC_KTRACE_BUSY	4
 #define	XFS_ALLOC_KTRACE_UNBUSY	5
 #define	XFS_ALLOC_KTRACE_BUSYSEARCH	6
-#endif
+
 
 void
 xfs_alloc_mark_busy(xfs_trans_t *tp,
fs/xfs/xfs_attr.c +16 -51

107 lines not on this page · raw message

fs/xfs/xfs_attr_sf.h +4 -18
Index: linux-2.6/fs/xfs/xfs_attr_sf.h
===================================================================
@@ -25,6 +25,10 @@
  * to fit into the literal area of the inode.
  */
 
+struct xfs_attr_list_context;
+struct xfs_da_intnode;
+struct xfs_da_node_entry;
+struct xfs_attr_leafblock;
 struct xfs_inode;
 
 /*
@@ -69,17 +73,9 @@ typedef struct xfs_attr_sf_sort {
 	(be16_to_cpu(((xfs_attr_shortform_t *)	\
 		((dp)->i_afp->if_u1.if_data))->hdr.totsize))
 
-#if defined(XFS_ATTR_TRACE)
 /*
  * Kernel tracing support for attribute lists
  */
-struct xfs_attr_list_context;
-struct xfs_da_intnode;
-struct xfs_da_node_entry;
-struct xfs_attr_leafblock;
-
-#define	XFS_ATTR_TRACE_SIZE	4096	/* size of global trace buffer */
-extern ktrace_t	*xfs_attr_trace_buf;
 
 /*
  * Trace record types.
@@ -96,15 +92,5 @@ void xfs_attr_trace_l_cb(char *where, st
 			      struct xfs_da_node_entry *btree);
 void xfs_attr_trace_l_cl(char *where, struct xfs_attr_list_context *context,
 			      struct xfs_attr_leafblock *leaf);
-void xfs_attr_trace_enter(int type, char *where,
-			     struct xfs_attr_list_context *context,
-			     __psunsigned_t a13, __psunsigned_t a14,
-			     __psunsigned_t a15);
-#else
-#define	xfs_attr_trace_l_c(w,c)
-#define	xfs_attr_trace_l_cn(w,c,n)
-#define	xfs_attr_trace_l_cb(w,c,b)
-#define	xfs_attr_trace_l_cl(w,c,l)
-#endif /* XFS_ATTR_TRACE */
 
 #endif	/* __XFS_ATTR_SF_H__ */
fs/xfs/xfs_bmap.c +52 -264

371 lines not on this page · raw message

fs/xfs/xfs_bmap.h +25 -9
Index: linux-2.6/fs/xfs/xfs_bmap.h
===================================================================
@@ -95,6 +95,21 @@ typedef	struct xfs_bmap_free
 					/* need write cache flushing and no */
 					/* additional allocation alignments */
 
+#define XFS_BMAPI_FLAGS \
+	{ XFS_BMAPI_WRITE,	"WRITE" }, \
+	{ XFS_BMAPI_DELAY,	"DELAY" }, \
+	{ XFS_BMAPI_ENTIRE,	"ENTIRE" }, \
+	{ XFS_BMAPI_METADATA,	"METADATA" }, \
+	{ XFS_BMAPI_EXACT,	"EXACT" }, \
+	{ XFS_BMAPI_ATTRFORK,	"ATTRFORK" }, \
+	{ XFS_BMAPI_ASYNC,	"ASYNC" }, \
+	{ XFS_BMAPI_RSVBLOCKS,	"RSVBLOCKS" }, \
+	{ XFS_BMAPI_PREALLOC,	"PREALLOC" }, \
+	{ XFS_BMAPI_IGSTATE,	"IGSTATE" }, \
+	{ XFS_BMAPI_CONTIG,	"CONTIG" }, \
+	{ XFS_BMAPI_CONVERT,	"CONVERT" }
+
+
 static inline int xfs_bmapi_aflag(int w)
 {
 	return (w == XFS_ATTR_FORK ? XFS_BMAPI_ATTRFORK : 0);
@@ -135,7 +150,6 @@ typedef struct xfs_bmalloca {
 	char			conv;	/* overwriting unwritten extents */
 } xfs_bmalloca_t;
 
-#if defined(__KERNEL__) && defined(XFS_BMAP_TRACE)
 /*
  * Trace operations for bmap extent tracing
  */
@@ -144,13 +158,18 @@ typedef struct xfs_bmalloca {
 #define	XFS_BMAP_KTRACE_PRE_UP	3
 #define	XFS_BMAP_KTRACE_POST_UP	4
 
-#define	XFS_BMAP_TRACE_SIZE	4096	/* size of global trace buffer */
-#define	XFS_BMAP_KTRACE_SIZE	32	/* size of per-inode trace buffer */
-extern ktrace_t	*xfs_bmap_trace_buf;
+#define XFS_BMAP_KTRACE_TYPES \
+	{ XFS_BMAP_KTRACE_DELETE,	"delete" }, \
+	{ XFS_BMAP_KTRACE_INSERT,	"insert" }, \
+	{ XFS_BMAP_KTRACE_PRE_UP,	"pre" }, \
+	{ XFS_BMAP_KTRACE_POST_UP,	"post"}
 
 /*
  * Add bmap trace insert entries for all the contents of the extent list.
+ *
+ * Quite excessive tracing.  Only do this for debug builds.
  */
+#if defined(__KERNEL) && defined(DEBUG)
 void
 xfs_bmap_trace_exlist(
 	const char		*fname,		/* function name */
@@ -159,12 +178,9 @@ xfs_bmap_trace_exlist(
 	int			whichfork);	/* data or attr fork */
 #define	XFS_BMAP_TRACE_EXLIST(ip,c,w)	\
 	xfs_bmap_trace_exlist(__func__,ip,c,w)
-
-#else	/* __KERNEL__ && XFS_BMAP_TRACE */
-
+#else
 #define	XFS_BMAP_TRACE_EXLIST(ip,c,w)
-
-#endif	/* __KERNEL__ && XFS_BMAP_TRACE */
+#endif
 
 /*
  * Convert inode from non-attributed to attributed.
fs/xfs/xfs_bmap_btree.c +0 -6
Index: linux-2.6/fs/xfs/xfs_bmap_btree.c
===================================================================
@@ -779,12 +779,6 @@ xfs_bmbt_trace_enter(
 		(void *)a0, (void *)a1, (void *)a2, (void *)a3,
 		(void *)a4, (void *)a5, (void *)a6, (void *)a7,
 		(void *)a8, (void *)a9, (void *)a10);
-	ktrace_enter(ip->i_btrace,
-		(void *)((__psint_t)type | (whichfork << 8) | (line << 16)),
-		(void *)func, (void *)s, (void *)ip, (void *)cur,
-		(void *)a0, (void *)a1, (void *)a2, (void *)a3,
-		(void *)a4, (void *)a5, (void *)a6, (void *)a7,
-		(void *)a8, (void *)a9, (void *)a10);
 }
 
 STATIC void
fs/xfs/xfs_buf_item.c +9 -47

137 lines not on this page · raw message

fs/xfs/xfs_buf_item.h +8 -12
Index: linux-2.6/fs/xfs/xfs_buf_item.h
===================================================================
@@ -70,22 +70,21 @@ typedef struct xfs_buf_log_format_t {
 #define	XFS_BLI_INODE_ALLOC_BUF	0x10
 #define XFS_BLI_STALE_INODE	0x20
 
+#define XFS_BLI_FLAGS \
+	{ XFS_BLI_HOLD,		"HOLD" }, \
+	{ XFS_BLI_DIRTY,	"DIRTY" }, \
+	{ XFS_BLI_STALE,	"STALE" }, \
+	{ XFS_BLI_LOGGED,	"LOGGED" }, \
+	{ XFS_BLI_INODE_ALLOC_BUF, "INODE_ALLOC" }, \
+	{ XFS_BLI_STALE_INODE,	"STALE_INODE" }
+
 
 #ifdef __KERNEL__
 
 struct xfs_buf;
-struct ktrace;
 struct xfs_mount;
 struct xfs_buf_log_item;
 
-#if defined(XFS_BLI_TRACE)
-#define	XFS_BLI_TRACE_SIZE	32
-
-void	xfs_buf_item_trace(char *, struct xfs_buf_log_item *);
-#else
-#define	xfs_buf_item_trace(id, bip)
-#endif
-
 /*
  * This is the in core log item structure used to track information
  * needed to log buffers.  It tracks how many times the lock has been
@@ -97,9 +96,6 @@ typedef struct xfs_buf_log_item {
 	unsigned int		bli_flags;	/* misc flags */
 	unsigned int		bli_recur;	/* lock recursion count */
 	atomic_t		bli_refcount;	/* cnt of tp refs */
-#ifdef XFS_BLI_TRACE
-	struct ktrace		*bli_trace;	/* event trace buf */
-#endif
 #ifdef XFS_TRANS_DEBUG
 	char			*bli_orig;	/* original buffer copy */
 	char			*bli_logged;	/* bytes logged (bitmap) */
fs/xfs/xfs_dir2_trace.c deleted +0 -216

216 lines not on this page · raw message

fs/xfs/xfs_dir2_trace.h deleted +0 -72

72 lines not on this page · raw message

fs/xfs/xfs_filestream.c +2 -6
Index: linux-2.6/fs/xfs/xfs_filestream.c
===================================================================
@@ -34,6 +34,7 @@
 #include "xfs_utils.h"
 #include "xfs_mru_cache.h"
 #include "xfs_filestream.h"
+#include "xfs_trace.h"
 
 #ifdef XFS_FILESTREAMS_TRACE
 
@@ -394,9 +395,7 @@ xfs_filestream_init(void)
 	item_zone = kmem_zone_init(sizeof(fstrm_item_t), "fstrm_item");
 	if (!item_zone)
 		return -ENOMEM;
-#ifdef XFS_FILESTREAMS_TRACE
-	xfs_filestreams_trace_buf = ktrace_alloc(XFS_FSTRM_KTRACE_SIZE, KM_NOFS);
-#endif
+
 	return 0;
 }
 
@@ -407,9 +406,6 @@ xfs_filestream_init(void)
 void
 xfs_filestream_uninit(void)
 {
-#ifdef XFS_FILESTREAMS_TRACE
-	ktrace_free(xfs_filestreams_trace_buf);
-#endif
 	kmem_zone_destroy(item_zone);
 }
 
fs/xfs/xfs_iget.c +9 -95

168 lines not on this page · raw message

fs/xfs/xfs_inode.c +5 -58

102 lines not on this page · raw message

fs/xfs/xfs_inode.h +19 -52

125 lines not on this page · raw message

fs/xfs/xfs_iomap.c +11 -77

143 lines not on this page · raw message

fs/xfs/xfs_log.c +3 -89

25 lines not on this page · raw message

fs/xfs/xfs_log_priv.h +0 -14
Index: linux-2.6/fs/xfs/xfs_log_priv.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_trace.h new file +1035 -0

1,035 lines not on this page · raw message

fs/xfs/xfs.h +0 -16
Index: linux-2.6/fs/xfs/xfs.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/quota/xfs_qm.c +3 -1
Index: linux-2.6/fs/xfs/quota/xfs_qm.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/quota/xfs_qm_syscalls.c +1 -0
Index: linux-2.6/fs/xfs/quota/xfs_qm_syscalls.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_btree.c +3 -2
Index: linux-2.6/fs/xfs/xfs_btree.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_da_btree.c +2 -1
Index: linux-2.6/fs/xfs/xfs_da_btree.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_inode_item.c +2 -1
Index: linux-2.6/fs/xfs/xfs_inode_item.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_rw.c +1 -2
Index: linux-2.6/fs/xfs/xfs_rw.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_trans_buf.c +12 -11
Index: linux-2.6/fs/xfs/xfs_trans_buf.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_super.h +0 -7
Index: linux-2.6/fs/xfs/linux-2.6/xfs_super.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_ioctl.c +1 -0
Index: linux-2.6/fs/xfs/linux-2.6/xfs_ioctl.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_iops.c +1 -0
Index: linux-2.6/fs/xfs/linux-2.6/xfs_iops.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_dfrag.c +1 -1
Index: linux-2.6/fs/xfs/xfs_dfrag.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_dir2.c +5 -3
Index: linux-2.6/fs/xfs/xfs_dir2.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_log_recover.c +1 -0
Index: linux-2.6/fs/xfs/xfs_log_recover.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_mount.c +2 -0
Index: linux-2.6/fs/xfs/xfs_mount.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_rename.c +1 -0
Index: linux-2.6/fs/xfs/xfs_rename.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_rtalloc.c +1 -0
Index: linux-2.6/fs/xfs/xfs_rtalloc.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_vnodeops.c +1 -1
Index: linux-2.6/fs/xfs/xfs_vnodeops.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_btree_trace.h +0 -17
Index: linux-2.6/fs/xfs/xfs_btree_trace.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_lrw.h +0 -45

45 lines not on this page · raw message

fs/xfs/linux-2.6/xfs_vnode.h +5 -0
Index: linux-2.6/fs/xfs/linux-2.6/xfs_vnode.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_attr.h +10 -0
Index: linux-2.6/fs/xfs/xfs_attr.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_iomap.h +8 -0
Index: linux-2.6/fs/xfs/xfs_iomap.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_quota.h +8 -0
Index: linux-2.6/fs/xfs/xfs_quota.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_trans.h +48 -0

48 lines not on this page · raw message

fs/xfs/xfs_error.c +16 -0
Index: linux-2.6/fs/xfs/xfs_error.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_fs_subr.c +3 -0
Index: linux-2.6/fs/xfs/linux-2.6/xfs_fs_subr.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_ag.h +14 -0
Index: linux-2.6/fs/xfs/xfs_ag.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_alloc.c +45 -184

229 lines not on this page · raw message

fs/xfs/xfs_alloc_btree.c +3 -0
Index: linux-2.6/fs/xfs/xfs_alloc_btree.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_fsops.c +3 -0
Index: linux-2.6/fs/xfs/xfs_fsops.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_da_btree.h +7 -0
Index: linux-2.6/fs/xfs/xfs_da_btree.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_dir2_block.c +13 -7
Index: linux-2.6/fs/xfs/xfs_dir2_block.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_dir2_leaf.c +14 -7
Index: linux-2.6/fs/xfs/xfs_dir2_leaf.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_dir2_node.c +17 -10
Index: linux-2.6/fs/xfs/xfs_dir2_node.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_dir2_sf.c +17 -9
Index: linux-2.6/fs/xfs/xfs_dir2_sf.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_btree_trace.c +0 -22
Index: linux-2.6/fs/xfs/xfs_btree_trace.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_acl.c +1 -0
Index: linux-2.6/fs/xfs/linux-2.6/xfs_acl.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_linux.h +0 -1
Index: linux-2.6/fs/xfs/linux-2.6/xfs_linux.h
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_ioctl32.c +1 -0
Index: linux-2.6/fs/xfs/linux-2.6/xfs_ioctl32.c
===================================================================

Lines of this file are not shown. View the raw message.

fs/xfs/linux-2.6/xfs_sync.c +1 -0
Index: linux-2.6/fs/xfs/linux-2.6/xfs_sync.c
===================================================================

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Part of the diff is not shown here. View the raw message.

#9 lore raw

minor whitespace fixups for ya on top of that patch:

fs/xfs/linux-2.6/xfs_buf.h +1 -1
Index: linux-2.6.30.1/fs/xfs/linux-2.6/xfs_buf.h
===================================================================
@@ -104,7 +104,7 @@ typedef enum {
 	{ XBF_DELWRI,		"DELWRI" }, \
 	{ XBF_STALE,		"STALE" }, \
 	{ XBF_FS_MANAGED,	"FS_MANAGED" }, \
- 	{ XBF_ORDERED,		"ORDERED" }, \
+	{ XBF_ORDERED,		"ORDERED" }, \
 	{ XBF_READ_AHEAD,	"READ_AHEAD" }, \
 	{ XBF_LOCK,		"LOCK" },  	/* should never be set */\
 	{ XBF_TRYLOCK,		"TRYLOCK" }, 	/* ditto */\
fs/xfs/linux-2.6/xfs_lrw.c +1 -1
Index: linux-2.6.30.1/fs/xfs/linux-2.6/xfs_lrw.c
===================================================================
@@ -667,7 +667,7 @@ start:
 			need_i_mutex = 0;
 		}
 
- 		trace_xfs_rw(xip, count, *offset, ioflags, "write");
+		trace_xfs_rw(xip, count, *offset, ioflags, "write");
 		ret = generic_file_direct_write(iocb, iovp,
 				&segs, pos, offset, count, ocount);
 
fs/xfs/linux-2.6/xfs_trace.h +4 -4
Index: linux-2.6.30.1/fs/xfs/linux-2.6/xfs_trace.h
===================================================================
@@ -107,7 +107,7 @@ TRACE_EVENT(xfs_attr_list,
 		   __entry->count,
 		   __entry->firstu,
 		   __entry->flags,
-	 	   __print_flags(__entry->flags, "|", XFS_ATTR_FLAGS)
+		   __print_flags(__entry->flags, "|", XFS_ATTR_FLAGS)
 		   /* we currently miss out on the per-type a13/14/15 here */
 	)
 );
@@ -219,7 +219,7 @@ TRACE_EVENT(xfs_buf,
 		  __entry->hold,
 		  __entry->lockval,
 		  __entry->val,
-                  (unsigned long long)__entry->file_offset,
+		  (unsigned long long)__entry->file_offset,
 		  __entry->buffer_length,
 		  __print_flags(__entry->flags, "|", XFS_BUF_FLAGS),
 		  (void *)__entry->caller_ip)
@@ -891,8 +891,8 @@ TRACE_EVENT(xfs_free_extent,
 		  __entry->len,
 		  __entry->isfl,
 		  __entry->haveleft ?
-		  	(__entry->haveright ? "both" : "left") :
-			 (__entry->haveright ? "right" : "none"))
+			(__entry->haveright ? "both" : "left") :
+			(__entry->haveright ? "right" : "none"))
 
 );
 
fs/xfs/xfs_trans.h +4 -4
Index: linux-2.6.30.1/fs/xfs/xfs_trans.h
===================================================================
@@ -138,11 +138,11 @@ typedef struct xfs_trans_header {
 	{ XFS_TRANS_GROWFSRT_ALLOC,	"GROWFSRT_ALLOC" }, \
 	{ XFS_TRANS_GROWFSRT_ZERO,	"GROWFSRT_ZERO" }, \
 	{ XFS_TRANS_GROWFSRT_FREE,	"GROWFSRT_FREE" }, \
-  	{ XFS_TRANS_SWAPEXT,		"SWAPEXT" }, \
+	{ XFS_TRANS_SWAPEXT,		"SWAPEXT" }, \
 	{ XFS_TRANS_SB_COUNT,		"SB_COUNT" }, \
- 	{ XFS_TRANS_DUMMY1,		"DUMMY1" }, \
- 	{ XFS_TRANS_DUMMY2,		"DUMMY2" }, \
- 	{ XLOG_UNMOUNT_REC_TYPE,	"UNMOUNT" }
+	{ XFS_TRANS_DUMMY1,		"DUMMY1" }, \
+	{ XFS_TRANS_DUMMY2,		"DUMMY2" }, \
+	{ XLOG_UNMOUNT_REC_TYPE,	"UNMOUNT" }
 
 /*
  * This structure is used to track log items associated with

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs