diff options
author | Christoph Hellwig <hch@lst.de> | 2008-12-03 06:20:40 -0500 |
---|---|---|
committer | Niv Sardi <xaiki@sgi.com> | 2008-12-03 23:39:25 -0500 |
commit | 5a8d0f3c7af801c7263fbba39952504d6fc7ff60 (patch) | |
tree | 64e376493be44232ac1c0d66e2a68c5280f42ec1 /fs/xfs/xfs_inode.h | |
parent | 25e41b3d521f52771354a718042a753a3e77df0a (diff) |
move inode tracing out of xfs_vnode.
Move the inode tracing into xfs_iget.c / xfs_inode.h and kill xfs_vnode.c
now that it's empty.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode.h')
-rw-r--r-- | fs/xfs/xfs_inode.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index ddac1b806c0b..558253e6fb43 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h | |||
@@ -536,6 +536,51 @@ void xfs_lock_two_inodes(xfs_inode_t *, xfs_inode_t *, uint); | |||
536 | void xfs_synchronize_atime(xfs_inode_t *); | 536 | void xfs_synchronize_atime(xfs_inode_t *); |
537 | void xfs_mark_inode_dirty_sync(xfs_inode_t *); | 537 | void xfs_mark_inode_dirty_sync(xfs_inode_t *); |
538 | 538 | ||
539 | #if defined(XFS_INODE_TRACE) | ||
540 | |||
541 | #define INODE_TRACE_SIZE 16 /* number of trace entries */ | ||
542 | #define INODE_KTRACE_ENTRY 1 | ||
543 | #define INODE_KTRACE_EXIT 2 | ||
544 | #define INODE_KTRACE_HOLD 3 | ||
545 | #define INODE_KTRACE_REF 4 | ||
546 | #define INODE_KTRACE_RELE 5 | ||
547 | |||
548 | extern void _xfs_itrace_entry(struct xfs_inode *, const char *, inst_t *); | ||
549 | extern void _xfs_itrace_exit(struct xfs_inode *, const char *, inst_t *); | ||
550 | extern void xfs_itrace_hold(struct xfs_inode *, char *, int, inst_t *); | ||
551 | extern void _xfs_itrace_ref(struct xfs_inode *, char *, int, inst_t *); | ||
552 | extern void xfs_itrace_rele(struct xfs_inode *, char *, int, inst_t *); | ||
553 | #define xfs_itrace_entry(ip) \ | ||
554 | _xfs_itrace_entry(ip, __func__, (inst_t *)__return_address) | ||
555 | #define xfs_itrace_exit(ip) \ | ||
556 | _xfs_itrace_exit(ip, __func__, (inst_t *)__return_address) | ||
557 | #define xfs_itrace_exit_tag(ip, tag) \ | ||
558 | _xfs_itrace_exit(ip, tag, (inst_t *)__return_address) | ||
559 | #define xfs_itrace_ref(ip) \ | ||
560 | _xfs_itrace_ref(ip, __FILE__, __LINE__, (inst_t *)__return_address) | ||
561 | |||
562 | #else | ||
563 | #define xfs_itrace_entry(a) | ||
564 | #define xfs_itrace_exit(a) | ||
565 | #define xfs_itrace_exit_tag(a, b) | ||
566 | #define xfs_itrace_hold(a, b, c, d) | ||
567 | #define xfs_itrace_ref(a) | ||
568 | #define xfs_itrace_rele(a, b, c, d) | ||
569 | #endif | ||
570 | |||
571 | #define IHOLD(ip) \ | ||
572 | do { \ | ||
573 | ASSERT(atomic_read(&VFS_I(ip)->i_count) > 0) ; \ | ||
574 | atomic_inc(&(VFS_I(ip)->i_count)); \ | ||
575 | xfs_itrace_hold((ip), __FILE__, __LINE__, (inst_t *)__return_address); \ | ||
576 | } while (0) | ||
577 | |||
578 | #define IRELE(ip) \ | ||
579 | do { \ | ||
580 | xfs_itrace_rele((ip), __FILE__, __LINE__, (inst_t *)__return_address); \ | ||
581 | iput(VFS_I(ip)); \ | ||
582 | } while (0) | ||
583 | |||
539 | #endif /* __KERNEL__ */ | 584 | #endif /* __KERNEL__ */ |
540 | 585 | ||
541 | int xfs_inotobp(struct xfs_mount *, struct xfs_trans *, | 586 | int xfs_inotobp(struct xfs_mount *, struct xfs_trans *, |