afs: Add more tracepoints to do with tracking validity
authorDavid Howells <dhowells@redhat.com>
Mon, 16 Dec 2024 20:41:07 +0000 (20:41 +0000)
committerChristian Brauner <brauner@kernel.org>
Fri, 20 Dec 2024 21:34:06 +0000 (22:34 +0100)
commit9e705016eb8f3d4a58f2000e560ea2c7517e081b
treef62261ccaf93772be802629e9c91585d1322319a
parent229105e5cfd9832a9ef1368c96e0098ec3a5fbf0
afs: Add more tracepoints to do with tracking validity

Add wrappers to set and clear the callback promise and to mark a directory
as invalidated, and add tracepoints to track these events:

 (1) afs_cb_promise: Log when a callback promise is set on a vnode.

 (2) afs_vnode_invalid: Log when the server's callback promise for a vnode
     is no longer valid and we need to refetch the vnode metadata.

 (3) afs_dir_invalid: Log when the contents of a directory are marked
     invalid and requiring refetching from the server and the cache
     invalidating.

and two tracepoints to record data version number management:

 (4) afs_set_dv: Log when the DV is recorded on a vnode.

 (5) afs_dv_mismatch: Log when the DV recorded on a vnode plus the expected
     delta for the operation does not match the DV we got back from the
     server.

Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/20241216204124.3752367-18-dhowells@redhat.com
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/afs/callback.c
fs/afs/dir.c
fs/afs/dir_edit.c
fs/afs/inode.c
fs/afs/internal.h
fs/afs/rotate.c
fs/afs/validation.c
include/trace/events/afs.h