aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-02-07 00:42:19 -0500
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-02-07 00:42:19 -0500
commitcf441eeb79c32471379f0a4d97feaef691432a03 (patch)
tree283347fcc807a87339a8244d3a45029eac90c825 /fs
parent44866d39282d0782b15fa4cb62aad937bf0a0897 (diff)
[XFS] clean up vnode/inode 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. SGI-PV: 970335 SGI-Modid: xfs-linux-melb:xfs-kern:29650a Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/linux-2.6/xfs_aops.c3
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl.c3
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c9
-rw-r--r--fs/xfs/linux-2.6/xfs_vnode.c26
-rw-r--r--fs/xfs/linux-2.6/xfs_vnode.h51
-rw-r--r--fs/xfs/xfs.h2
-rw-r--r--fs/xfs/xfs_dir2.c2
-rw-r--r--fs/xfs/xfs_iget.c10
-rw-r--r--fs/xfs/xfs_inode.c6
-rw-r--r--fs/xfs/xfs_inode.h2
-rw-r--r--fs/xfs/xfs_rename.c8
-rw-r--r--fs/xfs/xfs_utils.c2
-rw-r--r--fs/xfs/xfs_utils.h2
-rw-r--r--fs/xfs/xfs_vnodeops.c60
14 files changed, 91 insertions, 95 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index 2e34b104107c..31269cbd5e1a 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -1525,8 +1525,7 @@ xfs_vm_bmap(
1525 struct inode *inode = (struct inode *)mapping->host; 1525 struct inode *inode = (struct inode *)mapping->host;
1526 struct xfs_inode *ip = XFS_I(inode); 1526 struct xfs_inode *ip = XFS_I(inode);
1527 1527
1528 vn_trace_entry(XFS_I(inode), __FUNCTION__, 1528 xfs_itrace_entry(XFS_I(inode));
1529 (inst_t *)__return_address);
1530 xfs_rwlock(ip, VRWLOCK_READ); 1529 xfs_rwlock(ip, VRWLOCK_READ);
1531 xfs_flush_pages(ip, (xfs_off_t)0, -1, 0, FI_REMAPF); 1530 xfs_flush_pages(ip, (xfs_off_t)0, -1, 0, FI_REMAPF);
1532 xfs_rwunlock(ip, VRWLOCK_READ); 1531 xfs_rwunlock(ip, VRWLOCK_READ);
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c
index 98a56568bb24..30bb994d2899 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl.c
@@ -739,8 +739,7 @@ xfs_ioctl(
739 xfs_mount_t *mp = ip->i_mount; 739 xfs_mount_t *mp = ip->i_mount;
740 int error; 740 int error;
741 741
742 vn_trace_entry(XFS_I(inode), "xfs_ioctl", (inst_t *)__return_address); 742 xfs_itrace_entry(XFS_I(inode));
743
744 switch (cmd) { 743 switch (cmd) {
745 744
746 case XFS_IOC_ALLOCSP: 745 case XFS_IOC_ALLOCSP:
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index 8cb63c60c048..400ed2f20717 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -410,8 +410,7 @@ xfs_fs_write_inode(
410{ 410{
411 int error = 0, flags = FLUSH_INODE; 411 int error = 0, flags = FLUSH_INODE;
412 412
413 vn_trace_entry(XFS_I(inode), __FUNCTION__, 413 xfs_itrace_entry(XFS_I(inode));
414 (inst_t *)__return_address);
415 if (sync) { 414 if (sync) {
416 filemap_fdatawait(inode->i_mapping); 415 filemap_fdatawait(inode->i_mapping);
417 flags |= FLUSH_SYNC; 416 flags |= FLUSH_SYNC;
@@ -438,8 +437,7 @@ xfs_fs_clear_inode(
438 * find an inode with di_mode == 0 but without IGET_CREATE set. 437 * find an inode with di_mode == 0 but without IGET_CREATE set.
439 */ 438 */
440 if (ip) { 439 if (ip) {
441 vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); 440 xfs_itrace_entry(ip);
442
443 XFS_STATS_INC(vn_rele); 441 XFS_STATS_INC(vn_rele);
444 XFS_STATS_INC(vn_remove); 442 XFS_STATS_INC(vn_remove);
445 XFS_STATS_INC(vn_reclaim); 443 XFS_STATS_INC(vn_reclaim);
@@ -841,8 +839,7 @@ xfs_fs_fill_super(
841 goto fail_vnrele; 839 goto fail_vnrele;
842 } 840 }
843 841
844 vn_trace_exit(XFS_I(sb->s_root->d_inode), __FUNCTION__, 842 xfs_itrace_exit(XFS_I(sb->s_root->d_inode));
845 (inst_t *)__return_address);
846 843
847 kmem_free(args, sizeof(*args)); 844 kmem_free(args, sizeof(*args));
848 return 0; 845 return 0;
diff --git a/fs/xfs/linux-2.6/xfs_vnode.c b/fs/xfs/linux-2.6/xfs_vnode.c
index 814169fd7e1e..e16b3e40015d 100644
--- a/fs/xfs/linux-2.6/xfs_vnode.c
+++ b/fs/xfs/linux-2.6/xfs_vnode.c
@@ -143,7 +143,7 @@ __vn_revalidate(
143{ 143{
144 int error; 144 int error;
145 145
146 vn_trace_entry(xfs_vtoi(vp), __FUNCTION__, (inst_t *)__return_address); 146 xfs_itrace_entry(xfs_vtoi(vp));
147 vattr->va_mask = XFS_AT_STAT | XFS_AT_XFLAGS; 147 vattr->va_mask = XFS_AT_STAT | XFS_AT_XFLAGS;
148 error = xfs_getattr(xfs_vtoi(vp), vattr, 0); 148 error = xfs_getattr(xfs_vtoi(vp), vattr, 0);
149 if (likely(!error)) { 149 if (likely(!error)) {
@@ -179,7 +179,7 @@ vn_hold(
179 return vp; 179 return vp;
180} 180}
181 181
182#ifdef XFS_VNODE_TRACE 182#ifdef XFS_INODE_TRACE
183 183
184/* 184/*
185 * Reference count of Linux inode if present, -1 if the xfs_inode 185 * Reference count of Linux inode if present, -1 if the xfs_inode
@@ -211,32 +211,32 @@ static inline int xfs_icount(struct xfs_inode *ip)
211 * Vnode tracing code. 211 * Vnode tracing code.
212 */ 212 */
213void 213void
214vn_trace_entry(xfs_inode_t *ip, const char *func, inst_t *ra) 214_xfs_itrace_entry(xfs_inode_t *ip, const char *func, inst_t *ra)
215{ 215{
216 KTRACE_ENTER(ip, VNODE_KTRACE_ENTRY, func, 0, ra); 216 KTRACE_ENTER(ip, INODE_KTRACE_ENTRY, func, 0, ra);
217} 217}
218 218
219void 219void
220vn_trace_exit(xfs_inode_t *ip, const char *func, inst_t *ra) 220_xfs_itrace_exit(xfs_inode_t *ip, const char *func, inst_t *ra)
221{ 221{
222 KTRACE_ENTER(ip, VNODE_KTRACE_EXIT, func, 0, ra); 222 KTRACE_ENTER(ip, INODE_KTRACE_EXIT, func, 0, ra);
223} 223}
224 224
225void 225void
226vn_trace_hold(xfs_inode_t *ip, char *file, int line, inst_t *ra) 226xfs_itrace_hold(xfs_inode_t *ip, char *file, int line, inst_t *ra)
227{ 227{
228 KTRACE_ENTER(ip, VNODE_KTRACE_HOLD, file, line, ra); 228 KTRACE_ENTER(ip, INODE_KTRACE_HOLD, file, line, ra);
229} 229}
230 230
231void 231void
232vn_trace_ref(xfs_inode_t *ip, char *file, int line, inst_t *ra) 232_xfs_itrace_ref(xfs_inode_t *ip, char *file, int line, inst_t *ra)
233{ 233{
234 KTRACE_ENTER(ip, VNODE_KTRACE_REF, file, line, ra); 234 KTRACE_ENTER(ip, INODE_KTRACE_REF, file, line, ra);
235} 235}
236 236
237void 237void
238vn_trace_rele(xfs_inode_t *ip, char *file, int line, inst_t *ra) 238xfs_itrace_rele(xfs_inode_t *ip, char *file, int line, inst_t *ra)
239{ 239{
240 KTRACE_ENTER(ip, VNODE_KTRACE_RELE, file, line, ra); 240 KTRACE_ENTER(ip, INODE_KTRACE_RELE, file, line, ra);
241} 241}
242#endif /* XFS_VNODE_TRACE */ 242#endif /* XFS_INODE_TRACE */
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h
index 55fb46948589..09763067da11 100644
--- a/fs/xfs/linux-2.6/xfs_vnode.h
+++ b/fs/xfs/linux-2.6/xfs_vnode.h
@@ -210,12 +210,12 @@ static inline int vn_count(bhv_vnode_t *vp)
210 */ 210 */
211extern bhv_vnode_t *vn_hold(bhv_vnode_t *); 211extern bhv_vnode_t *vn_hold(bhv_vnode_t *);
212 212
213#if defined(XFS_VNODE_TRACE) 213#if defined(XFS_INODE_TRACE)
214#define VN_HOLD(vp) \ 214#define VN_HOLD(vp) \
215 ((void)vn_hold(vp), \ 215 ((void)vn_hold(vp), \
216 vn_trace_hold(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address)) 216 xfs_itrace_hold(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address))
217#define VN_RELE(vp) \ 217#define VN_RELE(vp) \
218 (vn_trace_rele(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address), \ 218 (xfs_itrace_rele(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address), \
219 iput(vn_to_inode(vp))) 219 iput(vn_to_inode(vp)))
220#else 220#else
221#define VN_HOLD(vp) ((void)vn_hold(vp)) 221#define VN_HOLD(vp) ((void)vn_hold(vp))
@@ -296,26 +296,33 @@ static inline void vn_atime_to_time_t(bhv_vnode_t *vp, time_t *tt)
296/* 296/*
297 * Tracking vnode activity. 297 * Tracking vnode activity.
298 */ 298 */
299#if defined(XFS_VNODE_TRACE) 299#if defined(XFS_INODE_TRACE)
300 300
301#define VNODE_TRACE_SIZE 16 /* number of trace entries */ 301#define INODE_TRACE_SIZE 16 /* number of trace entries */
302#define VNODE_KTRACE_ENTRY 1 302#define INODE_KTRACE_ENTRY 1
303#define VNODE_KTRACE_EXIT 2 303#define INODE_KTRACE_EXIT 2
304#define VNODE_KTRACE_HOLD 3 304#define INODE_KTRACE_HOLD 3
305#define VNODE_KTRACE_REF 4 305#define INODE_KTRACE_REF 4
306#define VNODE_KTRACE_RELE 5 306#define INODE_KTRACE_RELE 5
307 307
308extern void vn_trace_entry(struct xfs_inode *, const char *, inst_t *); 308extern void _xfs_itrace_entry(struct xfs_inode *, const char *, inst_t *);
309extern void vn_trace_exit(struct xfs_inode *, const char *, inst_t *); 309extern void _xfs_itrace_exit(struct xfs_inode *, const char *, inst_t *);
310extern void vn_trace_hold(struct xfs_inode *, char *, int, inst_t *); 310extern void xfs_itrace_hold(struct xfs_inode *, char *, int, inst_t *);
311extern void vn_trace_ref(struct xfs_inode *, char *, int, inst_t *); 311extern void _xfs_itrace_ref(struct xfs_inode *, char *, int, inst_t *);
312extern void vn_trace_rele(struct xfs_inode *, char *, int, inst_t *); 312extern void xfs_itrace_rele(struct xfs_inode *, char *, int, inst_t *);
313#define xfs_itrace_entry(ip) \
314 _xfs_itrace_entry(ip, __FUNCTION__, (inst_t *)__return_address)
315#define xfs_itrace_exit(ip) \
316 _xfs_itrace_exit(ip, __FUNCTION__, (inst_t *)__return_address)
317#define xfs_itrace_ref(ip) \
318 _xfs_itrace_ref(ip, __FILE__, __LINE__, (inst_t *)__return_address)
319
313#else 320#else
314#define vn_trace_entry(a,b,c) 321#define xfs_itrace_entry(a)
315#define vn_trace_exit(a,b,c) 322#define xfs_itrace_exit(a)
316#define vn_trace_hold(a,b,c,d) 323#define xfs_itrace_hold(a, b, c, d)
317#define vn_trace_ref(a,b,c,d) 324#define xfs_itrace_ref(a)
318#define vn_trace_rele(a,b,c,d) 325#define xfs_itrace_rele(a, b, c, d)
319#endif 326#endif
320 327
321#endif /* __XFS_VNODE_H__ */ 328#endif /* __XFS_VNODE_H__ */
diff --git a/fs/xfs/xfs.h b/fs/xfs/xfs.h
index b5a7d92c6843..540e4c989825 100644
--- a/fs/xfs/xfs.h
+++ b/fs/xfs/xfs.h
@@ -37,7 +37,7 @@
37#define XFS_LOG_TRACE 1 37#define XFS_LOG_TRACE 1
38#define XFS_RW_TRACE 1 38#define XFS_RW_TRACE 1
39#define XFS_BUF_TRACE 1 39#define XFS_BUF_TRACE 1
40#define XFS_VNODE_TRACE 1 40#define XFS_INODE_TRACE 1
41#define XFS_FILESTREAMS_TRACE 1 41#define XFS_FILESTREAMS_TRACE 1
42#endif 42#endif
43 43
diff --git a/fs/xfs/xfs_dir2.c b/fs/xfs/xfs_dir2.c
index b0f1ee8fcb90..1e22133178d3 100644
--- a/fs/xfs/xfs_dir2.c
+++ b/fs/xfs/xfs_dir2.c
@@ -301,7 +301,7 @@ xfs_readdir(
301 int rval; /* return value */ 301 int rval; /* return value */
302 int v; /* type-checking value */ 302 int v; /* type-checking value */
303 303
304 vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); 304 xfs_itrace_entry(dp);
305 305
306 if (XFS_FORCED_SHUTDOWN(dp->i_mount)) 306 if (XFS_FORCED_SHUTDOWN(dp->i_mount))
307 return XFS_ERROR(EIO); 307 return XFS_ERROR(EIO);
diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c
index fb69ef180b27..5363025ded7e 100644
--- a/fs/xfs/xfs_iget.c
+++ b/fs/xfs/xfs_iget.c
@@ -157,7 +157,7 @@ again:
157 goto again; 157 goto again;
158 } 158 }
159 159
160 vn_trace_exit(ip, "xfs_iget.alloc", 160 _xfs_itrace_exit(ip, "xfs_iget.alloc",
161 (inst_t *)__return_address); 161 (inst_t *)__return_address);
162 162
163 XFS_STATS_INC(xs_ig_found); 163 XFS_STATS_INC(xs_ig_found);
@@ -212,7 +212,7 @@ finish_inode:
212 xfs_ilock(ip, lock_flags); 212 xfs_ilock(ip, lock_flags);
213 213
214 xfs_iflags_clear(ip, XFS_ISTALE); 214 xfs_iflags_clear(ip, XFS_ISTALE);
215 vn_trace_exit(ip, "xfs_iget.found", 215 _xfs_itrace_exit(ip, "xfs_iget.found",
216 (inst_t *)__return_address); 216 (inst_t *)__return_address);
217 goto return_ip; 217 goto return_ip;
218 } 218 }
@@ -234,7 +234,7 @@ finish_inode:
234 return error; 234 return error;
235 } 235 }
236 236
237 vn_trace_exit(ip, "xfs_iget.alloc", (inst_t *)__return_address); 237 _xfs_itrace_exit(ip, "xfs_iget.alloc", (inst_t *)__return_address);
238 238
239 xfs_inode_lock_init(ip, vp); 239 xfs_inode_lock_init(ip, vp);
240 xfs_iocore_inode_init(ip); 240 xfs_iocore_inode_init(ip);
@@ -467,7 +467,7 @@ xfs_iput(xfs_inode_t *ip,
467{ 467{
468 bhv_vnode_t *vp = XFS_ITOV(ip); 468 bhv_vnode_t *vp = XFS_ITOV(ip);
469 469
470 vn_trace_entry(ip, "xfs_iput", (inst_t *)__return_address); 470 xfs_itrace_entry(ip);
471 xfs_iunlock(ip, lock_flags); 471 xfs_iunlock(ip, lock_flags);
472 VN_RELE(vp); 472 VN_RELE(vp);
473} 473}
@@ -482,7 +482,7 @@ xfs_iput_new(xfs_inode_t *ip,
482 bhv_vnode_t *vp = XFS_ITOV(ip); 482 bhv_vnode_t *vp = XFS_ITOV(ip);
483 struct inode *inode = vn_to_inode(vp); 483 struct inode *inode = vn_to_inode(vp);
484 484
485 vn_trace_entry(ip, "xfs_iput_new", (inst_t *)__return_address); 485 xfs_itrace_entry(ip);
486 486
487 if ((ip->i_d.di_mode == 0)) { 487 if ((ip->i_d.di_mode == 0)) {
488 ASSERT(!xfs_iflags_test(ip, XFS_IRECLAIMABLE)); 488 ASSERT(!xfs_iflags_test(ip, XFS_IRECLAIMABLE));
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 344948082819..fc2055e64279 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -884,8 +884,8 @@ xfs_iread(
884 * Initialize inode's trace buffers. 884 * Initialize inode's trace buffers.
885 * Do this before xfs_iformat in case it adds entries. 885 * Do this before xfs_iformat in case it adds entries.
886 */ 886 */
887#ifdef XFS_VNODE_TRACE 887#ifdef XFS_INODE_TRACE
888 ip->i_trace = ktrace_alloc(VNODE_TRACE_SIZE, KM_SLEEP); 888 ip->i_trace = ktrace_alloc(INODE_TRACE_SIZE, KM_SLEEP);
889#endif 889#endif
890#ifdef XFS_BMAP_TRACE 890#ifdef XFS_BMAP_TRACE
891 ip->i_xtrace = ktrace_alloc(XFS_BMAP_KTRACE_SIZE, KM_SLEEP); 891 ip->i_xtrace = ktrace_alloc(XFS_BMAP_KTRACE_SIZE, KM_SLEEP);
@@ -2749,7 +2749,7 @@ xfs_idestroy(
2749 mrfree(&ip->i_iolock); 2749 mrfree(&ip->i_iolock);
2750 freesema(&ip->i_flock); 2750 freesema(&ip->i_flock);
2751 2751
2752#ifdef XFS_VNODE_TRACE 2752#ifdef XFS_INODE_TRACE
2753 ktrace_free(ip->i_trace); 2753 ktrace_free(ip->i_trace);
2754#endif 2754#endif
2755#ifdef XFS_BMAP_TRACE 2755#ifdef XFS_BMAP_TRACE
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h
index e5aff929cc65..f93d2ca654b5 100644
--- a/fs/xfs/xfs_inode.h
+++ b/fs/xfs/xfs_inode.h
@@ -300,7 +300,7 @@ typedef struct xfs_inode {
300 xfs_fsize_t i_size; /* in-memory size */ 300 xfs_fsize_t i_size; /* in-memory size */
301 atomic_t i_iocount; /* outstanding I/O count */ 301 atomic_t i_iocount; /* outstanding I/O count */
302 /* Trace buffers per inode. */ 302 /* Trace buffers per inode. */
303#ifdef XFS_VNODE_TRACE 303#ifdef XFS_INODE_TRACE
304 struct ktrace *i_trace; /* general inode trace */ 304 struct ktrace *i_trace; /* general inode trace */
305#endif 305#endif
306#ifdef XFS_BMAP_TRACE 306#ifdef XFS_BMAP_TRACE
diff --git a/fs/xfs/xfs_rename.c b/fs/xfs/xfs_rename.c
index 44ea0ba36476..17e7496bdd5f 100644
--- a/fs/xfs/xfs_rename.c
+++ b/fs/xfs/xfs_rename.c
@@ -118,7 +118,7 @@ xfs_lock_for_rename(
118 inum1 = ip1->i_ino; 118 inum1 = ip1->i_ino;
119 119
120 ASSERT(ip1); 120 ASSERT(ip1);
121 ITRACE(ip1); 121 xfs_itrace_ref(ip1);
122 122
123 /* 123 /*
124 * Unlock dp1 and lock dp2 if they are different. 124 * Unlock dp1 and lock dp2 if they are different.
@@ -141,7 +141,7 @@ xfs_lock_for_rename(
141 IRELE (ip1); 141 IRELE (ip1);
142 return error; 142 return error;
143 } else { 143 } else {
144 ITRACE(ip2); 144 xfs_itrace_ref(ip2);
145 } 145 }
146 146
147 /* 147 /*
@@ -247,8 +247,8 @@ xfs_rename(
247 int src_namelen = VNAMELEN(src_vname); 247 int src_namelen = VNAMELEN(src_vname);
248 int target_namelen = VNAMELEN(target_vname); 248 int target_namelen = VNAMELEN(target_vname);
249 249
250 vn_trace_entry(src_dp, "xfs_rename", (inst_t *)__return_address); 250 xfs_itrace_entry(src_dp);
251 vn_trace_entry(xfs_vtoi(target_dir_vp), "xfs_rename", (inst_t *)__return_address); 251 xfs_itrace_entry(xfs_vtoi(target_dir_vp));
252 252
253 /* 253 /*
254 * Find the XFS behavior descriptor for the target directory 254 * Find the XFS behavior descriptor for the target directory
diff --git a/fs/xfs/xfs_utils.c b/fs/xfs/xfs_utils.c
index 673b405eaa31..a02b944c6c7b 100644
--- a/fs/xfs/xfs_utils.c
+++ b/fs/xfs/xfs_utils.c
@@ -73,7 +73,7 @@ xfs_dir_lookup_int(
73{ 73{
74 int error; 74 int error;
75 75
76 vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); 76 xfs_itrace_entry(dp);
77 77
78 error = xfs_dir_lookup(NULL, dp, VNAME(dentry), VNAMELEN(dentry), inum); 78 error = xfs_dir_lookup(NULL, dp, VNAME(dentry), VNAMELEN(dentry), inum);
79 if (!error) { 79 if (!error) {
diff --git a/fs/xfs/xfs_utils.h b/fs/xfs/xfs_utils.h
index a00b26d8840e..f857fcccb723 100644
--- a/fs/xfs/xfs_utils.h
+++ b/fs/xfs/xfs_utils.h
@@ -20,8 +20,6 @@
20 20
21#define IRELE(ip) VN_RELE(XFS_ITOV(ip)) 21#define IRELE(ip) VN_RELE(XFS_ITOV(ip))
22#define IHOLD(ip) VN_HOLD(XFS_ITOV(ip)) 22#define IHOLD(ip) VN_HOLD(XFS_ITOV(ip))
23#define ITRACE(ip) vn_trace_ref(ip, __FILE__, __LINE__, \
24 (inst_t *)__return_address)
25 23
26extern int xfs_get_dir_entry (bhv_vname_t *, xfs_inode_t **); 24extern int xfs_get_dir_entry (bhv_vname_t *, xfs_inode_t **);
27extern int xfs_dir_lookup_int (xfs_inode_t *, uint, bhv_vname_t *, xfs_ino_t *, 25extern int xfs_dir_lookup_int (xfs_inode_t *, uint, bhv_vname_t *, xfs_ino_t *,
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index efd5aff9eaf6..daba528bcc33 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -88,7 +88,7 @@ xfs_getattr(
88 bhv_vnode_t *vp = XFS_ITOV(ip); 88 bhv_vnode_t *vp = XFS_ITOV(ip);
89 xfs_mount_t *mp = ip->i_mount; 89 xfs_mount_t *mp = ip->i_mount;
90 90
91 vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); 91 xfs_itrace_entry(ip);
92 92
93 if (XFS_FORCED_SHUTDOWN(mp)) 93 if (XFS_FORCED_SHUTDOWN(mp))
94 return XFS_ERROR(EIO); 94 return XFS_ERROR(EIO);
@@ -228,7 +228,7 @@ xfs_setattr(
228 int file_owner; 228 int file_owner;
229 int need_iolock = 1; 229 int need_iolock = 1;
230 230
231 vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); 231 xfs_itrace_entry(ip);
232 232
233 if (mp->m_flags & XFS_MOUNT_RDONLY) 233 if (mp->m_flags & XFS_MOUNT_RDONLY)
234 return XFS_ERROR(EROFS); 234 return XFS_ERROR(EROFS);
@@ -915,8 +915,7 @@ xfs_access(
915{ 915{
916 int error; 916 int error;
917 917
918 vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); 918 xfs_itrace_entry(ip);
919
920 xfs_ilock(ip, XFS_ILOCK_SHARED); 919 xfs_ilock(ip, XFS_ILOCK_SHARED);
921 error = xfs_iaccess(ip, mode, credp); 920 error = xfs_iaccess(ip, mode, credp);
922 xfs_iunlock(ip, XFS_ILOCK_SHARED); 921 xfs_iunlock(ip, XFS_ILOCK_SHARED);
@@ -987,7 +986,7 @@ xfs_readlink(
987 int pathlen; 986 int pathlen;
988 int error = 0; 987 int error = 0;
989 988
990 vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); 989 xfs_itrace_entry(ip);
991 990
992 if (XFS_FORCED_SHUTDOWN(mp)) 991 if (XFS_FORCED_SHUTDOWN(mp))
993 return XFS_ERROR(EIO); 992 return XFS_ERROR(EIO);
@@ -1033,7 +1032,7 @@ xfs_fsync(
1033 int error; 1032 int error;
1034 int log_flushed = 0, changed = 1; 1033 int log_flushed = 0, changed = 1;
1035 1034
1036 vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); 1035 xfs_itrace_entry(ip);
1037 1036
1038 ASSERT(start >= 0 && stop >= -1); 1037 ASSERT(start >= 0 && stop >= -1);
1039 1038
@@ -1592,7 +1591,7 @@ xfs_inactive(
1592 int error; 1591 int error;
1593 int truncate; 1592 int truncate;
1594 1593
1595 vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); 1594 xfs_itrace_entry(ip);
1596 1595
1597 /* 1596 /*
1598 * If the inode is already free, then there can be nothing 1597 * If the inode is already free, then there can be nothing
@@ -1805,7 +1804,7 @@ xfs_lookup(
1805 int error; 1804 int error;
1806 uint lock_mode; 1805 uint lock_mode;
1807 1806
1808 vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); 1807 xfs_itrace_entry(dp);
1809 1808
1810 if (XFS_FORCED_SHUTDOWN(dp->i_mount)) 1809 if (XFS_FORCED_SHUTDOWN(dp->i_mount))
1811 return XFS_ERROR(EIO); 1810 return XFS_ERROR(EIO);
@@ -1814,7 +1813,7 @@ xfs_lookup(
1814 error = xfs_dir_lookup_int(dp, lock_mode, dentry, &e_inum, &ip); 1813 error = xfs_dir_lookup_int(dp, lock_mode, dentry, &e_inum, &ip);
1815 if (!error) { 1814 if (!error) {
1816 *vpp = XFS_ITOV(ip); 1815 *vpp = XFS_ITOV(ip);
1817 ITRACE(ip); 1816 xfs_itrace_ref(ip);
1818 } 1817 }
1819 xfs_iunlock_map_shared(dp, lock_mode); 1818 xfs_iunlock_map_shared(dp, lock_mode);
1820 return error; 1819 return error;
@@ -1848,7 +1847,7 @@ xfs_create(
1848 int namelen; 1847 int namelen;
1849 1848
1850 ASSERT(!*vpp); 1849 ASSERT(!*vpp);
1851 vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); 1850 xfs_itrace_entry(dp);
1852 1851
1853 namelen = VNAMELEN(dentry); 1852 namelen = VNAMELEN(dentry);
1854 1853
@@ -1930,7 +1929,7 @@ xfs_create(
1930 goto error_return; 1929 goto error_return;
1931 goto abort_return; 1930 goto abort_return;
1932 } 1931 }
1933 ITRACE(ip); 1932 xfs_itrace_ref(ip);
1934 1933
1935 /* 1934 /*
1936 * At this point, we've gotten a newly allocated inode. 1935 * At this point, we've gotten a newly allocated inode.
@@ -2098,7 +2097,7 @@ again:
2098 2097
2099 e_inum = ip->i_ino; 2098 e_inum = ip->i_ino;
2100 2099
2101 ITRACE(ip); 2100 xfs_itrace_ref(ip);
2102 2101
2103 /* 2102 /*
2104 * We want to lock in increasing inum. Since we've already 2103 * We want to lock in increasing inum. Since we've already
@@ -2321,7 +2320,7 @@ xfs_remove(
2321 uint resblks; 2320 uint resblks;
2322 int namelen; 2321 int namelen;
2323 2322
2324 vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); 2323 xfs_itrace_entry(dp);
2325 2324
2326 if (XFS_FORCED_SHUTDOWN(mp)) 2325 if (XFS_FORCED_SHUTDOWN(mp))
2327 return XFS_ERROR(EIO); 2326 return XFS_ERROR(EIO);
@@ -2364,9 +2363,8 @@ xfs_remove(
2364 2363
2365 dm_di_mode = ip->i_d.di_mode; 2364 dm_di_mode = ip->i_d.di_mode;
2366 2365
2367 vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); 2366 xfs_itrace_entry(ip);
2368 2367 xfs_itrace_ref(ip);
2369 ITRACE(ip);
2370 2368
2371 error = XFS_QM_DQATTACH(mp, dp, 0); 2369 error = XFS_QM_DQATTACH(mp, dp, 0);
2372 if (!error && dp != ip) 2370 if (!error && dp != ip)
@@ -2498,8 +2496,7 @@ xfs_remove(
2498 if (link_zero && xfs_inode_is_filestream(ip)) 2496 if (link_zero && xfs_inode_is_filestream(ip))
2499 xfs_filestream_deassociate(ip); 2497 xfs_filestream_deassociate(ip);
2500 2498
2501 vn_trace_exit(ip, __FUNCTION__, (inst_t *)__return_address); 2499 xfs_itrace_exit(ip);
2502
2503 IRELE(ip); 2500 IRELE(ip);
2504 2501
2505/* Fall through to std_return with error = 0 */ 2502/* Fall through to std_return with error = 0 */
@@ -2562,8 +2559,8 @@ xfs_link(
2562 char *target_name = VNAME(dentry); 2559 char *target_name = VNAME(dentry);
2563 int target_namelen; 2560 int target_namelen;
2564 2561
2565 vn_trace_entry(tdp, __FUNCTION__, (inst_t *)__return_address); 2562 xfs_itrace_entry(tdp);
2566 vn_trace_entry(xfs_vtoi(src_vp), __FUNCTION__, (inst_t *)__return_address); 2563 xfs_itrace_entry(xfs_vtoi(src_vp));
2567 2564
2568 target_namelen = VNAMELEN(dentry); 2565 target_namelen = VNAMELEN(dentry);
2569 ASSERT(!VN_ISDIR(src_vp)); 2566 ASSERT(!VN_ISDIR(src_vp));
@@ -2744,7 +2741,7 @@ xfs_mkdir(
2744 2741
2745 /* Return through std_return after this point. */ 2742 /* Return through std_return after this point. */
2746 2743
2747 vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); 2744 xfs_itrace_entry(dp);
2748 2745
2749 mp = dp->i_mount; 2746 mp = dp->i_mount;
2750 udqp = gdqp = NULL; 2747 udqp = gdqp = NULL;
@@ -2810,7 +2807,7 @@ xfs_mkdir(
2810 goto error_return; 2807 goto error_return;
2811 goto abort_return; 2808 goto abort_return;
2812 } 2809 }
2813 ITRACE(cdp); 2810 xfs_itrace_ref(cdp);
2814 2811
2815 /* 2812 /*
2816 * Now we add the directory inode to the transaction. 2813 * Now we add the directory inode to the transaction.
@@ -2936,7 +2933,7 @@ xfs_rmdir(
2936 int last_cdp_link; 2933 int last_cdp_link;
2937 uint resblks; 2934 uint resblks;
2938 2935
2939 vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); 2936 xfs_itrace_entry(dp);
2940 2937
2941 if (XFS_FORCED_SHUTDOWN(mp)) 2938 if (XFS_FORCED_SHUTDOWN(mp))
2942 return XFS_ERROR(EIO); 2939 return XFS_ERROR(EIO);
@@ -3041,7 +3038,7 @@ xfs_rmdir(
3041 VN_HOLD(dir_vp); 3038 VN_HOLD(dir_vp);
3042 } 3039 }
3043 3040
3044 ITRACE(cdp); 3041 xfs_itrace_ref(cdp);
3045 xfs_trans_ijoin(tp, cdp, XFS_ILOCK_EXCL); 3042 xfs_trans_ijoin(tp, cdp, XFS_ILOCK_EXCL);
3046 3043
3047 ASSERT(cdp->i_d.di_nlink >= 2); 3044 ASSERT(cdp->i_d.di_nlink >= 2);
@@ -3189,8 +3186,7 @@ xfs_symlink(
3189 ip = NULL; 3186 ip = NULL;
3190 tp = NULL; 3187 tp = NULL;
3191 3188
3192 vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); 3189 xfs_itrace_entry(dp);
3193
3194 3190
3195 if (XFS_FORCED_SHUTDOWN(mp)) 3191 if (XFS_FORCED_SHUTDOWN(mp))
3196 return XFS_ERROR(EIO); 3192 return XFS_ERROR(EIO);
@@ -3317,7 +3313,7 @@ xfs_symlink(
3317 goto error_return; 3313 goto error_return;
3318 goto error1; 3314 goto error1;
3319 } 3315 }
3320 ITRACE(ip); 3316 xfs_itrace_ref(ip);
3321 3317
3322 /* 3318 /*
3323 * An error after we've joined dp to the transaction will result in the 3319 * An error after we've joined dp to the transaction will result in the
@@ -3471,7 +3467,7 @@ xfs_fid2(
3471 xfs_inode_t *ip, 3467 xfs_inode_t *ip,
3472 xfs_fid_t *xfid) 3468 xfs_fid_t *xfid)
3473{ 3469{
3474 vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); 3470 xfs_itrace_entry(ip);
3475 3471
3476 xfid->fid_len = sizeof(xfs_fid_t) - sizeof(xfid->fid_len); 3472 xfid->fid_len = sizeof(xfs_fid_t) - sizeof(xfid->fid_len);
3477 xfid->fid_pad = 0; 3473 xfid->fid_pad = 0;
@@ -3653,7 +3649,7 @@ xfs_reclaim(
3653{ 3649{
3654 bhv_vnode_t *vp = XFS_ITOV(ip); 3650 bhv_vnode_t *vp = XFS_ITOV(ip);
3655 3651
3656 vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); 3652 xfs_itrace_entry(ip);
3657 3653
3658 ASSERT(!VN_MAPPED(vp)); 3654 ASSERT(!VN_MAPPED(vp));
3659 3655
@@ -3871,7 +3867,7 @@ xfs_alloc_file_space(
3871 int committed; 3867 int committed;
3872 int error; 3868 int error;
3873 3869
3874 vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); 3870 xfs_itrace_entry(ip);
3875 3871
3876 if (XFS_FORCED_SHUTDOWN(mp)) 3872 if (XFS_FORCED_SHUTDOWN(mp))
3877 return XFS_ERROR(EIO); 3873 return XFS_ERROR(EIO);
@@ -4141,7 +4137,7 @@ xfs_free_file_space(
4141 vp = XFS_ITOV(ip); 4137 vp = XFS_ITOV(ip);
4142 mp = ip->i_mount; 4138 mp = ip->i_mount;
4143 4139
4144 vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); 4140 xfs_itrace_entry(ip);
4145 4141
4146 if ((error = XFS_QM_DQATTACH(mp, ip, 0))) 4142 if ((error = XFS_QM_DQATTACH(mp, ip, 0)))
4147 return error; 4143 return error;
@@ -4347,7 +4343,7 @@ xfs_change_file_space(
4347 xfs_trans_t *tp; 4343 xfs_trans_t *tp;
4348 bhv_vattr_t va; 4344 bhv_vattr_t va;
4349 4345
4350 vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); 4346 xfs_itrace_entry(ip);
4351 4347
4352 /* 4348 /*
4353 * must be a regular file and have write permission 4349 * must be a regular file and have write permission