Skip to content

Commit a4452e6

Browse files
committed
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>
1 parent 10c93b5 commit a4452e6

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

fs/nfsd/nfs4proc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,6 +1287,7 @@ static void nfs4_put_copy(struct nfsd4_copy *copy)
12871287

12881288
static void nfsd4_stop_copy(struct nfsd4_copy *copy)
12891289
{
1290+
trace_nfsd_copy_async_cancel(copy);
12901291
if (!test_and_set_bit(NFSD4_COPY_F_STOPPED, &copy->cp_flags))
12911292
kthread_stop(copy->copy_task);
12921293
nfs4_put_copy(copy);

fs/nfsd/trace.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2244,7 +2244,7 @@ TRACE_EVENT(nfsd_copy_done,
22442244
)
22452245
);
22462246

2247-
TRACE_EVENT(nfsd_copy_async_done,
2247+
DECLARE_EVENT_CLASS(nfsd_copy_async_done_class,
22482248
TP_PROTO(
22492249
const struct nfsd4_copy *copy
22502250
),
@@ -2313,6 +2313,15 @@ TRACE_EVENT(nfsd_copy_async_done,
23132313
)
23142314
);
23152315

2316+
#define DEFINE_COPY_ASYNC_DONE_EVENT(name) \
2317+
DEFINE_EVENT(nfsd_copy_async_done_class, \
2318+
nfsd_copy_async_##name, \
2319+
TP_PROTO(const struct nfsd4_copy *copy), \
2320+
TP_ARGS(copy))
2321+
2322+
DEFINE_COPY_ASYNC_DONE_EVENT(done);
2323+
DEFINE_COPY_ASYNC_DONE_EVENT(cancel);
2324+
23162325
#endif /* _NFSD_TRACE_H */
23172326

23182327
#undef TRACE_INCLUDE_PATH

0 commit comments

Comments
 (0)