afs: Add directory reload tracepoint
authorDavid Howells <dhowells@redhat.com>
Thu, 25 Apr 2019 13:26:51 +0000 (14:26 +0100)
committerDavid Howells <dhowells@redhat.com>
Thu, 25 Apr 2019 13:26:51 +0000 (14:26 +0100)
Add a tracepoint (afs_reload_dir) to indicate when a directory is being
reloaded.

Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/dir.c
include/trace/events/afs.h

index 378a96a1116eb4d633585ce18091d00d0200a5f4..be5d2f932b77721af22395bbb7478be300883758 100644 (file)
@@ -309,6 +309,7 @@ retry:
                goto error;
 
        if (!test_bit(AFS_VNODE_DIR_VALID, &dvnode->flags)) {
+               trace_afs_reload_dir(dvnode);
                ret = afs_fetch_data(dvnode, key, req);
                if (ret < 0)
                        goto error_unlock;
index 21b896fabb2f3aa11ce97e6a50792c32c3aca75b..8da9dd5bc2b6223d8b5da1e0ca278ba85516e194 100644 (file)
@@ -947,6 +947,23 @@ TRACE_EVENT(afs_flock_op,
                      __entry->from, __entry->len, __entry->flags)
            );
 
+TRACE_EVENT(afs_reload_dir,
+           TP_PROTO(struct afs_vnode *vnode),
+
+           TP_ARGS(vnode),
+
+           TP_STRUCT__entry(
+                   __field_struct(struct afs_fid,      fid             )
+                            ),
+
+           TP_fast_assign(
+                   __entry->fid = vnode->fid;
+                          ),
+
+           TP_printk("%llx:%llx:%x",
+                     __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique)
+           );
+
 #endif /* _TRACE_AFS_H */
 
 /* This part must be outside protection */