aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2019-04-25 09:26:51 -0400
committerDavid Howells <dhowells@redhat.com>2019-04-25 09:26:51 -0400
commit80548b03991f58758a336424a90bf9f988e3b077 (patch)
tree4d4872497df5a5794d9eb4ca352d4d33fa30798b /fs/afs
parent79ddbfa500b37a94fa7501e65ebdd5c0e4c7592d (diff)
afs: Add more tracepoints
Add four more tracepoints: (1) afs_make_fs_call1 - Split from afs_make_fs_call but takes a filename to log also. (2) afs_make_fs_call2 - Like the above but takes two filenames to log. (3) afs_lookup - Log the result of doing a successful lookup, including a negative result (fid 0:0). (4) afs_get_tree - Log the set up of a volume for mounting. It also extends the name buffer on the afs_edit_dir tracepoint to 24 chars and puts quotes around the filename in the text representation. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs')
-rw-r--r--fs/afs/dir.c8
-rw-r--r--fs/afs/fsclient.c10
-rw-r--r--fs/afs/super.c1
-rw-r--r--fs/afs/yfsclient.c14
4 files changed, 20 insertions, 13 deletions
diff --git a/fs/afs/dir.c b/fs/afs/dir.c
index 6c8523501639..48706eefc63b 100644
--- a/fs/afs/dir.c
+++ b/fs/afs/dir.c
@@ -908,8 +908,14 @@ static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry,
908 (void *)(unsigned long)dvnode->status.data_version; 908 (void *)(unsigned long)dvnode->status.data_version;
909 } 909 }
910 d = d_splice_alias(inode, dentry); 910 d = d_splice_alias(inode, dentry);
911 if (!IS_ERR_OR_NULL(d)) 911 if (!IS_ERR_OR_NULL(d)) {
912 d->d_fsdata = dentry->d_fsdata; 912 d->d_fsdata = dentry->d_fsdata;
913 trace_afs_lookup(dvnode, &d->d_name,
914 inode ? AFS_FS_I(inode) : NULL);
915 } else {
916 trace_afs_lookup(dvnode, &dentry->d_name,
917 inode ? AFS_FS_I(inode) : NULL);
918 }
913 return d; 919 return d;
914} 920}
915 921
diff --git a/fs/afs/fsclient.c b/fs/afs/fsclient.c
index 9d405f96cc91..be4520eb4965 100644
--- a/fs/afs/fsclient.c
+++ b/fs/afs/fsclient.c
@@ -830,7 +830,7 @@ int afs_fs_create(struct afs_fs_cursor *fc,
830 *bp++ = 0; /* segment size */ 830 *bp++ = 0; /* segment size */
831 831
832 afs_use_fs_server(call, fc->cbi); 832 afs_use_fs_server(call, fc->cbi);
833 trace_afs_make_fs_call(call, &vnode->fid); 833 trace_afs_make_fs_call1(call, &vnode->fid, name);
834 afs_make_call(&fc->ac, call, GFP_NOFS); 834 afs_make_call(&fc->ac, call, GFP_NOFS);
835 return afs_wait_for_call_to_complete(call, &fc->ac); 835 return afs_wait_for_call_to_complete(call, &fc->ac);
836} 836}
@@ -926,7 +926,7 @@ int afs_fs_remove(struct afs_fs_cursor *fc, struct afs_vnode *vnode,
926 } 926 }
927 927
928 afs_use_fs_server(call, fc->cbi); 928 afs_use_fs_server(call, fc->cbi);
929 trace_afs_make_fs_call(call, &dvnode->fid); 929 trace_afs_make_fs_call1(call, &dvnode->fid, name);
930 afs_make_call(&fc->ac, call, GFP_NOFS); 930 afs_make_call(&fc->ac, call, GFP_NOFS);
931 return afs_wait_for_call_to_complete(call, &fc->ac); 931 return afs_wait_for_call_to_complete(call, &fc->ac);
932} 932}
@@ -1019,7 +1019,7 @@ int afs_fs_link(struct afs_fs_cursor *fc, struct afs_vnode *vnode,
1019 *bp++ = htonl(vnode->fid.unique); 1019 *bp++ = htonl(vnode->fid.unique);
1020 1020
1021 afs_use_fs_server(call, fc->cbi); 1021 afs_use_fs_server(call, fc->cbi);
1022 trace_afs_make_fs_call(call, &vnode->fid); 1022 trace_afs_make_fs_call1(call, &vnode->fid, name);
1023 afs_make_call(&fc->ac, call, GFP_NOFS); 1023 afs_make_call(&fc->ac, call, GFP_NOFS);
1024 return afs_wait_for_call_to_complete(call, &fc->ac); 1024 return afs_wait_for_call_to_complete(call, &fc->ac);
1025} 1025}
@@ -1134,7 +1134,7 @@ int afs_fs_symlink(struct afs_fs_cursor *fc,
1134 *bp++ = 0; /* segment size */ 1134 *bp++ = 0; /* segment size */
1135 1135
1136 afs_use_fs_server(call, fc->cbi); 1136 afs_use_fs_server(call, fc->cbi);
1137 trace_afs_make_fs_call(call, &vnode->fid); 1137 trace_afs_make_fs_call1(call, &vnode->fid, name);
1138 afs_make_call(&fc->ac, call, GFP_NOFS); 1138 afs_make_call(&fc->ac, call, GFP_NOFS);
1139 return afs_wait_for_call_to_complete(call, &fc->ac); 1139 return afs_wait_for_call_to_complete(call, &fc->ac);
1140} 1140}
@@ -1253,7 +1253,7 @@ int afs_fs_rename(struct afs_fs_cursor *fc,
1253 } 1253 }
1254 1254
1255 afs_use_fs_server(call, fc->cbi); 1255 afs_use_fs_server(call, fc->cbi);
1256 trace_afs_make_fs_call(call, &orig_dvnode->fid); 1256 trace_afs_make_fs_call2(call, &orig_dvnode->fid, orig_name, new_name);
1257 afs_make_call(&fc->ac, call, GFP_NOFS); 1257 afs_make_call(&fc->ac, call, GFP_NOFS);
1258 return afs_wait_for_call_to_complete(call, &fc->ac); 1258 return afs_wait_for_call_to_complete(call, &fc->ac);
1259} 1259}
diff --git a/fs/afs/super.c b/fs/afs/super.c
index 6438849a75c4..ce85ae61f12d 100644
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@ -550,6 +550,7 @@ static int afs_get_tree(struct fs_context *fc)
550 } 550 }
551 551
552 fc->root = dget(sb->s_root); 552 fc->root = dget(sb->s_root);
553 trace_afs_get_tree(as->cell, as->volume);
553 _leave(" = 0 [%p]", sb); 554 _leave(" = 0 [%p]", sb);
554 return 0; 555 return 0;
555 556
diff --git a/fs/afs/yfsclient.c b/fs/afs/yfsclient.c
index 73546c2d89ee..5ea0350dc9dd 100644
--- a/fs/afs/yfsclient.c
+++ b/fs/afs/yfsclient.c
@@ -809,7 +809,7 @@ int yfs_fs_create_file(struct afs_fs_cursor *fc,
809 yfs_check_req(call, bp); 809 yfs_check_req(call, bp);
810 810
811 afs_use_fs_server(call, fc->cbi); 811 afs_use_fs_server(call, fc->cbi);
812 trace_afs_make_fs_call(call, &vnode->fid); 812 trace_afs_make_fs_call1(call, &vnode->fid, name);
813 afs_make_call(&fc->ac, call, GFP_NOFS); 813 afs_make_call(&fc->ac, call, GFP_NOFS);
814 return afs_wait_for_call_to_complete(call, &fc->ac); 814 return afs_wait_for_call_to_complete(call, &fc->ac);
815} 815}
@@ -873,7 +873,7 @@ int yfs_fs_make_dir(struct afs_fs_cursor *fc,
873 yfs_check_req(call, bp); 873 yfs_check_req(call, bp);
874 874
875 afs_use_fs_server(call, fc->cbi); 875 afs_use_fs_server(call, fc->cbi);
876 trace_afs_make_fs_call(call, &vnode->fid); 876 trace_afs_make_fs_call1(call, &vnode->fid, name);
877 afs_make_call(&fc->ac, call, GFP_NOFS); 877 afs_make_call(&fc->ac, call, GFP_NOFS);
878 return afs_wait_for_call_to_complete(call, &fc->ac); 878 return afs_wait_for_call_to_complete(call, &fc->ac);
879} 879}
@@ -964,7 +964,7 @@ int yfs_fs_remove_file2(struct afs_fs_cursor *fc, struct afs_vnode *vnode,
964 yfs_check_req(call, bp); 964 yfs_check_req(call, bp);
965 965
966 afs_use_fs_server(call, fc->cbi); 966 afs_use_fs_server(call, fc->cbi);
967 trace_afs_make_fs_call(call, &dvnode->fid); 967 trace_afs_make_fs_call1(call, &dvnode->fid, name);
968 afs_make_call(&fc->ac, call, GFP_NOFS); 968 afs_make_call(&fc->ac, call, GFP_NOFS);
969 return afs_wait_for_call_to_complete(call, &fc->ac); 969 return afs_wait_for_call_to_complete(call, &fc->ac);
970} 970}
@@ -1052,7 +1052,7 @@ int yfs_fs_remove(struct afs_fs_cursor *fc, struct afs_vnode *vnode,
1052 yfs_check_req(call, bp); 1052 yfs_check_req(call, bp);
1053 1053
1054 afs_use_fs_server(call, fc->cbi); 1054 afs_use_fs_server(call, fc->cbi);
1055 trace_afs_make_fs_call(call, &dvnode->fid); 1055 trace_afs_make_fs_call1(call, &dvnode->fid, name);
1056 afs_make_call(&fc->ac, call, GFP_NOFS); 1056 afs_make_call(&fc->ac, call, GFP_NOFS);
1057 return afs_wait_for_call_to_complete(call, &fc->ac); 1057 return afs_wait_for_call_to_complete(call, &fc->ac);
1058} 1058}
@@ -1138,7 +1138,7 @@ int yfs_fs_link(struct afs_fs_cursor *fc, struct afs_vnode *vnode,
1138 yfs_check_req(call, bp); 1138 yfs_check_req(call, bp);
1139 1139
1140 afs_use_fs_server(call, fc->cbi); 1140 afs_use_fs_server(call, fc->cbi);
1141 trace_afs_make_fs_call(call, &vnode->fid); 1141 trace_afs_make_fs_call1(call, &vnode->fid, name);
1142 afs_make_call(&fc->ac, call, GFP_NOFS); 1142 afs_make_call(&fc->ac, call, GFP_NOFS);
1143 return afs_wait_for_call_to_complete(call, &fc->ac); 1143 return afs_wait_for_call_to_complete(call, &fc->ac);
1144} 1144}
@@ -1235,7 +1235,7 @@ int yfs_fs_symlink(struct afs_fs_cursor *fc,
1235 yfs_check_req(call, bp); 1235 yfs_check_req(call, bp);
1236 1236
1237 afs_use_fs_server(call, fc->cbi); 1237 afs_use_fs_server(call, fc->cbi);
1238 trace_afs_make_fs_call(call, &dvnode->fid); 1238 trace_afs_make_fs_call1(call, &dvnode->fid, name);
1239 afs_make_call(&fc->ac, call, GFP_NOFS); 1239 afs_make_call(&fc->ac, call, GFP_NOFS);
1240 return afs_wait_for_call_to_complete(call, &fc->ac); 1240 return afs_wait_for_call_to_complete(call, &fc->ac);
1241} 1241}
@@ -1334,7 +1334,7 @@ int yfs_fs_rename(struct afs_fs_cursor *fc,
1334 yfs_check_req(call, bp); 1334 yfs_check_req(call, bp);
1335 1335
1336 afs_use_fs_server(call, fc->cbi); 1336 afs_use_fs_server(call, fc->cbi);
1337 trace_afs_make_fs_call(call, &orig_dvnode->fid); 1337 trace_afs_make_fs_call2(call, &orig_dvnode->fid, orig_name, new_name);
1338 afs_make_call(&fc->ac, call, GFP_NOFS); 1338 afs_make_call(&fc->ac, call, GFP_NOFS);
1339 return afs_wait_for_call_to_complete(call, &fc->ac); 1339 return afs_wait_for_call_to_complete(call, &fc->ac);
1340} 1340}