Skip to content

Commit

Permalink
afs: Add directory reload tracepoint
Browse files Browse the repository at this point in the history
Add a tracepoint (afs_reload_dir) to indicate when a directory is being
reloaded.

Signed-off-by: David Howells <dhowells@redhat.com>
  • Loading branch information
David Howells committed Apr 25, 2019
1 parent cdfb26b commit 99987c5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions fs/afs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ static struct afs_read *afs_read_dir(struct afs_vnode *dvnode, struct key *key)
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;
Expand Down
17 changes: 17 additions & 0 deletions include/trace/events/afs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 99987c5

Please sign in to comment.