Commit a4452e66 authored by Chuck Lever's avatar Chuck Lever
Browse files

NFSD: Add a tracepoint to record canceled async COPY operations

parent 10c93b51
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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, &copy->cp_flags))
		kthread_stop(copy->copy_task);
	nfs4_put_copy(copy);
+10 −1
Original line number Diff line number Diff line
@@ -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