diff options
Diffstat (limited to 'fs/xfs/xfs_iget.c')
-rw-r--r-- | fs/xfs/xfs_iget.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c index 82eb8ed56338..e2fb6210d4c5 100644 --- a/fs/xfs/xfs_iget.c +++ b/fs/xfs/xfs_iget.c | |||
@@ -805,3 +805,51 @@ xfs_isilocked( | |||
805 | } | 805 | } |
806 | #endif | 806 | #endif |
807 | 807 | ||
808 | #ifdef XFS_INODE_TRACE | ||
809 | |||
810 | #define KTRACE_ENTER(ip, vk, s, line, ra) \ | ||
811 | ktrace_enter((ip)->i_trace, \ | ||
812 | /* 0 */ (void *)(__psint_t)(vk), \ | ||
813 | /* 1 */ (void *)(s), \ | ||
814 | /* 2 */ (void *)(__psint_t) line, \ | ||
815 | /* 3 */ (void *)(__psint_t)atomic_read(&VFS_I(ip)->i_count), \ | ||
816 | /* 4 */ (void *)(ra), \ | ||
817 | /* 5 */ NULL, \ | ||
818 | /* 6 */ (void *)(__psint_t)current_cpu(), \ | ||
819 | /* 7 */ (void *)(__psint_t)current_pid(), \ | ||
820 | /* 8 */ (void *)__return_address, \ | ||
821 | /* 9 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL) | ||
822 | |||
823 | /* | ||
824 | * Vnode tracing code. | ||
825 | */ | ||
826 | void | ||
827 | _xfs_itrace_entry(xfs_inode_t *ip, const char *func, inst_t *ra) | ||
828 | { | ||
829 | KTRACE_ENTER(ip, INODE_KTRACE_ENTRY, func, 0, ra); | ||
830 | } | ||
831 | |||
832 | void | ||
833 | _xfs_itrace_exit(xfs_inode_t *ip, const char *func, inst_t *ra) | ||
834 | { | ||
835 | KTRACE_ENTER(ip, INODE_KTRACE_EXIT, func, 0, ra); | ||
836 | } | ||
837 | |||
838 | void | ||
839 | xfs_itrace_hold(xfs_inode_t *ip, char *file, int line, inst_t *ra) | ||
840 | { | ||
841 | KTRACE_ENTER(ip, INODE_KTRACE_HOLD, file, line, ra); | ||
842 | } | ||
843 | |||
844 | void | ||
845 | _xfs_itrace_ref(xfs_inode_t *ip, char *file, int line, inst_t *ra) | ||
846 | { | ||
847 | KTRACE_ENTER(ip, INODE_KTRACE_REF, file, line, ra); | ||
848 | } | ||
849 | |||
850 | void | ||
851 | xfs_itrace_rele(xfs_inode_t *ip, char *file, int line, inst_t *ra) | ||
852 | { | ||
853 | KTRACE_ENTER(ip, INODE_KTRACE_RELE, file, line, ra); | ||
854 | } | ||
855 | #endif /* XFS_INODE_TRACE */ | ||