Skip to contentSkip to conversation

clean up vnode^winode tracing

PATCH Superseded Eric Sandeen 3 participants 5 messages Aug 26, 2007 – Aug 28, 2007 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clean up vnode^winode tracing

Simplify vnode tracing calls by embedding function name & return addr in the calling macro.

Also do a lot of vnode->inode renaming for consistency, while we're at it.

fs/xfs/linux-2.6/xfs_aops.c +1 -2
Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c
===================================================================
@@ -1525,8 +1525,7 @@ xfs_vm_bmap(
 	struct inode		*inode = (struct inode *)mapping->host;
 	struct xfs_inode	*ip = XFS_I(inode);
 
-	vn_trace_entry(XFS_I(inode), __FUNCTION__,
-			(inst_t *)__return_address);
+	ip_trace_entry(XFS_I(inode));
 	xfs_rwlock(ip, VRWLOCK_READ);
 	xfs_flush_pages(ip, (xfs_off_t)0, -1, 0, FI_REMAPF);
 	xfs_rwunlock(ip, VRWLOCK_READ);
fs/xfs/linux-2.6/xfs_ioctl.c +1 -2
Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c
===================================================================
@@ -733,8 +733,7 @@ xfs_ioctl(
 	xfs_mount_t		*mp = ip->i_mount;
 	int			error;
 
-	vn_trace_entry(XFS_I(inode), "xfs_ioctl", (inst_t *)__return_address);
-
+	ip_trace_entry(XFS_I(inode));
 	switch (cmd) {
 
 	case XFS_IOC_ALLOCSP:
fs/xfs/linux-2.6/xfs_ksyms.c +6 -6
Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ksyms.c
===================================================================
@@ -83,12 +83,12 @@ EXPORT_SYMBOL(ktrace_first);
 EXPORT_SYMBOL(ktrace_next);
 #endif
 
-#ifdef XFS_VNODE_TRACE
-EXPORT_SYMBOL(vn_trace_ref);
-EXPORT_SYMBOL(vn_trace_entry);
-EXPORT_SYMBOL(vn_trace_exit);
-EXPORT_SYMBOL(vn_trace_hold);
-EXPORT_SYMBOL(vn_trace_rele);
+#ifdef XFS_INODE_TRACE
+EXPORT_SYMBOL(_ip_trace_ref);
+EXPORT_SYMBOL(_ip_trace_entry);
+EXPORT_SYMBOL(_ip_trace_exit);
+EXPORT_SYMBOL(ip_trace_hold);
+EXPORT_SYMBOL(ip_trace_rele);
 #endif
 
 #ifdef XFS_ILOCK_TRACE
fs/xfs/linux-2.6/xfs_super.c +3 -6
Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c
===================================================================
@@ -403,8 +403,7 @@ xfs_fs_write_inode(
 {
 	int			error = 0, flags = FLUSH_INODE;
 
-	vn_trace_entry(XFS_I(inode), __FUNCTION__,
-			(inst_t *)__return_address);
+	ip_trace_entry(XFS_I(inode));
 	if (sync)
 		flags |= FLUSH_SYNC;
 	error = xfs_inode_flush(XFS_I(inode), flags);
@@ -430,8 +429,7 @@ xfs_fs_clear_inode(
 	 * find an inode with di_mode == 0 but without IGET_CREATE set.
 	 */
 	if (ip) {
-		vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address);
-
+		ip_trace_entry(ip);
 		XFS_STATS_INC(vn_rele);
 		XFS_STATS_INC(vn_remove);
 		XFS_STATS_INC(vn_reclaim);
@@ -820,8 +818,7 @@ xfs_fs_fill_super(
 		goto fail_vnrele;
 	}
 
-	vn_trace_exit(XFS_I(sb->s_root->d_inode), __FUNCTION__,
-			(inst_t *)__return_address);
+	ip_trace_exit(XFS_I(sb->s_root->d_inode));
 
 	kmem_free(args, sizeof(*args));
 	return 0;
fs/xfs/linux-2.6/xfs_vnode.c +13 -13
Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c
===================================================================
@@ -143,7 +143,7 @@ __vn_revalidate(
 {
 	int		error;
 
-	vn_trace_entry(xfs_vtoi(vp), __FUNCTION__, (inst_t *)__return_address);
+	ip_trace_entry(xfs_vtoi(vp));
 	vattr->va_mask = XFS_AT_STAT | XFS_AT_XFLAGS;
 	error = xfs_getattr(xfs_vtoi(vp), vattr, 0);
 	if (likely(!error)) {
@@ -179,7 +179,7 @@ vn_hold(
 	return vp;
 }
 
-#ifdef	XFS_VNODE_TRACE
+#ifdef	XFS_INODE_TRACE
 
 /*
  * Reference count of Linux inode if present, -1 if the xfs_inode
@@ -211,32 +211,32 @@ static inline int xfs_icount(struct xfs_
  * Vnode tracing code.
  */
 void
-vn_trace_entry(xfs_inode_t *ip, const char *func, inst_t *ra)
+_ip_trace_entry(xfs_inode_t *ip, const char *func, inst_t *ra)
 {
-	KTRACE_ENTER(ip, VNODE_KTRACE_ENTRY, func, 0, ra);
+	KTRACE_ENTER(ip, INODE_KTRACE_ENTRY, func, 0, ra);
 }
 
 void
-vn_trace_exit(xfs_inode_t *ip, const char *func, inst_t *ra)
+_ip_trace_exit(xfs_inode_t *ip, const char *func, inst_t *ra)
 {
-	KTRACE_ENTER(ip, VNODE_KTRACE_EXIT, func, 0, ra);
+	KTRACE_ENTER(ip, INODE_KTRACE_EXIT, func, 0, ra);
 }
 
 void
-vn_trace_hold(xfs_inode_t *ip, char *file, int line, inst_t *ra)
+ip_trace_hold(xfs_inode_t *ip, char *file, int line, inst_t *ra)
 {
-	KTRACE_ENTER(ip, VNODE_KTRACE_HOLD, file, line, ra);
+	KTRACE_ENTER(ip, INODE_KTRACE_HOLD, file, line, ra);
 }
 
 void
-vn_trace_ref(xfs_inode_t *ip, char *file, int line, inst_t *ra)
+_ip_trace_ref(xfs_inode_t *ip, char *file, int line, inst_t *ra)
 {
-	KTRACE_ENTER(ip, VNODE_KTRACE_REF, file, line, ra);
+	KTRACE_ENTER(ip, INODE_KTRACE_REF, file, line, ra);
 }
 
 void
-vn_trace_rele(xfs_inode_t *ip, char *file, int line, inst_t *ra)
+ip_trace_rele(xfs_inode_t *ip, char *file, int line, inst_t *ra)
 {
-	KTRACE_ENTER(ip, VNODE_KTRACE_RELE, file, line, ra);
+	KTRACE_ENTER(ip, INODE_KTRACE_RELE, file, line, ra);
 }
-#endif	/* XFS_VNODE_TRACE */
+#endif	/* XFS_INODE_TRACE */
fs/xfs/linux-2.6/xfs_vnode.h +28 -21

66 lines not on this page · raw message

fs/xfs/xfs_dir2.c +1 -1
Index: linux-2.6-xfs/fs/xfs/xfs_dir2.c
===================================================================
@@ -301,7 +301,7 @@ xfs_readdir(
 	int		rval;		/* return value */
 	int		v;		/* type-checking value */
 
-	vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address);
+	ip_trace_entry(dp);
 
 	if (XFS_FORCED_SHUTDOWN(dp->i_mount))
 		return XFS_ERROR(EIO);
fs/xfs/xfs_iget.c +5 -5
Index: linux-2.6-xfs/fs/xfs/xfs_iget.c
===================================================================
@@ -157,7 +157,7 @@ again:
 				goto again;
 			}
 
-			vn_trace_exit(ip, "xfs_iget.alloc",
+			_ip_trace_exit(ip, "xfs_iget.alloc",
 				(inst_t *)__return_address);
 
 			XFS_STATS_INC(xs_ig_found);
@@ -212,7 +212,7 @@ finish_inode:
 			xfs_ilock(ip, lock_flags);
 
 		xfs_iflags_clear(ip, XFS_ISTALE);
-		vn_trace_exit(ip, "xfs_iget.found",
+		_ip_trace_exit(ip, "xfs_iget.found",
 					(inst_t *)__return_address);
 		goto return_ip;
 	}
@@ -234,7 +234,7 @@ finish_inode:
 		return error;
 	}
 
-	vn_trace_exit(ip, "xfs_iget.alloc", (inst_t *)__return_address);
+	_ip_trace_exit(ip, "xfs_iget.alloc", (inst_t *)__return_address);
 
 	xfs_inode_lock_init(ip, vp);
 	xfs_iocore_inode_init(ip);
@@ -467,7 +467,7 @@ xfs_iput(xfs_inode_t	*ip,
 {
 	bhv_vnode_t	*vp = XFS_ITOV(ip);
 
-	vn_trace_entry(ip, "xfs_iput", (inst_t *)__return_address);
+	ip_trace_entry(ip);
 	xfs_iunlock(ip, lock_flags);
 	VN_RELE(vp);
 }
@@ -482,7 +482,7 @@ xfs_iput_new(xfs_inode_t	*ip,
 	bhv_vnode_t	*vp = XFS_ITOV(ip);
 	struct inode	*inode = vn_to_inode(vp);
 
-	vn_trace_entry(ip, "xfs_iput_new", (inst_t *)__return_address);
+	ip_trace_entry(ip);
 
 	if ((ip->i_d.di_mode == 0)) {
 		ASSERT(!xfs_iflags_test(ip, XFS_IRECLAIMABLE));
fs/xfs/xfs_inode.c +3 -3
Index: linux-2.6-xfs/fs/xfs/xfs_inode.c
===================================================================
@@ -884,8 +884,8 @@ xfs_iread(
 	 * Initialize inode's trace buffers.
 	 * Do this before xfs_iformat in case it adds entries.
 	 */
-#ifdef	XFS_VNODE_TRACE
-	ip->i_trace = ktrace_alloc(VNODE_TRACE_SIZE, KM_SLEEP);
+#ifdef	XFS_INODE_TRACE
+	ip->i_trace = ktrace_alloc(INODE_TRACE_SIZE, KM_SLEEP);
 #endif
 #ifdef XFS_BMAP_TRACE
 	ip->i_xtrace = ktrace_alloc(XFS_BMAP_KTRACE_SIZE, KM_SLEEP);
@@ -2733,7 +2733,7 @@ xfs_idestroy(
 	mrfree(&ip->i_iolock);
 	freesema(&ip->i_flock);
 
-#ifdef XFS_VNODE_TRACE
+#ifdef XFS_INODE_TRACE
 	ktrace_free(ip->i_trace);
 #endif
 #ifdef XFS_BMAP_TRACE
fs/xfs/xfs_rename.c +4 -4
Index: linux-2.6-xfs/fs/xfs/xfs_rename.c
===================================================================
@@ -118,7 +118,7 @@ xfs_lock_for_rename(
 	inum1 = ip1->i_ino;
 
 	ASSERT(ip1);
-	ITRACE(ip1);
+	ip_trace_ref(ip1);
 
 	/*
 	 * Unlock dp1 and lock dp2 if they are different.
@@ -141,7 +141,7 @@ xfs_lock_for_rename(
 		IRELE (ip1);
 		return error;
 	} else {
-		ITRACE(ip2);
+		ip_trace_ref(ip2);
 	}
 
 	/*
@@ -247,8 +247,8 @@ xfs_rename(
 	int		src_namelen = VNAMELEN(src_vname);
 	int		target_namelen = VNAMELEN(target_vname);
 
-	vn_trace_entry(src_dp, "xfs_rename", (inst_t *)__return_address);
-	vn_trace_entry(xfs_vtoi(target_dir_vp), "xfs_rename", (inst_t *)__return_address);
+	ip_trace_entry(src_dp);
+	ip_trace_entry(xfs_vtoi(target_dir_vp));
 
 	/*
 	 * Find the XFS behavior descriptor for the target directory
fs/xfs/xfs_utils.c +1 -1
Index: linux-2.6-xfs/fs/xfs/xfs_utils.c
===================================================================
@@ -73,7 +73,7 @@ xfs_dir_lookup_int(
 {
 	int		error;
 
-	vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address);
+	ip_trace_entry(dp);
 
 	error = xfs_dir_lookup(NULL, dp, VNAME(dentry), VNAMELEN(dentry), inum);
 	if (!error) {
fs/xfs/xfs_utils.h +0 -2
Index: linux-2.6-xfs/fs/xfs/xfs_utils.h
===================================================================
@@ -20,8 +20,6 @@
 
 #define IRELE(ip)	VN_RELE(XFS_ITOV(ip))
 #define IHOLD(ip)	VN_HOLD(XFS_ITOV(ip))
-#define	ITRACE(ip)	vn_trace_ref(ip, __FILE__, __LINE__, \
-				(inst_t *)__return_address)
 
 extern int xfs_get_dir_entry (bhv_vname_t *, xfs_inode_t **);
 extern int xfs_dir_lookup_int (xfs_inode_t *, uint, bhv_vname_t *, xfs_ino_t *,
fs/xfs/xfs_vnodeops.c +28 -32

216 lines not on this page · raw message

fs/xfs/xfs.h +1 -1
Index: linux-2.6-xfs/fs/xfs/xfs.h
===================================================================
@@ -37,7 +37,7 @@
 #define XFS_LOG_TRACE 1
 #define XFS_RW_TRACE 1
 #define XFS_BUF_TRACE 1
-#define XFS_VNODE_TRACE 1
+#define XFS_INODE_TRACE 1
 #define XFS_FILESTREAMS_TRACE 1
 #endif
 
fs/xfs/xfs_inode.h +1 -1
Index: linux-2.6-xfs/fs/xfs/xfs_inode.h
===================================================================
@@ -300,7 +300,7 @@ typedef struct xfs_inode {
 	xfs_fsize_t		i_size;		/* in-memory size */
 	atomic_t		i_iocount;	/* outstanding I/O count */
 	/* Trace buffers per inode. */
-#ifdef XFS_VNODE_TRACE
+#ifdef XFS_INODE_TRACE
 	struct ktrace		*i_trace;	/* general inode trace */
 #endif
 #ifdef XFS_BMAP_TRACE
fs/xfs/xfsidbg.c +31 -31

190 lines not on this page · raw message

#1 lore raw
Quoted 5 lines · Eric Sandeen

Simplify vnode tracing calls by embedding function name & return addr in the calling macro.

Also do a lot of vnode->inode renaming for consistency, while we're at it.

Looks good. One day we should move the implementation and declaration out of xfs_vnode.[ch], but that's fine as a separate patch.

#2 lore raw
In reply to Eric Sandeen
Quoted 13 lines · Eric Sandeen

Simplify vnode tracing calls by embedding function name & return addr in the calling macro.

Also do a lot of vnode->inode renaming for consistency, while we're at it.

Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c
===================================================================

fs/xfs/linux-2.6/xfs_aops.c xfs_vm_bmap( · line 1528

Quoted 6 lines
fs/xfs/linux-2.6/xfs_aops.c +1 -2
@@ -1525,8 +1525,7 @@ xfs_vm_bmap(
 	struct inode		*inode = (struct inode *)mapping->host;
 	struct xfs_inode	*ip = XFS_I(inode);
 
-	vn_trace_entry(XFS_I(inode), __FUNCTION__,
-			(inst_t *)__return_address);
+	ip_trace_entry(XFS_I(inode));

s/ip_trace/xfs_itrace/

Cheers,

Dave.

Signature · 3 lines
Dave Chinner
Principal Engineer
SGI Australian Software Group
#3 lore raw
Quoted 17 lines · David Chinner
Quoted 16 lines · Eric Sandeen

Simplify vnode tracing calls by embedding function name & return addr in the calling macro.

Also do a lot of vnode->inode renaming for consistency, while we're at it.

Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c
===================================================================

fs/xfs/linux-2.6/xfs_aops.c +0 -0
@@ -1525,8 +1525,7 @@ xfs_vm_bmap(
 	struct inode		*inode = (struct inode *)mapping->host;
 	struct xfs_inode	*ip = XFS_I(inode);
 
Quoted 6 lines

fs/xfs/linux-2.6/xfs_aops.c xfs_vm_bmap( · line 1528

Quoted 3 lines
fs/xfs/linux-2.6/xfs_aops.c +1 -2
-	vn_trace_entry(XFS_I(inode), __FUNCTION__,
-			(inst_t *)__return_address);
+	ip_trace_entry(XFS_I(inode));

s/ip_trace/xfs_itrace/

So xfs_itrace_entry, xfs_itrace_ref, xfs_itrace_exit etc is what you prefer?

-Eric

#4 lore raw

PATCH v2 1/1 clean up vnode^winode tracing

In reply to David Chinner

Try this on for size...

-----------------

Simplify vnode tracing calls by embedding function name & return addr in the calling macro.

Also do a lot of vnode->inode renaming for consistency, while we're at it.

fs/xfs/linux-2.6/xfs_aops.c +1 -2
Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c
===================================================================
@@ -1525,8 +1525,7 @@ xfs_vm_bmap(
 	struct inode		*inode = (struct inode *)mapping->host;
 	struct xfs_inode	*ip = XFS_I(inode);
 
-	vn_trace_entry(XFS_I(inode), __FUNCTION__,
-			(inst_t *)__return_address);
+	xfs_itrace_entry(XFS_I(inode));
 	xfs_rwlock(ip, VRWLOCK_READ);
 	xfs_flush_pages(ip, (xfs_off_t)0, -1, 0, FI_REMAPF);
 	xfs_rwunlock(ip, VRWLOCK_READ);
fs/xfs/linux-2.6/xfs_ioctl.c +1 -2
Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c
===================================================================
@@ -733,8 +733,7 @@ xfs_ioctl(
 	xfs_mount_t		*mp = ip->i_mount;
 	int			error;
 
-	vn_trace_entry(XFS_I(inode), "xfs_ioctl", (inst_t *)__return_address);
-
+	xfs_itrace_entry(XFS_I(inode));
 	switch (cmd) {
 
 	case XFS_IOC_ALLOCSP:
fs/xfs/linux-2.6/xfs_ksyms.c +6 -6
Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ksyms.c
===================================================================
@@ -83,12 +83,12 @@ EXPORT_SYMBOL(ktrace_first);
 EXPORT_SYMBOL(ktrace_next);
 #endif
 
-#ifdef XFS_VNODE_TRACE
-EXPORT_SYMBOL(vn_trace_ref);
-EXPORT_SYMBOL(vn_trace_entry);
-EXPORT_SYMBOL(vn_trace_exit);
-EXPORT_SYMBOL(vn_trace_hold);
-EXPORT_SYMBOL(vn_trace_rele);
+#ifdef XFS_INODE_TRACE
+EXPORT_SYMBOL(_xfs_itrace_ref);
+EXPORT_SYMBOL(_xfs_itrace_entry);
+EXPORT_SYMBOL(_xfs_itrace_exit);
+EXPORT_SYMBOL(xfs_itrace_hold);
+EXPORT_SYMBOL(xfs_itrace_rele);
 #endif
 
 #ifdef XFS_ILOCK_TRACE
fs/xfs/linux-2.6/xfs_super.c +3 -6
Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c
===================================================================
@@ -403,8 +403,7 @@ xfs_fs_write_inode(
 {
 	int			error = 0, flags = FLUSH_INODE;
 
-	vn_trace_entry(XFS_I(inode), __FUNCTION__,
-			(inst_t *)__return_address);
+	xfs_itrace_entry(XFS_I(inode));
 	if (sync)
 		flags |= FLUSH_SYNC;
 	error = xfs_inode_flush(XFS_I(inode), flags);
@@ -430,8 +429,7 @@ xfs_fs_clear_inode(
 	 * find an inode with di_mode == 0 but without IGET_CREATE set.
 	 */
 	if (ip) {
-		vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address);
-
+		xfs_itrace_entry(ip);
 		XFS_STATS_INC(vn_rele);
 		XFS_STATS_INC(vn_remove);
 		XFS_STATS_INC(vn_reclaim);
@@ -820,8 +818,7 @@ xfs_fs_fill_super(
 		goto fail_vnrele;
 	}
 
-	vn_trace_exit(XFS_I(sb->s_root->d_inode), __FUNCTION__,
-			(inst_t *)__return_address);
+	xfs_itrace_exit(XFS_I(sb->s_root->d_inode));
 
 	kmem_free(args, sizeof(*args));
 	return 0;
fs/xfs/linux-2.6/xfs_vnode.c +13 -13
Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c
===================================================================
@@ -143,7 +143,7 @@ __vn_revalidate(
 {
 	int		error;
 
-	vn_trace_entry(xfs_vtoi(vp), __FUNCTION__, (inst_t *)__return_address);
+	xfs_itrace_entry(xfs_vtoi(vp));
 	vattr->va_mask = XFS_AT_STAT | XFS_AT_XFLAGS;
 	error = xfs_getattr(xfs_vtoi(vp), vattr, 0);
 	if (likely(!error)) {
@@ -179,7 +179,7 @@ vn_hold(
 	return vp;
 }
 
-#ifdef	XFS_VNODE_TRACE
+#ifdef	XFS_INODE_TRACE
 
 /*
  * Reference count of Linux inode if present, -1 if the xfs_inode
@@ -211,32 +211,32 @@ static inline int xfs_icount(struct xfs_
  * Vnode tracing code.
  */
 void
-vn_trace_entry(xfs_inode_t *ip, const char *func, inst_t *ra)
+_xfs_itrace_entry(xfs_inode_t *ip, const char *func, inst_t *ra)
 {
-	KTRACE_ENTER(ip, VNODE_KTRACE_ENTRY, func, 0, ra);
+	KTRACE_ENTER(ip, INODE_KTRACE_ENTRY, func, 0, ra);
 }
 
 void
-vn_trace_exit(xfs_inode_t *ip, const char *func, inst_t *ra)
+_xfs_itrace_exit(xfs_inode_t *ip, const char *func, inst_t *ra)
 {
-	KTRACE_ENTER(ip, VNODE_KTRACE_EXIT, func, 0, ra);
+	KTRACE_ENTER(ip, INODE_KTRACE_EXIT, func, 0, ra);
 }
 
 void
-vn_trace_hold(xfs_inode_t *ip, char *file, int line, inst_t *ra)
+xfs_itrace_hold(xfs_inode_t *ip, char *file, int line, inst_t *ra)
 {
-	KTRACE_ENTER(ip, VNODE_KTRACE_HOLD, file, line, ra);
+	KTRACE_ENTER(ip, INODE_KTRACE_HOLD, file, line, ra);
 }
 
 void
-vn_trace_ref(xfs_inode_t *ip, char *file, int line, inst_t *ra)
+_xfs_itrace_ref(xfs_inode_t *ip, char *file, int line, inst_t *ra)
 {
-	KTRACE_ENTER(ip, VNODE_KTRACE_REF, file, line, ra);
+	KTRACE_ENTER(ip, INODE_KTRACE_REF, file, line, ra);
 }
 
 void
-vn_trace_rele(xfs_inode_t *ip, char *file, int line, inst_t *ra)
+xfs_itrace_rele(xfs_inode_t *ip, char *file, int line, inst_t *ra)
 {
-	KTRACE_ENTER(ip, VNODE_KTRACE_RELE, file, line, ra);
+	KTRACE_ENTER(ip, INODE_KTRACE_RELE, file, line, ra);
 }
-#endif	/* XFS_VNODE_TRACE */
+#endif	/* XFS_INODE_TRACE */
fs/xfs/linux-2.6/xfs_vnode.h +28 -21

66 lines not on this page · raw message

fs/xfs/xfs_dir2.c +1 -1
Index: linux-2.6-xfs/fs/xfs/xfs_dir2.c
===================================================================
@@ -301,7 +301,7 @@ xfs_readdir(
 	int		rval;		/* return value */
 	int		v;		/* type-checking value */
 
-	vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address);
+	xfs_itrace_entry(dp);
 
 	if (XFS_FORCED_SHUTDOWN(dp->i_mount))
 		return XFS_ERROR(EIO);
fs/xfs/xfs_iget.c +5 -5
Index: linux-2.6-xfs/fs/xfs/xfs_iget.c
===================================================================
@@ -157,7 +157,7 @@ again:
 				goto again;
 			}
 
-			vn_trace_exit(ip, "xfs_iget.alloc",
+			_xfs_itrace_exit(ip, "xfs_iget.alloc",
 				(inst_t *)__return_address);
 
 			XFS_STATS_INC(xs_ig_found);
@@ -212,7 +212,7 @@ finish_inode:
 			xfs_ilock(ip, lock_flags);
 
 		xfs_iflags_clear(ip, XFS_ISTALE);
-		vn_trace_exit(ip, "xfs_iget.found",
+		_xfs_itrace_exit(ip, "xfs_iget.found",
 					(inst_t *)__return_address);
 		goto return_ip;
 	}
@@ -234,7 +234,7 @@ finish_inode:
 		return error;
 	}
 
-	vn_trace_exit(ip, "xfs_iget.alloc", (inst_t *)__return_address);
+	_xfs_itrace_exit(ip, "xfs_iget.alloc", (inst_t *)__return_address);
 
 	xfs_inode_lock_init(ip, vp);
 	xfs_iocore_inode_init(ip);
@@ -467,7 +467,7 @@ xfs_iput(xfs_inode_t	*ip,
 {
 	bhv_vnode_t	*vp = XFS_ITOV(ip);
 
-	vn_trace_entry(ip, "xfs_iput", (inst_t *)__return_address);
+	xfs_itrace_entry(ip);
 	xfs_iunlock(ip, lock_flags);
 	VN_RELE(vp);
 }
@@ -482,7 +482,7 @@ xfs_iput_new(xfs_inode_t	*ip,
 	bhv_vnode_t	*vp = XFS_ITOV(ip);
 	struct inode	*inode = vn_to_inode(vp);
 
-	vn_trace_entry(ip, "xfs_iput_new", (inst_t *)__return_address);
+	xfs_itrace_entry(ip);
 
 	if ((ip->i_d.di_mode == 0)) {
 		ASSERT(!xfs_iflags_test(ip, XFS_IRECLAIMABLE));
fs/xfs/xfs_inode.c +3 -3
Index: linux-2.6-xfs/fs/xfs/xfs_inode.c
===================================================================
@@ -884,8 +884,8 @@ xfs_iread(
 	 * Initialize inode's trace buffers.
 	 * Do this before xfs_iformat in case it adds entries.
 	 */
-#ifdef	XFS_VNODE_TRACE
-	ip->i_trace = ktrace_alloc(VNODE_TRACE_SIZE, KM_SLEEP);
+#ifdef	XFS_INODE_TRACE
+	ip->i_trace = ktrace_alloc(INODE_TRACE_SIZE, KM_SLEEP);
 #endif
 #ifdef XFS_BMAP_TRACE
 	ip->i_xtrace = ktrace_alloc(XFS_BMAP_KTRACE_SIZE, KM_SLEEP);
@@ -2733,7 +2733,7 @@ xfs_idestroy(
 	mrfree(&ip->i_iolock);
 	freesema(&ip->i_flock);
 
-#ifdef XFS_VNODE_TRACE
+#ifdef XFS_INODE_TRACE
 	ktrace_free(ip->i_trace);
 #endif
 #ifdef XFS_BMAP_TRACE
fs/xfs/xfs_rename.c +4 -4
Index: linux-2.6-xfs/fs/xfs/xfs_rename.c
===================================================================
@@ -118,7 +118,7 @@ xfs_lock_for_rename(
 	inum1 = ip1->i_ino;
 
 	ASSERT(ip1);
-	ITRACE(ip1);
+	xfs_itrace_ref(ip1);
 
 	/*
 	 * Unlock dp1 and lock dp2 if they are different.
@@ -141,7 +141,7 @@ xfs_lock_for_rename(
 		IRELE (ip1);
 		return error;
 	} else {
-		ITRACE(ip2);
+		xfs_itrace_ref(ip2);
 	}
 
 	/*
@@ -247,8 +247,8 @@ xfs_rename(
 	int		src_namelen = VNAMELEN(src_vname);
 	int		target_namelen = VNAMELEN(target_vname);
 
-	vn_trace_entry(src_dp, "xfs_rename", (inst_t *)__return_address);
-	vn_trace_entry(xfs_vtoi(target_dir_vp), "xfs_rename", (inst_t *)__return_address);
+	xfs_itrace_entry(src_dp);
+	xfs_itrace_entry(xfs_vtoi(target_dir_vp));
 
 	/*
 	 * Find the XFS behavior descriptor for the target directory
fs/xfs/xfs_utils.c +1 -1
Index: linux-2.6-xfs/fs/xfs/xfs_utils.c
===================================================================
@@ -73,7 +73,7 @@ xfs_dir_lookup_int(
 {
 	int		error;
 
-	vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address);
+	xfs_itrace_entry(dp);
 
 	error = xfs_dir_lookup(NULL, dp, VNAME(dentry), VNAMELEN(dentry), inum);
 	if (!error) {
fs/xfs/xfs_utils.h +0 -2
Index: linux-2.6-xfs/fs/xfs/xfs_utils.h
===================================================================
@@ -20,8 +20,6 @@
 
 #define IRELE(ip)	VN_RELE(XFS_ITOV(ip))
 #define IHOLD(ip)	VN_HOLD(XFS_ITOV(ip))
-#define	ITRACE(ip)	vn_trace_ref(ip, __FILE__, __LINE__, \
-				(inst_t *)__return_address)
 
 extern int xfs_get_dir_entry (bhv_vname_t *, xfs_inode_t **);
 extern int xfs_dir_lookup_int (xfs_inode_t *, uint, bhv_vname_t *, xfs_ino_t *,
fs/xfs/xfs_vnodeops.c +28 -32

216 lines not on this page · raw message

fs/xfs/xfs.h +1 -1
Index: linux-2.6-xfs/fs/xfs/xfs.h
===================================================================
@@ -37,7 +37,7 @@
 #define XFS_LOG_TRACE 1
 #define XFS_RW_TRACE 1
 #define XFS_BUF_TRACE 1
-#define XFS_VNODE_TRACE 1
+#define XFS_INODE_TRACE 1
 #define XFS_FILESTREAMS_TRACE 1
 #endif
 
fs/xfs/xfs_inode.h +1 -1
Index: linux-2.6-xfs/fs/xfs/xfs_inode.h
===================================================================
@@ -300,7 +300,7 @@ typedef struct xfs_inode {
 	xfs_fsize_t		i_size;		/* in-memory size */
 	atomic_t		i_iocount;	/* outstanding I/O count */
 	/* Trace buffers per inode. */
-#ifdef XFS_VNODE_TRACE
+#ifdef XFS_INODE_TRACE
 	struct ktrace		*i_trace;	/* general inode trace */
 #endif
 #ifdef XFS_BMAP_TRACE
fs/xfs/xfsidbg.c +31 -31

190 lines not on this page · raw message