Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84433
b: refs/heads/master
c: cf441ee
h: refs/heads/master
i:
  84431: 37ba56f
v: v3
  • Loading branch information
Lachlan McIlroy committed Feb 7, 2008
1 parent 341f489 commit e9a266c
Show file tree
Hide file tree
Showing 15 changed files with 92 additions and 96 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 44866d39282d0782b15fa4cb62aad937bf0a0897
refs/heads/master: cf441eeb79c32471379f0a4d97feaef691432a03
3 changes: 1 addition & 2 deletions trunk/fs/xfs/linux-2.6/xfs_aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/xfs/linux-2.6/xfs_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,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:
Expand Down
9 changes: 3 additions & 6 deletions trunk/fs/xfs/linux-2.6/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,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) {
filemap_fdatawait(inode->i_mapping);
flags |= FLUSH_SYNC;
Expand All @@ -438,8 +437,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);
Expand Down Expand Up @@ -841,8 +839,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;
Expand Down
26 changes: 13 additions & 13 deletions trunk/fs/xfs/linux-2.6/xfs_vnode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -211,32 +211,32 @@ static inline int xfs_icount(struct xfs_inode *ip)
* 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 */
51 changes: 29 additions & 22 deletions trunk/fs/xfs/linux-2.6/xfs_vnode.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,12 @@ static inline int vn_count(bhv_vnode_t *vp)
*/
extern bhv_vnode_t *vn_hold(bhv_vnode_t *);

#if defined(XFS_VNODE_TRACE)
#if defined(XFS_INODE_TRACE)
#define VN_HOLD(vp) \
((void)vn_hold(vp), \
vn_trace_hold(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address))
xfs_itrace_hold(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address))
#define VN_RELE(vp) \
(vn_trace_rele(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address), \
(xfs_itrace_rele(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address), \
iput(vn_to_inode(vp)))
#else
#define VN_HOLD(vp) ((void)vn_hold(vp))
Expand Down Expand Up @@ -296,26 +296,33 @@ static inline void vn_atime_to_time_t(bhv_vnode_t *vp, time_t *tt)
/*
* 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_EXIT 2
#define VNODE_KTRACE_HOLD 3
#define VNODE_KTRACE_REF 4
#define VNODE_KTRACE_RELE 5

extern void vn_trace_entry(struct xfs_inode *, const char *, inst_t *);
extern void vn_trace_exit(struct xfs_inode *, const char *, inst_t *);
extern void vn_trace_hold(struct xfs_inode *, char *, int, inst_t *);
extern void vn_trace_ref(struct xfs_inode *, char *, int, inst_t *);
extern void vn_trace_rele(struct xfs_inode *, char *, int, inst_t *);
#if defined(XFS_INODE_TRACE)

#define INODE_TRACE_SIZE 16 /* number of trace entries */
#define INODE_KTRACE_ENTRY 1
#define INODE_KTRACE_EXIT 2
#define INODE_KTRACE_HOLD 3
#define INODE_KTRACE_REF 4
#define INODE_KTRACE_RELE 5

extern void _xfs_itrace_entry(struct xfs_inode *, const char *, inst_t *);
extern void _xfs_itrace_exit(struct xfs_inode *, const char *, inst_t *);
extern void xfs_itrace_hold(struct xfs_inode *, char *, int, inst_t *);
extern void _xfs_itrace_ref(struct xfs_inode *, char *, int, inst_t *);
extern void xfs_itrace_rele(struct xfs_inode *, char *, int, inst_t *);
#define xfs_itrace_entry(ip) \
_xfs_itrace_entry(ip, __FUNCTION__, (inst_t *)__return_address)
#define xfs_itrace_exit(ip) \
_xfs_itrace_exit(ip, __FUNCTION__, (inst_t *)__return_address)
#define xfs_itrace_ref(ip) \
_xfs_itrace_ref(ip, __FILE__, __LINE__, (inst_t *)__return_address)

#else
#define vn_trace_entry(a,b,c)
#define vn_trace_exit(a,b,c)
#define vn_trace_hold(a,b,c,d)
#define vn_trace_ref(a,b,c,d)
#define vn_trace_rele(a,b,c,d)
#define xfs_itrace_entry(a)
#define xfs_itrace_exit(a)
#define xfs_itrace_hold(a, b, c, d)
#define xfs_itrace_ref(a)
#define xfs_itrace_rele(a, b, c, d)
#endif

#endif /* __XFS_VNODE_H__ */
2 changes: 1 addition & 1 deletion trunk/fs/xfs/xfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/xfs_dir2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions trunk/fs/xfs/xfs_iget.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ xfs_iget_core(
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);
Expand Down Expand Up @@ -212,7 +212,7 @@ xfs_iget_core(
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;
}
Expand All @@ -234,7 +234,7 @@ xfs_iget_core(
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);
Expand Down Expand Up @@ -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);
}
Expand All @@ -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));
Expand Down
6 changes: 3 additions & 3 deletions trunk/fs/xfs/xfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -2749,7 +2749,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
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/xfs_inode.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions trunk/fs/xfs/xfs_rename.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -141,7 +141,7 @@ xfs_lock_for_rename(
IRELE (ip1);
return error;
} else {
ITRACE(ip2);
xfs_itrace_ref(ip2);
}

/*
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/xfs_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 0 additions & 2 deletions trunk/fs/xfs/xfs_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *,
Expand Down
Loading

0 comments on commit e9a266c

Please sign in to comment.