diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2024-10-31 09:40:02 -0400 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2024-11-18 20:23:09 -0500 |
commit | a4452e661bc8ee56b2a893df6f523607c63f6de8 (patch) | |
tree | fc09a040af15e0002a1ec7e5af815c12fec4f63f /fs/nfsd | |
parent | 10c93b5101ca61d03351da678b395b48678840c2 (diff) |
NFSD: Add a tracepoint to record canceled async COPY operations
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs4proc.c | 1 | ||||
-rw-r--r-- | fs/nfsd/trace.h | 11 |
2 files changed, 11 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 94cc7b2ac385..ca383ebc1790 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -1287,6 +1287,7 @@ static void nfs4_put_copy(struct nfsd4_copy *copy) static void nfsd4_stop_copy(struct nfsd4_copy *copy) { + trace_nfsd_copy_async_cancel(copy); if (!test_and_set_bit(NFSD4_COPY_F_STOPPED, ©->cp_flags)) kthread_stop(copy->copy_task); nfs4_put_copy(copy); diff --git a/fs/nfsd/trace.h b/fs/nfsd/trace.h index f318898cfc31..6b7bf8129e49 100644 --- a/fs/nfsd/trace.h +++ b/fs/nfsd/trace.h @@ -2244,7 +2244,7 @@ TRACE_EVENT(nfsd_copy_done, ) ); -TRACE_EVENT(nfsd_copy_async_done, +DECLARE_EVENT_CLASS(nfsd_copy_async_done_class, TP_PROTO( const struct nfsd4_copy *copy ), @@ -2313,6 +2313,15 @@ TRACE_EVENT(nfsd_copy_async_done, ) ); +#define DEFINE_COPY_ASYNC_DONE_EVENT(name) \ +DEFINE_EVENT(nfsd_copy_async_done_class, \ + nfsd_copy_async_##name, \ + TP_PROTO(const struct nfsd4_copy *copy), \ + TP_ARGS(copy)) + +DEFINE_COPY_ASYNC_DONE_EVENT(done); +DEFINE_COPY_ASYNC_DONE_EVENT(cancel); + #endif /* _NFSD_TRACE_H */ #undef TRACE_INCLUDE_PATH |