[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <155269082170.8537.8590577690754637263.stgit@warthog.procyon.org.uk>
Date: Fri, 15 Mar 2019 23:00:21 +0000
From: David Howells <dhowells@...hat.com>
To: linux-afs@...ts.infradead.org
Cc: dhowells@...hat.com, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 08/10] afs: Add directory reload tracepoint
Add a tracepoint (afs_reload_dir) to indicate when a directory is being
reloaded.
Signed-off-by: David Howells <dhowells@...hat.com>
---
fs/afs/dir.c | 1 +
include/trace/events/afs.h | 17 +++++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/fs/afs/dir.c b/fs/afs/dir.c
index 378a96a1116e..be5d2f932b77 100644
--- a/fs/afs/dir.c
+++ b/fs/afs/dir.c
@@ -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;
diff --git a/include/trace/events/afs.h b/include/trace/events/afs.h
index 21b896fabb2f..8da9dd5bc2b6 100644
--- a/include/trace/events/afs.h
+++ b/include/trace/events/afs.h
@@ -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 */
Powered by blists - more mailing lists