diff options
author | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-02-07 00:42:19 -0500 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-02-07 00:42:19 -0500 |
commit | cf441eeb79c32471379f0a4d97feaef691432a03 (patch) | |
tree | 283347fcc807a87339a8244d3a45029eac90c825 /fs/xfs/xfs_vnodeops.c | |
parent | 44866d39282d0782b15fa4cb62aad937bf0a0897 (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/xfs/xfs_vnodeops.c')
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 60 |
1 files changed, 28 insertions, 32 deletions
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 |