Commit bafd0069 authored by Nathan Scott's avatar Nathan Scott

[XFS] Rename the vnode tracing macro to be consistent with the other trace code

SGI Modid: 2.5.x-xfs:slinx:160241a
parent 20eb2a8c
...@@ -98,7 +98,7 @@ vn_reclaim( ...@@ -98,7 +98,7 @@ vn_reclaim(
vp->v_type = VNON; vp->v_type = VNON;
vp->v_fbhv = NULL; vp->v_fbhv = NULL;
#ifdef CONFIG_XFS_VNODE_TRACING #ifdef XFS_VNODE_TRACE
ktrace_free(vp->v_trace); ktrace_free(vp->v_trace);
vp->v_trace = NULL; vp->v_trace = NULL;
#endif #endif
...@@ -154,9 +154,10 @@ vn_initialize( ...@@ -154,9 +154,10 @@ vn_initialize(
/* Initialize the first behavior and the behavior chain head. */ /* Initialize the first behavior and the behavior chain head. */
vn_bhv_head_init(VN_BHV_HEAD(vp), "vnode"); vn_bhv_head_init(VN_BHV_HEAD(vp), "vnode");
#ifdef CONFIG_XFS_VNODE_TRACING #ifdef XFS_VNODE_TRACE
vp->v_trace = ktrace_alloc(VNODE_TRACE_SIZE, KM_SLEEP); vp->v_trace = ktrace_alloc(VNODE_TRACE_SIZE, KM_SLEEP);
#endif /* CONFIG_XFS_VNODE_TRACING */ printk("Allocated VNODE_TRACE at 0x%p\n", vp->v_trace);
#endif /* XFS_VNODE_TRACE */
vn_trace_exit(vp, "vn_initialize", (inst_t *)__return_address); vn_trace_exit(vp, "vn_initialize", (inst_t *)__return_address);
return vp; return vp;
...@@ -392,7 +393,7 @@ vn_remove( ...@@ -392,7 +393,7 @@ vn_remove(
} }
#ifdef CONFIG_XFS_VNODE_TRACING #ifdef XFS_VNODE_TRACE
#define KTRACE_ENTER(vp, vk, s, line, ra) \ #define KTRACE_ENTER(vp, vk, s, line, ra) \
ktrace_enter( (vp)->v_trace, \ ktrace_enter( (vp)->v_trace, \
...@@ -439,4 +440,4 @@ vn_trace_rele(vnode_t *vp, char *file, int line, inst_t *ra) ...@@ -439,4 +440,4 @@ vn_trace_rele(vnode_t *vp, char *file, int line, inst_t *ra)
{ {
KTRACE_ENTER(vp, VNODE_KTRACE_RELE, file, line, ra); KTRACE_ENTER(vp, VNODE_KTRACE_RELE, file, line, ra);
} }
#endif /* CONFIG_XFS_VNODE_TRACING */ #endif /* XFS_VNODE_TRACE */
...@@ -87,7 +87,7 @@ typedef struct vnode { ...@@ -87,7 +87,7 @@ typedef struct vnode {
vn_bhv_head_t v_bh; /* behavior head */ vn_bhv_head_t v_bh; /* behavior head */
spinlock_t v_lock; /* VN_LOCK/VN_UNLOCK */ spinlock_t v_lock; /* VN_LOCK/VN_UNLOCK */
struct inode v_inode; /* Linux inode */ struct inode v_inode; /* Linux inode */
#ifdef CONFIG_XFS_VNODE_TRACING #ifdef XFS_VNODE_TRACE
struct ktrace *v_trace; /* trace header structure */ struct ktrace *v_trace; /* trace header structure */
#endif #endif
} vnode_t; } vnode_t;
...@@ -545,21 +545,17 @@ static inline int vn_count(struct vnode *vp) ...@@ -545,21 +545,17 @@ static inline int vn_count(struct vnode *vp)
extern vnode_t *vn_hold(struct vnode *); extern vnode_t *vn_hold(struct vnode *);
extern void vn_rele(struct vnode *); extern void vn_rele(struct vnode *);
#if defined(CONFIG_XFS_VNODE_TRACING) #if defined(XFS_VNODE_TRACE)
#define VN_HOLD(vp) \ #define VN_HOLD(vp) \
((void)vn_hold(vp), \ ((void)vn_hold(vp), \
vn_trace_hold(vp, __FILE__, __LINE__, (inst_t *)__return_address)) vn_trace_hold(vp, __FILE__, __LINE__, (inst_t *)__return_address))
#define VN_RELE(vp) \ #define VN_RELE(vp) \
(vn_trace_rele(vp, __FILE__, __LINE__, (inst_t *)__return_address), \ (vn_trace_rele(vp, __FILE__, __LINE__, (inst_t *)__return_address), \
iput(LINVFS_GET_IP(vp))) iput(LINVFS_GET_IP(vp)))
#else
#else /* ! (defined(CONFIG_XFS_VNODE_TRACING)) */
#define VN_HOLD(vp) ((void)vn_hold(vp)) #define VN_HOLD(vp) ((void)vn_hold(vp))
#define VN_RELE(vp) (iput(LINVFS_GET_IP(vp))) #define VN_RELE(vp) (iput(LINVFS_GET_IP(vp)))
#endif
#endif /* ! (defined(CONFIG_XFS_VNODE_TRACING)) */
/* /*
* Vname handling macros. * Vname handling macros.
...@@ -617,13 +613,12 @@ static __inline__ void vn_flagclr(struct vnode *vp, uint flag) ...@@ -617,13 +613,12 @@ static __inline__ void vn_flagclr(struct vnode *vp, uint flag)
#define FSYNC_INVAL 0x2 /* flush and invalidate cached data */ #define FSYNC_INVAL 0x2 /* flush and invalidate cached data */
#define FSYNC_DATA 0x4 /* synchronous fsync of data only */ #define FSYNC_DATA 0x4 /* synchronous fsync of data only */
#if (defined(CONFIG_XFS_VNODE_TRACING))
#define VNODE_TRACE_SIZE 16 /* number of trace entries */
/* /*
* Tracing entries. * Tracking vnode activity.
*/ */
#if defined(XFS_VNODE_TRACE)
#define VNODE_TRACE_SIZE 16 /* number of trace entries */
#define VNODE_KTRACE_ENTRY 1 #define VNODE_KTRACE_ENTRY 1
#define VNODE_KTRACE_EXIT 2 #define VNODE_KTRACE_EXIT 2
#define VNODE_KTRACE_HOLD 3 #define VNODE_KTRACE_HOLD 3
...@@ -635,18 +630,16 @@ extern void vn_trace_exit(struct vnode *, char *, inst_t *); ...@@ -635,18 +630,16 @@ extern void vn_trace_exit(struct vnode *, char *, inst_t *);
extern void vn_trace_hold(struct vnode *, char *, int, inst_t *); extern void vn_trace_hold(struct vnode *, char *, int, inst_t *);
extern void vn_trace_ref(struct vnode *, char *, int, inst_t *); extern void vn_trace_ref(struct vnode *, char *, int, inst_t *);
extern void vn_trace_rele(struct vnode *, char *, int, inst_t *); extern void vn_trace_rele(struct vnode *, char *, int, inst_t *);
#define VN_TRACE(vp) \ #define VN_TRACE(vp) \
vn_trace_ref(vp, __FILE__, __LINE__, (inst_t *)__return_address) vn_trace_ref(vp, __FILE__, __LINE__, (inst_t *)__return_address)
#else
#else /* ! (defined(CONFIG_XFS_VNODE_TRACING)) */
#define vn_trace_entry(a,b,c) #define vn_trace_entry(a,b,c)
#define vn_trace_exit(a,b,c) #define vn_trace_exit(a,b,c)
#define vn_trace_hold(a,b,c,d) #define vn_trace_hold(a,b,c,d)
#define vn_trace_ref(a,b,c,d) #define vn_trace_ref(a,b,c,d)
#define vn_trace_rele(a,b,c,d) #define vn_trace_rele(a,b,c,d)
#define VN_TRACE(vp) #define VN_TRACE(vp)
#endif
#endif /* ! (defined(CONFIG_XFS_VNODE_TRACING)) */
#endif /* __XFS_VNODE_H__ */ #endif /* __XFS_VNODE_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment