public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] NFSv4.2 add tracepoints to sparse files and copy
@ 2021-10-18 22:03 Olga Kornievskaia
  2021-10-18 22:03 ` [PATCH 1/7] NFSv4.2 add tracepoint to SEEK Olga Kornievskaia
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Olga Kornievskaia @ 2021-10-18 22:03 UTC (permalink / raw)
  To: trond.myklebust, anna.schumaker, steved; +Cc: linux-nfs

From: Olga Kornievskaia <kolga@netapp.com>

Olga Kornievskaia (7):
  NFSv4.2 add tracepoint to SEEK
  NFSv4.2 add tracepoints to FALLOCATE and DEALLOCATE
  NFSv4.2 add tracepoint to COPY
  NFSv4.2 add tracepoint to CLONE
  NFSv4.2 add tracepoint to CB_OFFLOAD
  NFSv4.2 add tracepoint to COPY_NOTIFY
  NFSv4.2 add tracepoint to OFFLOAD_CANCEL

 fs/nfs/callback_proc.c |   3 +
 fs/nfs/nfs42proc.c     |   9 +
 fs/nfs/nfs4trace.h     | 429 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 441 insertions(+)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/7] NFSv4.2 add tracepoint to SEEK
  2021-10-18 22:03 [PATCH 0/7] NFSv4.2 add tracepoints to sparse files and copy Olga Kornievskaia
@ 2021-10-18 22:03 ` Olga Kornievskaia
  2021-10-19 17:08   ` Anna Schumaker
  2021-10-27  7:50   ` kernel test robot
  2021-10-18 22:03 ` [PATCH 2/7] NFSv4.2 add tracepoints to FALLOCATE and DEALLOCATE Olga Kornievskaia
                   ` (5 subsequent siblings)
  6 siblings, 2 replies; 17+ messages in thread
From: Olga Kornievskaia @ 2021-10-18 22:03 UTC (permalink / raw)
  To: trond.myklebust, anna.schumaker, steved; +Cc: linux-nfs

From: Olga Kornievskaia <kolga@netapp.com>

Add a tracepoint to the SEEK operation.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
---
 fs/nfs/nfs42proc.c |  1 +
 fs/nfs/nfs4trace.h | 65 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+)

diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c
index a24349512ffe..87c0dcb8823b 100644
--- a/fs/nfs/nfs42proc.c
+++ b/fs/nfs/nfs42proc.c
@@ -678,6 +678,7 @@ static loff_t _nfs42_proc_llseek(struct file *filep,
 
 	status = nfs4_call_sync(server->client, server, &msg,
 				&args.seq_args, &res.seq_res, 0);
+	trace_nfs4_llseek(inode, &args, &res, status);
 	if (status == -ENOTSUPP)
 		server->caps &= ~NFS_CAP_SEEK;
 	if (status)
diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
index 7a2567aa2b86..81dcbfca7f74 100644
--- a/fs/nfs/nfs4trace.h
+++ b/fs/nfs/nfs4trace.h
@@ -2417,6 +2417,71 @@ TRACE_EVENT(ff_layout_commit_error,
 		)
 );
 
+TRACE_DEFINE_ENUM(NFS4_CONTENT_DATA);
+TRACE_DEFINE_ENUM(NFS4_CONTENT_HOLE);
+
+#define show_llseek_mode(what)			\
+	__print_symbolic(what,			\
+		{ NFS4_CONTENT_DATA, "DATA" },		\
+		{ NFS4_CONTENT_HOLE, "HOLE" })
+
+TRACE_EVENT(nfs4_llseek,
+		TP_PROTO(
+			const struct inode *inode,
+			const struct nfs42_seek_args *args,
+			const struct nfs42_seek_res *res,
+			int error
+		),
+
+		TP_ARGS(inode, args, res, error),
+
+		TP_STRUCT__entry(
+			__field(unsigned long, error)
+			__field(u32, fhandle)
+			__field(u32, fileid)
+			__field(dev_t, dev)
+			__field(int, stateid_seq)
+			__field(u32, stateid_hash)
+			__field(loff_t, offset_s)
+			__field(u32, what)
+			__field(loff_t, offset_r)
+			__field(u32, eof)
+		),
+
+		TP_fast_assign(
+			const struct nfs_inode *nfsi = NFS_I(inode);
+			const struct nfs_fh *fh = args->sa_fh;
+
+			__entry->fileid = nfsi->fileid;
+			__entry->dev = inode->i_sb->s_dev;
+			__entry->fhandle = nfs_fhandle_hash(fh);
+			__entry->offset_s = args->sa_offset;
+			__entry->error = error < 0 ? -error : 0;
+			__entry->stateid_seq =
+				be32_to_cpu(args->sa_stateid.seqid);
+			__entry->stateid_hash =
+				nfs_stateid_hash(&args->sa_stateid);
+			__entry->what = args->sa_what;
+			__entry->offset_r = error < 0 ? 0 : res->sr_offset;
+			__entry->eof = error < 0 ? 0 : res->sr_eof;
+		),
+
+		TP_printk(
+			"error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
+			"stateid=%d:0x%08x offset_s=%llu what=%s "
+			"offset_r=%llu eof=%u",
+			-__entry->error,
+			show_nfsv4_errors(__entry->error),
+			MAJOR(__entry->dev), MINOR(__entry->dev),
+			(unsigned long long)__entry->fileid,
+			__entry->fhandle,
+			__entry->stateid_seq, __entry->stateid_hash,
+			__entry->offset_s,
+			show_llseek_mode(__entry->what),
+			__entry->offset_r,
+			__entry->eof
+		)
+);
 
 #endif /* CONFIG_NFS_V4_1 */
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/7] NFSv4.2 add tracepoints to FALLOCATE and DEALLOCATE
  2021-10-18 22:03 [PATCH 0/7] NFSv4.2 add tracepoints to sparse files and copy Olga Kornievskaia
  2021-10-18 22:03 ` [PATCH 1/7] NFSv4.2 add tracepoint to SEEK Olga Kornievskaia
@ 2021-10-18 22:03 ` Olga Kornievskaia
  2021-10-18 22:03 ` [PATCH 3/7] NFSv4.2 add tracepoint to COPY Olga Kornievskaia
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Olga Kornievskaia @ 2021-10-18 22:03 UTC (permalink / raw)
  To: trond.myklebust, anna.schumaker, steved; +Cc: linux-nfs

From: Olga Kornievskaia <kolga@netapp.com>

Add a tracepoint to the FALLOCATE/DEALLOCATE operations.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
---
 fs/nfs/nfs42proc.c |  4 ++++
 fs/nfs/nfs4trace.h | 57 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)

diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c
index 87c0dcb8823b..c36824888601 100644
--- a/fs/nfs/nfs42proc.c
+++ b/fs/nfs/nfs42proc.c
@@ -83,6 +83,10 @@ static int _nfs42_proc_fallocate(struct rpc_message *msg, struct file *filep,
 		status = nfs_post_op_update_inode_force_wcc(inode,
 							    res.falloc_fattr);
 
+	if (msg->rpc_proc == &nfs4_procedures[NFSPROC4_CLNT_ALLOCATE])
+		trace_nfs4_fallocate(inode, &args, status);
+	else
+		trace_nfs4_deallocate(inode, &args, status);
 	kfree(res.falloc_fattr);
 	return status;
 }
diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
index 81dcbfca7f74..ba338ee4a82b 100644
--- a/fs/nfs/nfs4trace.h
+++ b/fs/nfs/nfs4trace.h
@@ -2483,6 +2483,63 @@ TRACE_EVENT(nfs4_llseek,
 		)
 );
 
+DECLARE_EVENT_CLASS(nfs4_sparse_event,
+		TP_PROTO(
+			const struct inode *inode,
+			const struct nfs42_falloc_args *args,
+			int error
+		),
+
+		TP_ARGS(inode, args, error),
+
+		TP_STRUCT__entry(
+			__field(unsigned long, error)
+			__field(loff_t, offset)
+			__field(loff_t, len)
+			__field(dev_t, dev)
+			__field(u32, fhandle)
+			__field(u64, fileid)
+			__field(int, stateid_seq)
+			__field(u32, stateid_hash)
+		),
+
+		TP_fast_assign(
+			__entry->error = error < 0 ? -error : 0;
+			__entry->offset = args->falloc_offset;
+			__entry->len = args->falloc_length;
+			__entry->dev = inode->i_sb->s_dev;
+			__entry->fileid = NFS_FILEID(inode);
+			__entry->fhandle = nfs_fhandle_hash(NFS_FH(inode));
+			__entry->stateid_seq =
+				be32_to_cpu(args->falloc_stateid.seqid);
+			__entry->stateid_hash =
+				nfs_stateid_hash(&args->falloc_stateid);
+		),
+
+		TP_printk(
+			"error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
+			"stateid=%d:0x%08x offset=%llu len=%llu",
+			-__entry->error,
+			show_nfsv4_errors(__entry->error),
+			MAJOR(__entry->dev), MINOR(__entry->dev),
+			(unsigned long long)__entry->fileid,
+			__entry->fhandle,
+			__entry->stateid_seq, __entry->stateid_hash,
+			(long long)__entry->offset,
+			(long long)__entry->len
+		)
+);
+#define DEFINE_NFS4_SPARSE_EVENT(name) \
+	DEFINE_EVENT(nfs4_sparse_event, name, \
+			TP_PROTO( \
+				const struct inode *inode, \
+				const struct nfs42_falloc_args *args, \
+				int error \
+			), \
+			TP_ARGS(inode, args, error))
+DEFINE_NFS4_SPARSE_EVENT(nfs4_fallocate);
+DEFINE_NFS4_SPARSE_EVENT(nfs4_deallocate);
+
 #endif /* CONFIG_NFS_V4_1 */
 
 #endif /* _TRACE_NFS4_H */
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 3/7] NFSv4.2 add tracepoint to COPY
  2021-10-18 22:03 [PATCH 0/7] NFSv4.2 add tracepoints to sparse files and copy Olga Kornievskaia
  2021-10-18 22:03 ` [PATCH 1/7] NFSv4.2 add tracepoint to SEEK Olga Kornievskaia
  2021-10-18 22:03 ` [PATCH 2/7] NFSv4.2 add tracepoints to FALLOCATE and DEALLOCATE Olga Kornievskaia
@ 2021-10-18 22:03 ` Olga Kornievskaia
  2021-10-19 15:31   ` Chuck Lever III
  2021-10-27 14:28   ` kernel test robot
  2021-10-18 22:03 ` [PATCH 4/7] NFSv4.2 add tracepoint to CLONE Olga Kornievskaia
                   ` (3 subsequent siblings)
  6 siblings, 2 replies; 17+ messages in thread
From: Olga Kornievskaia @ 2021-10-18 22:03 UTC (permalink / raw)
  To: trond.myklebust, anna.schumaker, steved; +Cc: linux-nfs

From: Olga Kornievskaia <kolga@netapp.com>

Add a tracepoint to the COPY operation.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
---
 fs/nfs/nfs42proc.c |   1 +
 fs/nfs/nfs4trace.h | 101 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 102 insertions(+)

diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c
index c36824888601..a072cdaf7bdc 100644
--- a/fs/nfs/nfs42proc.c
+++ b/fs/nfs/nfs42proc.c
@@ -367,6 +367,7 @@ static ssize_t _nfs42_proc_copy(struct file *src,
 
 	status = nfs4_call_sync(dst_server->client, dst_server, &msg,
 				&args->seq_args, &res->seq_res, 0);
+	trace_nfs4_copy(src_inode, dst_inode, args, res, nss, status);
 	if (status == -ENOTSUPP)
 		dst_server->caps &= ~NFS_CAP_COPY;
 	if (status)
diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
index ba338ee4a82b..4beb59d78ff3 100644
--- a/fs/nfs/nfs4trace.h
+++ b/fs/nfs/nfs4trace.h
@@ -2540,6 +2540,107 @@ DECLARE_EVENT_CLASS(nfs4_sparse_event,
 DEFINE_NFS4_SPARSE_EVENT(nfs4_fallocate);
 DEFINE_NFS4_SPARSE_EVENT(nfs4_deallocate);
 
+TRACE_EVENT(nfs4_copy,
+		TP_PROTO(
+			const struct inode *src_inode,
+			const struct inode *dst_inode,
+			const struct nfs42_copy_args *args,
+			const struct nfs42_copy_res *res,
+			const struct nl4_server *nss,
+			int error
+		),
+
+		TP_ARGS(src_inode, dst_inode, args, res, nss, error),
+
+		TP_STRUCT__entry(
+			__field(unsigned long, error)
+			__field(u32, src_fhandle)
+			__field(u32, src_fileid)
+			__field(u32, dst_fhandle)
+			__field(u32, dst_fileid)
+			__field(dev_t, src_dev)
+			__field(dev_t, dst_dev)
+			__field(int, src_stateid_seq)
+			__field(u32, src_stateid_hash)
+			__field(int, dst_stateid_seq)
+			__field(u32, dst_stateid_hash)
+			__field(loff_t, src_offset)
+			__field(loff_t, dst_offset)
+			__field(bool, sync)
+			__field(loff_t, len)
+			__field(int, res_stateid_seq)
+			__field(u32, res_stateid_hash)
+			__field(loff_t, res_count)
+			__field(bool, res_sync)
+			__field(bool, res_cons)
+			__field(bool, intra)
+		),
+
+		TP_fast_assign(
+			const struct nfs_inode *src_nfsi = NFS_I(src_inode);
+			const struct nfs_inode *dst_nfsi = NFS_I(dst_inode);
+
+			__entry->src_fileid = src_nfsi->fileid;
+			__entry->src_dev = src_inode->i_sb->s_dev;
+			__entry->src_fhandle = nfs_fhandle_hash(args->src_fh);
+			__entry->src_offset = args->src_pos;
+			__entry->dst_fileid = dst_nfsi->fileid;
+			__entry->dst_dev = dst_inode->i_sb->s_dev;
+			__entry->dst_fhandle = nfs_fhandle_hash(args->dst_fh);
+			__entry->dst_offset = args->dst_pos;
+			__entry->len = args->count;
+			__entry->sync = args->sync;
+			__entry->error = error < 0 ? -error : 0;
+			__entry->src_stateid_seq =
+				be32_to_cpu(args->src_stateid.seqid);
+			__entry->src_stateid_hash =
+				nfs_stateid_hash(&args->src_stateid);
+			__entry->dst_stateid_seq =
+				be32_to_cpu(args->dst_stateid.seqid);
+			__entry->dst_stateid_hash =
+				nfs_stateid_hash(&args->dst_stateid);
+			__entry->res_stateid_seq = error < 0 ? 0 :
+				be32_to_cpu(res->write_res.stateid.seqid);
+			__entry->res_stateid_hash = error < 0 ? 0 :
+				nfs_stateid_hash(&res->write_res.stateid);
+			__entry->res_count = error < 0 ? 0 :
+				res->write_res.count;
+			__entry->res_sync = error < 0 ? 0 :
+				res->synchronous;
+			__entry->res_cons = error < 0 ? 0 :
+				res->consecutive;
+			__entry->intra = nss ? 0 : 1;
+		),
+
+		TP_printk(
+			"error=%ld (%s) intra=%d src_fileid=%02x:%02x:%llu "
+			"src_fhandle=0x%08x dst_fileid=%02x:%02x:%llu "
+			"dst_fhandle=0x%08x src_stateid=%d:0x%08x "
+			"dst_stateid=%d:0x%08x src_offset=%llu dst_offset=%llu "
+			"len=%llu sync=%d cb_stateid=%d:0x%08x res_sync=%d "
+			"res_cons=%d res_count=%llu",
+			-__entry->error,
+			show_nfsv4_errors(__entry->error),
+			__entry->intra,
+			MAJOR(__entry->src_dev), MINOR(__entry->src_dev),
+			(unsigned long long)__entry->src_fileid,
+			__entry->src_fhandle,
+			MAJOR(__entry->dst_dev), MINOR(__entry->dst_dev),
+			(unsigned long long)__entry->dst_fileid,
+			__entry->dst_fhandle,
+			__entry->src_stateid_seq, __entry->src_stateid_hash,
+			__entry->dst_stateid_seq, __entry->dst_stateid_hash,
+			__entry->src_offset,
+			__entry->dst_offset,
+			__entry->len,
+			__entry->sync,
+			__entry->res_stateid_seq, __entry->res_stateid_hash,
+			__entry->res_sync,
+			__entry->res_cons,
+			__entry->res_count
+		)
+);
+
 #endif /* CONFIG_NFS_V4_1 */
 
 #endif /* _TRACE_NFS4_H */
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 4/7] NFSv4.2 add tracepoint to CLONE
  2021-10-18 22:03 [PATCH 0/7] NFSv4.2 add tracepoints to sparse files and copy Olga Kornievskaia
                   ` (2 preceding siblings ...)
  2021-10-18 22:03 ` [PATCH 3/7] NFSv4.2 add tracepoint to COPY Olga Kornievskaia
@ 2021-10-18 22:03 ` Olga Kornievskaia
  2021-10-18 22:03 ` [PATCH 5/7] NFSv4.2 add tracepoint to CB_OFFLOAD Olga Kornievskaia
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Olga Kornievskaia @ 2021-10-18 22:03 UTC (permalink / raw)
  To: trond.myklebust, anna.schumaker, steved; +Cc: linux-nfs

From: Olga Kornievskaia <kolga@netapp.com>

Add a tracepoint to the CLONE operation.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
---
 fs/nfs/nfs42proc.c |  1 +
 fs/nfs/nfs4trace.h | 73 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 74 insertions(+)

diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c
index a072cdaf7bdc..d3d9ea71702f 100644
--- a/fs/nfs/nfs42proc.c
+++ b/fs/nfs/nfs42proc.c
@@ -1077,6 +1077,7 @@ static int _nfs42_proc_clone(struct rpc_message *msg, struct file *src_f,
 
 	status = nfs4_call_sync(server->client, server, msg,
 				&args.seq_args, &res.seq_res, 0);
+	trace_nfs4_clone(src_inode, dst_inode, &args, status);
 	if (status == 0) {
 		nfs42_copy_dest_done(dst_inode, dst_offset, count);
 		status = nfs_post_op_update_inode(dst_inode, res.dst_fattr);
diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
index 4beb59d78ff3..cc6537a20ebe 100644
--- a/fs/nfs/nfs4trace.h
+++ b/fs/nfs/nfs4trace.h
@@ -2641,6 +2641,79 @@ TRACE_EVENT(nfs4_copy,
 		)
 );
 
+TRACE_EVENT(nfs4_clone,
+		TP_PROTO(
+			const struct inode *src_inode,
+			const struct inode *dst_inode,
+			const struct nfs42_clone_args *args,
+			int error
+		),
+
+		TP_ARGS(src_inode, dst_inode, args, error),
+
+		TP_STRUCT__entry(
+			__field(unsigned long, error)
+			__field(u32, src_fhandle)
+			__field(u32, src_fileid)
+			__field(u32, dst_fhandle)
+			__field(u32, dst_fileid)
+			__field(dev_t, src_dev)
+			__field(dev_t, dst_dev)
+			__field(loff_t, src_offset)
+			__field(loff_t, dst_offset)
+			__field(int, src_stateid_seq)
+			__field(u32, src_stateid_hash)
+			__field(int, dst_stateid_seq)
+			__field(u32, dst_stateid_hash)
+			__field(loff_t, len)
+		),
+
+		TP_fast_assign(
+			const struct nfs_inode *src_nfsi = NFS_I(src_inode);
+			const struct nfs_inode *dst_nfsi = NFS_I(dst_inode);
+
+			__entry->src_fileid = src_nfsi->fileid;
+			__entry->src_dev = src_inode->i_sb->s_dev;
+			__entry->src_fhandle = nfs_fhandle_hash(args->src_fh);
+			__entry->src_offset = args->src_offset;
+			__entry->dst_fileid = dst_nfsi->fileid;
+			__entry->dst_dev = dst_inode->i_sb->s_dev;
+			__entry->dst_fhandle = nfs_fhandle_hash(args->dst_fh);
+			__entry->dst_offset = args->dst_offset;
+			__entry->len = args->count;
+			__entry->error = error < 0 ? -error : 0;
+			__entry->src_stateid_seq =
+				be32_to_cpu(args->src_stateid.seqid);
+			__entry->src_stateid_hash =
+				nfs_stateid_hash(&args->src_stateid);
+			__entry->dst_stateid_seq =
+				be32_to_cpu(args->dst_stateid.seqid);
+			__entry->dst_stateid_hash =
+				nfs_stateid_hash(&args->dst_stateid);
+		),
+
+		TP_printk(
+			"error=%ld (%s) src_fileid=%02x:%02x:%llu "
+			"src_fhandle=0x%08x dst_fileid=%02x:%02x:%llu "
+			"dst_fhandle=0x%08x src_stateid=%d:0x%08x "
+			"dst_stateid=%d:0x%08x src_offset=%llu "
+			"dst_offset=%llu len=%llu",
+			-__entry->error,
+			show_nfsv4_errors(__entry->error),
+			MAJOR(__entry->src_dev), MINOR(__entry->src_dev),
+			(unsigned long long)__entry->src_fileid,
+			__entry->src_fhandle,
+			MAJOR(__entry->dst_dev), MINOR(__entry->dst_dev),
+			(unsigned long long)__entry->dst_fileid,
+			__entry->dst_fhandle,
+			__entry->src_stateid_seq, __entry->src_stateid_hash,
+			__entry->dst_stateid_seq, __entry->dst_stateid_hash,
+			__entry->src_offset,
+			__entry->dst_offset,
+			__entry->len
+		)
+);
+
 #endif /* CONFIG_NFS_V4_1 */
 
 #endif /* _TRACE_NFS4_H */
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 5/7] NFSv4.2 add tracepoint to CB_OFFLOAD
  2021-10-18 22:03 [PATCH 0/7] NFSv4.2 add tracepoints to sparse files and copy Olga Kornievskaia
                   ` (3 preceding siblings ...)
  2021-10-18 22:03 ` [PATCH 4/7] NFSv4.2 add tracepoint to CLONE Olga Kornievskaia
@ 2021-10-18 22:03 ` Olga Kornievskaia
  2021-10-19 15:16   ` Chuck Lever III
  2021-10-18 22:03 ` [PATCH 6/7] NFSv4.2 add tracepoint to COPY_NOTIFY Olga Kornievskaia
  2021-10-18 22:03 ` [PATCH 7/7] NFSv4.2 add tracepoint to OFFLOAD_CANCEL Olga Kornievskaia
  6 siblings, 1 reply; 17+ messages in thread
From: Olga Kornievskaia @ 2021-10-18 22:03 UTC (permalink / raw)
  To: trond.myklebust, anna.schumaker, steved; +Cc: linux-nfs

From: Olga Kornievskaia <kolga@netapp.com>

Add a tracepoint to the CB_OFFLOAD operation.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
---
 fs/nfs/callback_proc.c |  3 +++
 fs/nfs/nfs4trace.h     | 50 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+)

diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index ed9d580826f5..09c5b1cb3e07 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -739,6 +739,9 @@ __be32 nfs4_callback_offload(void *data, void *dummy,
 		kfree(copy);
 	spin_unlock(&cps->clp->cl_lock);
 
+	trace_nfs4_cb_offload(&args->coa_fh, &args->coa_stateid,
+			args->wr_count, args->error,
+			args->wr_writeverf.committed);
 	return 0;
 }
 #endif /* CONFIG_NFS_V4_2 */
diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
index cc6537a20ebe..33f52d486528 100644
--- a/fs/nfs/nfs4trace.h
+++ b/fs/nfs/nfs4trace.h
@@ -2714,6 +2714,56 @@ TRACE_EVENT(nfs4_clone,
 		)
 );
 
+#define show_write_mode(how)			\
+        __print_symbolic(how,			\
+                { NFS_UNSTABLE, "UNSTABLE" },	\
+                { NFS_DATA_SYNC, "DATA_SYNC" },	\
+		{ NFS_FILE_SYNC, "FILE_SYNC"})
+
+TRACE_EVENT(nfs4_cb_offload,
+		TP_PROTO(
+			const struct nfs_fh *cb_fh,
+			const nfs4_stateid *cb_stateid,
+			uint64_t cb_count,
+			int cb_error,
+			int cb_how_stable
+		),
+
+		TP_ARGS(cb_fh, cb_stateid, cb_count, cb_error,
+			cb_how_stable),
+
+		TP_STRUCT__entry(
+			__field(unsigned long, error)
+			__field(u32, fhandle)
+			__field(loff_t, cb_count)
+			__field(int, cb_how)
+			__field(int, cb_stateid_seq)
+			__field(u32, cb_stateid_hash)
+		),
+
+		TP_fast_assign(
+			__entry->error = cb_error < 0 ? -cb_error : 0;
+			__entry->fhandle = nfs_fhandle_hash(cb_fh);
+			__entry->cb_stateid_seq =
+				be32_to_cpu(cb_stateid->seqid);
+			__entry->cb_stateid_hash =
+				nfs_stateid_hash(cb_stateid);
+			__entry->cb_count = cb_count;
+			__entry->cb_how = cb_how_stable;
+		),
+
+		TP_printk(
+			"error=%ld (%s) fhandle=0x%08x cb_stateid=%d:0x%08x "
+			"cb_count=%llu cb_how=%s",
+			-__entry->error,
+			show_nfsv4_errors(__entry->error),
+			__entry->fhandle,
+			__entry->cb_stateid_seq, __entry->cb_stateid_hash,
+			__entry->cb_count,
+			show_write_mode(__entry->cb_how)
+		)
+);
+
 #endif /* CONFIG_NFS_V4_1 */
 
 #endif /* _TRACE_NFS4_H */
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 6/7] NFSv4.2 add tracepoint to COPY_NOTIFY
  2021-10-18 22:03 [PATCH 0/7] NFSv4.2 add tracepoints to sparse files and copy Olga Kornievskaia
                   ` (4 preceding siblings ...)
  2021-10-18 22:03 ` [PATCH 5/7] NFSv4.2 add tracepoint to CB_OFFLOAD Olga Kornievskaia
@ 2021-10-18 22:03 ` Olga Kornievskaia
  2021-10-18 22:03 ` [PATCH 7/7] NFSv4.2 add tracepoint to OFFLOAD_CANCEL Olga Kornievskaia
  6 siblings, 0 replies; 17+ messages in thread
From: Olga Kornievskaia @ 2021-10-18 22:03 UTC (permalink / raw)
  To: trond.myklebust, anna.schumaker, steved; +Cc: linux-nfs

From: Olga Kornievskaia <kolga@netapp.com>

Add a tracepoint to COPY_NOTIFY operation.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
---
 fs/nfs/nfs42proc.c |  1 +
 fs/nfs/nfs4trace.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+)

diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c
index d3d9ea71702f..7c7399b10050 100644
--- a/fs/nfs/nfs42proc.c
+++ b/fs/nfs/nfs42proc.c
@@ -603,6 +603,7 @@ static int _nfs42_proc_copy_notify(struct file *src, struct file *dst,
 
 	status = nfs4_call_sync(src_server->client, src_server, &msg,
 				&args->cna_seq_args, &res->cnr_seq_res, 0);
+	trace_nfs4_copy_notify(file_inode(src), args, res, status);
 	if (status == -ENOTSUPP)
 		src_server->caps &= ~NFS_CAP_COPY_NOTIFY;
 
diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
index 33f52d486528..2741e12746b2 100644
--- a/fs/nfs/nfs4trace.h
+++ b/fs/nfs/nfs4trace.h
@@ -2764,6 +2764,56 @@ TRACE_EVENT(nfs4_cb_offload,
 		)
 );
 
+TRACE_EVENT(nfs4_copy_notify,
+		TP_PROTO(
+			const struct inode *inode,
+			const struct nfs42_copy_notify_args *args,
+			const struct nfs42_copy_notify_res *res,
+			int error
+		),
+
+		TP_ARGS(inode, args, res, error),
+
+		TP_STRUCT__entry(
+			__field(unsigned long, error)
+			__field(u32, fhandle)
+			__field(u32, fileid)
+			__field(dev_t, dev)
+			__field(int, stateid_seq)
+			__field(u32, stateid_hash)
+			__field(int, res_stateid_seq)
+			__field(u32, res_stateid_hash)
+		),
+
+		TP_fast_assign(
+			const struct nfs_inode *nfsi = NFS_I(inode);
+
+			__entry->fileid = nfsi->fileid;
+			__entry->dev = inode->i_sb->s_dev;
+			__entry->fhandle = nfs_fhandle_hash(args->cna_src_fh);
+			__entry->error = error < 0 ? -error : 0;
+			__entry->stateid_seq =
+				be32_to_cpu(args->cna_src_stateid.seqid);
+			__entry->stateid_hash =
+				nfs_stateid_hash(&args->cna_src_stateid);
+			__entry->res_stateid_seq = error < 0 ? 0 :
+				be32_to_cpu(res->cnr_stateid.seqid);
+			__entry->res_stateid_hash = error < 0 ? 0 :
+				nfs_stateid_hash(&res->cnr_stateid);
+		),
+
+		TP_printk(
+			"error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
+			"stateid=%d:0x%08x res_stateid=%d:0x%08x",
+			-__entry->error,
+			show_nfsv4_errors(__entry->error),
+			MAJOR(__entry->dev), MINOR(__entry->dev),
+			(unsigned long long)__entry->fileid,
+			__entry->fhandle,
+			__entry->stateid_seq, __entry->stateid_hash,
+			__entry->res_stateid_seq, __entry->res_stateid_hash
+		)
+);
 #endif /* CONFIG_NFS_V4_1 */
 
 #endif /* _TRACE_NFS4_H */
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 7/7] NFSv4.2 add tracepoint to OFFLOAD_CANCEL
  2021-10-18 22:03 [PATCH 0/7] NFSv4.2 add tracepoints to sparse files and copy Olga Kornievskaia
                   ` (5 preceding siblings ...)
  2021-10-18 22:03 ` [PATCH 6/7] NFSv4.2 add tracepoint to COPY_NOTIFY Olga Kornievskaia
@ 2021-10-18 22:03 ` Olga Kornievskaia
  6 siblings, 0 replies; 17+ messages in thread
From: Olga Kornievskaia @ 2021-10-18 22:03 UTC (permalink / raw)
  To: trond.myklebust, anna.schumaker, steved; +Cc: linux-nfs

From: Olga Kornievskaia <kolga@netapp.com>

Add tracepoint to OFFLOAD_CANCEL operation.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
---
 fs/nfs/nfs42proc.c |  1 +
 fs/nfs/nfs4trace.h | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+)

diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c
index 7c7399b10050..08355b66e7cb 100644
--- a/fs/nfs/nfs42proc.c
+++ b/fs/nfs/nfs42proc.c
@@ -509,6 +509,7 @@ static void nfs42_offload_cancel_done(struct rpc_task *task, void *calldata)
 {
 	struct nfs42_offloadcancel_data *data = calldata;
 
+	trace_nfs4_offload_cancel(&data->args, task->tk_status);
 	nfs41_sequence_done(task, &data->res.osr_seq_res);
 	if (task->tk_status &&
 		nfs4_async_handle_error(task, data->seq_server, NULL,
diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
index 2741e12746b2..476420a7985a 100644
--- a/fs/nfs/nfs4trace.h
+++ b/fs/nfs/nfs4trace.h
@@ -2814,6 +2814,39 @@ TRACE_EVENT(nfs4_copy_notify,
 			__entry->res_stateid_seq, __entry->res_stateid_hash
 		)
 );
+
+TRACE_EVENT(nfs4_offload_cancel,
+		TP_PROTO(
+			const struct nfs42_offload_status_args *args,
+			int error
+		),
+
+		TP_ARGS(args, error),
+
+		TP_STRUCT__entry(
+			__field(unsigned long, error)
+			__field(u32, fhandle)
+			__field(int, stateid_seq)
+			__field(u32, stateid_hash)
+		),
+
+		TP_fast_assign(
+			__entry->fhandle = nfs_fhandle_hash(args->osa_src_fh);
+			__entry->error = error < 0 ? -error : 0;
+			__entry->stateid_seq =
+				be32_to_cpu(args->osa_stateid.seqid);
+			__entry->stateid_hash =
+				nfs_stateid_hash(&args->osa_stateid);
+		),
+
+		TP_printk(
+			"error=%ld (%s) fhandle=0x%08x stateid=%d:0x%08x",
+			-__entry->error,
+			show_nfsv4_errors(__entry->error),
+			__entry->fhandle,
+			__entry->stateid_seq, __entry->stateid_hash
+		)
+);
 #endif /* CONFIG_NFS_V4_1 */
 
 #endif /* _TRACE_NFS4_H */
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 5/7] NFSv4.2 add tracepoint to CB_OFFLOAD
  2021-10-18 22:03 ` [PATCH 5/7] NFSv4.2 add tracepoint to CB_OFFLOAD Olga Kornievskaia
@ 2021-10-19 15:16   ` Chuck Lever III
  2021-10-19 16:01     ` Olga Kornievskaia
  0 siblings, 1 reply; 17+ messages in thread
From: Chuck Lever III @ 2021-10-19 15:16 UTC (permalink / raw)
  To: Olga Kornievskaia
  Cc: Trond Myklebust, Anna Schumaker, Steve Dickson,
	Linux NFS Mailing List



> On Oct 18, 2021, at 6:03 PM, Olga Kornievskaia <olga.kornievskaia@gmail.com> wrote:
> 
> From: Olga Kornievskaia <kolga@netapp.com>
> 
> Add a tracepoint to the CB_OFFLOAD operation.
> 
> Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
> ---
> fs/nfs/callback_proc.c |  3 +++
> fs/nfs/nfs4trace.h     | 50 ++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 53 insertions(+)
> 
> diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
> index ed9d580826f5..09c5b1cb3e07 100644
> --- a/fs/nfs/callback_proc.c
> +++ b/fs/nfs/callback_proc.c
> @@ -739,6 +739,9 @@ __be32 nfs4_callback_offload(void *data, void *dummy,
> 		kfree(copy);
> 	spin_unlock(&cps->clp->cl_lock);
> 
> +	trace_nfs4_cb_offload(&args->coa_fh, &args->coa_stateid,
> +			args->wr_count, args->error,
> +			args->wr_writeverf.committed);
> 	return 0;
> }
> #endif /* CONFIG_NFS_V4_2 */
> diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
> index cc6537a20ebe..33f52d486528 100644
> --- a/fs/nfs/nfs4trace.h
> +++ b/fs/nfs/nfs4trace.h
> @@ -2714,6 +2714,56 @@ TRACE_EVENT(nfs4_clone,
> 		)
> );
> 
> +#define show_write_mode(how)			\
> +        __print_symbolic(how,			\
> +                { NFS_UNSTABLE, "UNSTABLE" },	\
> +                { NFS_DATA_SYNC, "DATA_SYNC" },	\
> +		{ NFS_FILE_SYNC, "FILE_SYNC"})

Is there no way to reuse fs/nfs/nfstrace.h::nfs_show_stable() ?

Btw, I have patches that move some NFS trace infrastructure
into include/trace/events so that it can be shared between the
NFS client and server trace subsystems. They might be useful
here too.

The generic FS macros are moved in this commit:

https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git/commit/?h=nfsd-more-tracepoints&id=495731e1332c7e26af1e04a88eb65e3c08dfbf53

Some NFS macros are moved in this commit:

https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git/commit/?h=nfsd-more-tracepoints&id=24763f8889e0a18a8d06ddcd05bac06a7d043515

Additional macros are introduced later in that same branch.

I don't have any opinion about whether these should be
applied before your patches or after them.


> +
> +TRACE_EVENT(nfs4_cb_offload,
> +		TP_PROTO(
> +			const struct nfs_fh *cb_fh,
> +			const nfs4_stateid *cb_stateid,
> +			uint64_t cb_count,
> +			int cb_error,
> +			int cb_how_stable
> +		),
> +
> +		TP_ARGS(cb_fh, cb_stateid, cb_count, cb_error,
> +			cb_how_stable),
> +
> +		TP_STRUCT__entry(
> +			__field(unsigned long, error)
> +			__field(u32, fhandle)
> +			__field(loff_t, cb_count)
> +			__field(int, cb_how)
> +			__field(int, cb_stateid_seq)
> +			__field(u32, cb_stateid_hash)
> +		),
> +
> +		TP_fast_assign(
> +			__entry->error = cb_error < 0 ? -cb_error : 0;
> +			__entry->fhandle = nfs_fhandle_hash(cb_fh);
> +			__entry->cb_stateid_seq =
> +				be32_to_cpu(cb_stateid->seqid);
> +			__entry->cb_stateid_hash =
> +				nfs_stateid_hash(cb_stateid);
> +			__entry->cb_count = cb_count;
> +			__entry->cb_how = cb_how_stable;
> +		),
> +
> +		TP_printk(
> +			"error=%ld (%s) fhandle=0x%08x cb_stateid=%d:0x%08x "
> +			"cb_count=%llu cb_how=%s",
> +			-__entry->error,
> +			show_nfsv4_errors(__entry->error),
> +			__entry->fhandle,
> +			__entry->cb_stateid_seq, __entry->cb_stateid_hash,
> +			__entry->cb_count,
> +			show_write_mode(__entry->cb_how)
> +		)
> +);
> +
> #endif /* CONFIG_NFS_V4_1 */
> 
> #endif /* _TRACE_NFS4_H */
> -- 
> 2.27.0
> 

--
Chuck Lever




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/7] NFSv4.2 add tracepoint to COPY
  2021-10-18 22:03 ` [PATCH 3/7] NFSv4.2 add tracepoint to COPY Olga Kornievskaia
@ 2021-10-19 15:31   ` Chuck Lever III
  2021-10-19 15:51     ` Olga Kornievskaia
  2021-10-27 14:28   ` kernel test robot
  1 sibling, 1 reply; 17+ messages in thread
From: Chuck Lever III @ 2021-10-19 15:31 UTC (permalink / raw)
  To: Olga Kornievskaia
  Cc: trond.myklebust@hammerspace.com, Anna Schumaker, Steve Dickson,
	Linux NFS Mailing List



> On Oct 18, 2021, at 6:03 PM, Olga Kornievskaia <olga.kornievskaia@gmail.com> wrote:
> 
> From: Olga Kornievskaia <kolga@netapp.com>
> 
> Add a tracepoint to the COPY operation.
> 
> Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
> ---
> fs/nfs/nfs42proc.c |   1 +
> fs/nfs/nfs4trace.h | 101 +++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 102 insertions(+)
> 
> diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c
> index c36824888601..a072cdaf7bdc 100644
> --- a/fs/nfs/nfs42proc.c
> +++ b/fs/nfs/nfs42proc.c
> @@ -367,6 +367,7 @@ static ssize_t _nfs42_proc_copy(struct file *src,
> 
> 	status = nfs4_call_sync(dst_server->client, dst_server, &msg,
> 				&args->seq_args, &res->seq_res, 0);
> +	trace_nfs4_copy(src_inode, dst_inode, args, res, nss, status);

There seems to be a lot of logic in _nfs42_proc_copy() that
happens after this tracepoint. Are you sure this is the
best placement, or do you want to capture failures that
might happen in the subsequent logic?


> 	if (status == -ENOTSUPP)
> 		dst_server->caps &= ~NFS_CAP_COPY;
> 	if (status)
> diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
> index ba338ee4a82b..4beb59d78ff3 100644
> --- a/fs/nfs/nfs4trace.h
> +++ b/fs/nfs/nfs4trace.h
> @@ -2540,6 +2540,107 @@ DECLARE_EVENT_CLASS(nfs4_sparse_event,
> DEFINE_NFS4_SPARSE_EVENT(nfs4_fallocate);
> DEFINE_NFS4_SPARSE_EVENT(nfs4_deallocate);
> 
> +TRACE_EVENT(nfs4_copy,
> +		TP_PROTO(
> +			const struct inode *src_inode,
> +			const struct inode *dst_inode,
> +			const struct nfs42_copy_args *args,
> +			const struct nfs42_copy_res *res,
> +			const struct nl4_server *nss,
> +			int error
> +		),
> +
> +		TP_ARGS(src_inode, dst_inode, args, res, nss, error),
> +
> +		TP_STRUCT__entry(
> +			__field(unsigned long, error)
> +			__field(u32, src_fhandle)
> +			__field(u32, src_fileid)
> +			__field(u32, dst_fhandle)
> +			__field(u32, dst_fileid)
> +			__field(dev_t, src_dev)
> +			__field(dev_t, dst_dev)
> +			__field(int, src_stateid_seq)
> +			__field(u32, src_stateid_hash)
> +			__field(int, dst_stateid_seq)
> +			__field(u32, dst_stateid_hash)
> +			__field(loff_t, src_offset)
> +			__field(loff_t, dst_offset)
> +			__field(bool, sync)
> +			__field(loff_t, len)
> +			__field(int, res_stateid_seq)
> +			__field(u32, res_stateid_hash)
> +			__field(loff_t, res_count)
> +			__field(bool, res_sync)
> +			__field(bool, res_cons)
> +			__field(bool, intra)
> +		),
> +
> +		TP_fast_assign(
> +			const struct nfs_inode *src_nfsi = NFS_I(src_inode);
> +			const struct nfs_inode *dst_nfsi = NFS_I(dst_inode);
> +
> +			__entry->src_fileid = src_nfsi->fileid;
> +			__entry->src_dev = src_inode->i_sb->s_dev;
> +			__entry->src_fhandle = nfs_fhandle_hash(args->src_fh);
> +			__entry->src_offset = args->src_pos;
> +			__entry->dst_fileid = dst_nfsi->fileid;
> +			__entry->dst_dev = dst_inode->i_sb->s_dev;
> +			__entry->dst_fhandle = nfs_fhandle_hash(args->dst_fh);
> +			__entry->dst_offset = args->dst_pos;
> +			__entry->len = args->count;
> +			__entry->sync = args->sync;
> +			__entry->error = error < 0 ? -error : 0;
> +			__entry->src_stateid_seq =
> +				be32_to_cpu(args->src_stateid.seqid);
> +			__entry->src_stateid_hash =
> +				nfs_stateid_hash(&args->src_stateid);
> +			__entry->dst_stateid_seq =
> +				be32_to_cpu(args->dst_stateid.seqid);
> +			__entry->dst_stateid_hash =
> +				nfs_stateid_hash(&args->dst_stateid);
> +			__entry->res_stateid_seq = error < 0 ? 0 :
> +				be32_to_cpu(res->write_res.stateid.seqid);
> +			__entry->res_stateid_hash = error < 0 ? 0 :
> +				nfs_stateid_hash(&res->write_res.stateid);
> +			__entry->res_count = error < 0 ? 0 :
> +				res->write_res.count;
> +			__entry->res_sync = error < 0 ? 0 :
> +				res->synchronous;
> +			__entry->res_cons = error < 0 ? 0 :
> +				res->consecutive;
> +			__entry->intra = nss ? 0 : 1;
> +		),

I have some general comments about the ternaries here
and in some of the other patches.

At the very least you should instead have a single check:

	if (error) {
		/* record all the error values */
	} else {
		/* record zeroes */
	}

Although, I recommend a different approach entirely,
and that is to to have /two/ trace points: one for
the success case and one for the error case. That
way the error case can be enabled persistently, as
appropriate, and the success case can be used for
general debugging, which ought to be rare once the
code is working well and we have good error reporting
in user space.

In some instances (maybe not here in copy), the
success tracepoint is completely unnecessary for
everyday operation and can be omitted.

What's your thought about that?


> +
> +		TP_printk(
> +			"error=%ld (%s) intra=%d src_fileid=%02x:%02x:%llu "
> +			"src_fhandle=0x%08x dst_fileid=%02x:%02x:%llu "
> +			"dst_fhandle=0x%08x src_stateid=%d:0x%08x "
> +			"dst_stateid=%d:0x%08x src_offset=%llu dst_offset=%llu "
> +			"len=%llu sync=%d cb_stateid=%d:0x%08x res_sync=%d "
> +			"res_cons=%d res_count=%llu",
> +			-__entry->error,
> +			show_nfsv4_errors(__entry->error),
> +			__entry->intra,
> +			MAJOR(__entry->src_dev), MINOR(__entry->src_dev),
> +			(unsigned long long)__entry->src_fileid,
> +			__entry->src_fhandle,
> +			MAJOR(__entry->dst_dev), MINOR(__entry->dst_dev),
> +			(unsigned long long)__entry->dst_fileid,
> +			__entry->dst_fhandle,
> +			__entry->src_stateid_seq, __entry->src_stateid_hash,
> +			__entry->dst_stateid_seq, __entry->dst_stateid_hash,
> +			__entry->src_offset,
> +			__entry->dst_offset,
> +			__entry->len,
> +			__entry->sync,
> +			__entry->res_stateid_seq, __entry->res_stateid_hash,
> +			__entry->res_sync,
> +			__entry->res_cons,
> +			__entry->res_count
> +		)
> +);
> +
> #endif /* CONFIG_NFS_V4_1 */
> 
> #endif /* _TRACE_NFS4_H */
> -- 
> 2.27.0
> 

--
Chuck Lever




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/7] NFSv4.2 add tracepoint to COPY
  2021-10-19 15:31   ` Chuck Lever III
@ 2021-10-19 15:51     ` Olga Kornievskaia
  2021-10-19 16:01       ` Chuck Lever III
  0 siblings, 1 reply; 17+ messages in thread
From: Olga Kornievskaia @ 2021-10-19 15:51 UTC (permalink / raw)
  To: Chuck Lever III
  Cc: trond.myklebust@hammerspace.com, Anna Schumaker, Steve Dickson,
	Linux NFS Mailing List

On Tue, Oct 19, 2021 at 11:31 AM Chuck Lever III <chuck.lever@oracle.com> wrote:
>
>
>
> > On Oct 18, 2021, at 6:03 PM, Olga Kornievskaia <olga.kornievskaia@gmail.com> wrote:
> >
> > From: Olga Kornievskaia <kolga@netapp.com>
> >
> > Add a tracepoint to the COPY operation.
> >
> > Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
> > ---
> > fs/nfs/nfs42proc.c |   1 +
> > fs/nfs/nfs4trace.h | 101 +++++++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 102 insertions(+)
> >
> > diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c
> > index c36824888601..a072cdaf7bdc 100644
> > --- a/fs/nfs/nfs42proc.c
> > +++ b/fs/nfs/nfs42proc.c
> > @@ -367,6 +367,7 @@ static ssize_t _nfs42_proc_copy(struct file *src,
> >
> >       status = nfs4_call_sync(dst_server->client, dst_server, &msg,
> >                               &args->seq_args, &res->seq_res, 0);
> > +     trace_nfs4_copy(src_inode, dst_inode, args, res, nss, status);
>
> There seems to be a lot of logic in _nfs42_proc_copy() that
> happens after this tracepoint. Are you sure this is the
> best placement, or do you want to capture failures that
> might happen in the subsequent logic?

I do believe this is the right place for the COPY tracepoint. There
are 3 more logical decisions after that. (1) dealing with synchronous
copy with an incorrect verifier -- perhaps that warrants a separate
tracepoints as a generic COPY doesn't capture verifier information at
all, (2) deals with completion of async copy but for that we have a
tracepoint in the callback, and (3) handling commit after copy but
that has a commit tracepoint in the COMMIT operation.

> >       if (status == -ENOTSUPP)
> >               dst_server->caps &= ~NFS_CAP_COPY;
> >       if (status)
> > diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
> > index ba338ee4a82b..4beb59d78ff3 100644
> > --- a/fs/nfs/nfs4trace.h
> > +++ b/fs/nfs/nfs4trace.h
> > @@ -2540,6 +2540,107 @@ DECLARE_EVENT_CLASS(nfs4_sparse_event,
> > DEFINE_NFS4_SPARSE_EVENT(nfs4_fallocate);
> > DEFINE_NFS4_SPARSE_EVENT(nfs4_deallocate);
> >
> > +TRACE_EVENT(nfs4_copy,
> > +             TP_PROTO(
> > +                     const struct inode *src_inode,
> > +                     const struct inode *dst_inode,
> > +                     const struct nfs42_copy_args *args,
> > +                     const struct nfs42_copy_res *res,
> > +                     const struct nl4_server *nss,
> > +                     int error
> > +             ),
> > +
> > +             TP_ARGS(src_inode, dst_inode, args, res, nss, error),
> > +
> > +             TP_STRUCT__entry(
> > +                     __field(unsigned long, error)
> > +                     __field(u32, src_fhandle)
> > +                     __field(u32, src_fileid)
> > +                     __field(u32, dst_fhandle)
> > +                     __field(u32, dst_fileid)
> > +                     __field(dev_t, src_dev)
> > +                     __field(dev_t, dst_dev)
> > +                     __field(int, src_stateid_seq)
> > +                     __field(u32, src_stateid_hash)
> > +                     __field(int, dst_stateid_seq)
> > +                     __field(u32, dst_stateid_hash)
> > +                     __field(loff_t, src_offset)
> > +                     __field(loff_t, dst_offset)
> > +                     __field(bool, sync)
> > +                     __field(loff_t, len)
> > +                     __field(int, res_stateid_seq)
> > +                     __field(u32, res_stateid_hash)
> > +                     __field(loff_t, res_count)
> > +                     __field(bool, res_sync)
> > +                     __field(bool, res_cons)
> > +                     __field(bool, intra)
> > +             ),
> > +
> > +             TP_fast_assign(
> > +                     const struct nfs_inode *src_nfsi = NFS_I(src_inode);
> > +                     const struct nfs_inode *dst_nfsi = NFS_I(dst_inode);
> > +
> > +                     __entry->src_fileid = src_nfsi->fileid;
> > +                     __entry->src_dev = src_inode->i_sb->s_dev;
> > +                     __entry->src_fhandle = nfs_fhandle_hash(args->src_fh);
> > +                     __entry->src_offset = args->src_pos;
> > +                     __entry->dst_fileid = dst_nfsi->fileid;
> > +                     __entry->dst_dev = dst_inode->i_sb->s_dev;
> > +                     __entry->dst_fhandle = nfs_fhandle_hash(args->dst_fh);
> > +                     __entry->dst_offset = args->dst_pos;
> > +                     __entry->len = args->count;
> > +                     __entry->sync = args->sync;
> > +                     __entry->error = error < 0 ? -error : 0;
> > +                     __entry->src_stateid_seq =
> > +                             be32_to_cpu(args->src_stateid.seqid);
> > +                     __entry->src_stateid_hash =
> > +                             nfs_stateid_hash(&args->src_stateid);
> > +                     __entry->dst_stateid_seq =
> > +                             be32_to_cpu(args->dst_stateid.seqid);
> > +                     __entry->dst_stateid_hash =
> > +                             nfs_stateid_hash(&args->dst_stateid);
> > +                     __entry->res_stateid_seq = error < 0 ? 0 :
> > +                             be32_to_cpu(res->write_res.stateid.seqid);
> > +                     __entry->res_stateid_hash = error < 0 ? 0 :
> > +                             nfs_stateid_hash(&res->write_res.stateid);
> > +                     __entry->res_count = error < 0 ? 0 :
> > +                             res->write_res.count;
> > +                     __entry->res_sync = error < 0 ? 0 :
> > +                             res->synchronous;
> > +                     __entry->res_cons = error < 0 ? 0 :
> > +                             res->consecutive;
> > +                     __entry->intra = nss ? 0 : 1;
> > +             ),
>
> I have some general comments about the ternaries here
> and in some of the other patches.
>
> At the very least you should instead have a single check:
>
>         if (error) {
>                 /* record all the error values */
>         } else {
>                 /* record zeroes */
>         }
>
> Although, I recommend a different approach entirely,
> and that is to to have /two/ trace points: one for
> the success case and one for the error case. That
> way the error case can be enabled persistently, as
> appropriate, and the success case can be used for
> general debugging, which ought to be rare once the
> code is working well and we have good error reporting
> in user space.

I think I see what you are saying with having something like (in
nfs42proc.c in copy)
nfs4_call_sync()
if (status)
  trace_nfs4_copy_err()
else
  trace_nfs4_copy()

That would replace my checking for error and setting the field. I can
do that. But I'm not sure how to handle sharing of "call" arguments
that we'd want to display for both the error case tracepoint and
non-error case. If I'm missing an approach on how to can you please
share, or otherwise, in my revision I'd re-write using if (error)
approach and keep just a single tracepoint.

> In some instances (maybe not here in copy), the
> success tracepoint is completely unnecessary for
> everyday operation and can be omitted.
>
> What's your thought about that?
>
>
> > +
> > +             TP_printk(
> > +                     "error=%ld (%s) intra=%d src_fileid=%02x:%02x:%llu "
> > +                     "src_fhandle=0x%08x dst_fileid=%02x:%02x:%llu "
> > +                     "dst_fhandle=0x%08x src_stateid=%d:0x%08x "
> > +                     "dst_stateid=%d:0x%08x src_offset=%llu dst_offset=%llu "
> > +                     "len=%llu sync=%d cb_stateid=%d:0x%08x res_sync=%d "
> > +                     "res_cons=%d res_count=%llu",
> > +                     -__entry->error,
> > +                     show_nfsv4_errors(__entry->error),
> > +                     __entry->intra,
> > +                     MAJOR(__entry->src_dev), MINOR(__entry->src_dev),
> > +                     (unsigned long long)__entry->src_fileid,
> > +                     __entry->src_fhandle,
> > +                     MAJOR(__entry->dst_dev), MINOR(__entry->dst_dev),
> > +                     (unsigned long long)__entry->dst_fileid,
> > +                     __entry->dst_fhandle,
> > +                     __entry->src_stateid_seq, __entry->src_stateid_hash,
> > +                     __entry->dst_stateid_seq, __entry->dst_stateid_hash,
> > +                     __entry->src_offset,
> > +                     __entry->dst_offset,
> > +                     __entry->len,
> > +                     __entry->sync,
> > +                     __entry->res_stateid_seq, __entry->res_stateid_hash,
> > +                     __entry->res_sync,
> > +                     __entry->res_cons,
> > +                     __entry->res_count
> > +             )
> > +);
> > +
> > #endif /* CONFIG_NFS_V4_1 */
> >
> > #endif /* _TRACE_NFS4_H */
> > --
> > 2.27.0
> >
>
> --
> Chuck Lever
>
>
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 5/7] NFSv4.2 add tracepoint to CB_OFFLOAD
  2021-10-19 15:16   ` Chuck Lever III
@ 2021-10-19 16:01     ` Olga Kornievskaia
  2021-10-19 16:35       ` Chuck Lever III
  0 siblings, 1 reply; 17+ messages in thread
From: Olga Kornievskaia @ 2021-10-19 16:01 UTC (permalink / raw)
  To: Chuck Lever III
  Cc: Trond Myklebust, Anna Schumaker, Steve Dickson,
	Linux NFS Mailing List

On Tue, Oct 19, 2021 at 11:17 AM Chuck Lever III <chuck.lever@oracle.com> wrote:
>
>
>
> > On Oct 18, 2021, at 6:03 PM, Olga Kornievskaia <olga.kornievskaia@gmail.com> wrote:
> >
> > From: Olga Kornievskaia <kolga@netapp.com>
> >
> > Add a tracepoint to the CB_OFFLOAD operation.
> >
> > Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
> > ---
> > fs/nfs/callback_proc.c |  3 +++
> > fs/nfs/nfs4trace.h     | 50 ++++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 53 insertions(+)
> >
> > diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
> > index ed9d580826f5..09c5b1cb3e07 100644
> > --- a/fs/nfs/callback_proc.c
> > +++ b/fs/nfs/callback_proc.c
> > @@ -739,6 +739,9 @@ __be32 nfs4_callback_offload(void *data, void *dummy,
> >               kfree(copy);
> >       spin_unlock(&cps->clp->cl_lock);
> >
> > +     trace_nfs4_cb_offload(&args->coa_fh, &args->coa_stateid,
> > +                     args->wr_count, args->error,
> > +                     args->wr_writeverf.committed);
> >       return 0;
> > }
> > #endif /* CONFIG_NFS_V4_2 */
> > diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
> > index cc6537a20ebe..33f52d486528 100644
> > --- a/fs/nfs/nfs4trace.h
> > +++ b/fs/nfs/nfs4trace.h
> > @@ -2714,6 +2714,56 @@ TRACE_EVENT(nfs4_clone,
> >               )
> > );
> >
> > +#define show_write_mode(how)                 \
> > +        __print_symbolic(how,                        \
> > +                { NFS_UNSTABLE, "UNSTABLE" },        \
> > +                { NFS_DATA_SYNC, "DATA_SYNC" },      \
> > +             { NFS_FILE_SYNC, "FILE_SYNC"})
>
> Is there no way to reuse fs/nfs/nfstrace.h::nfs_show_stable() ?
>
> Btw, I have patches that move some NFS trace infrastructure
> into include/trace/events so that it can be shared between the
> NFS client and server trace subsystems. They might be useful
> here too.
>
> The generic FS macros are moved in this commit:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git/commit/?h=nfsd-more-tracepoints&id=495731e1332c7e26af1e04a88eb65e3c08dfbf53
>
> Some NFS macros are moved in this commit:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git/commit/?h=nfsd-more-tracepoints&id=24763f8889e0a18a8d06ddcd05bac06a7d043515
>
> Additional macros are introduced later in that same branch.
>
> I don't have any opinion about whether these should be
> applied before your patches or after them.

It sounds like, if there was already a show_nfs_stable_how() that I
could call then I don't need to define what I'm defining? So if I
apply your patches and and then my patches on top of that, that seems
like the way to go? That depends on if your patch(es) are ready to be
submitted or not? Alternatively, your patch(es) can fix my code. I
don't have a preference either way.

>
>
> > +
> > +TRACE_EVENT(nfs4_cb_offload,
> > +             TP_PROTO(
> > +                     const struct nfs_fh *cb_fh,
> > +                     const nfs4_stateid *cb_stateid,
> > +                     uint64_t cb_count,
> > +                     int cb_error,
> > +                     int cb_how_stable
> > +             ),
> > +
> > +             TP_ARGS(cb_fh, cb_stateid, cb_count, cb_error,
> > +                     cb_how_stable),
> > +
> > +             TP_STRUCT__entry(
> > +                     __field(unsigned long, error)
> > +                     __field(u32, fhandle)
> > +                     __field(loff_t, cb_count)
> > +                     __field(int, cb_how)
> > +                     __field(int, cb_stateid_seq)
> > +                     __field(u32, cb_stateid_hash)
> > +             ),
> > +
> > +             TP_fast_assign(
> > +                     __entry->error = cb_error < 0 ? -cb_error : 0;
> > +                     __entry->fhandle = nfs_fhandle_hash(cb_fh);
> > +                     __entry->cb_stateid_seq =
> > +                             be32_to_cpu(cb_stateid->seqid);
> > +                     __entry->cb_stateid_hash =
> > +                             nfs_stateid_hash(cb_stateid);
> > +                     __entry->cb_count = cb_count;
> > +                     __entry->cb_how = cb_how_stable;
> > +             ),
> > +
> > +             TP_printk(
> > +                     "error=%ld (%s) fhandle=0x%08x cb_stateid=%d:0x%08x "
> > +                     "cb_count=%llu cb_how=%s",
> > +                     -__entry->error,
> > +                     show_nfsv4_errors(__entry->error),
> > +                     __entry->fhandle,
> > +                     __entry->cb_stateid_seq, __entry->cb_stateid_hash,
> > +                     __entry->cb_count,
> > +                     show_write_mode(__entry->cb_how)
> > +             )
> > +);
> > +
> > #endif /* CONFIG_NFS_V4_1 */
> >
> > #endif /* _TRACE_NFS4_H */
> > --
> > 2.27.0
> >
>
> --
> Chuck Lever
>
>
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/7] NFSv4.2 add tracepoint to COPY
  2021-10-19 15:51     ` Olga Kornievskaia
@ 2021-10-19 16:01       ` Chuck Lever III
  0 siblings, 0 replies; 17+ messages in thread
From: Chuck Lever III @ 2021-10-19 16:01 UTC (permalink / raw)
  To: Olga Kornievskaia
  Cc: trond.myklebust@hammerspace.com, Anna Schumaker, Steve Dickson,
	Linux NFS Mailing List



> On Oct 19, 2021, at 11:51 AM, Olga Kornievskaia <olga.kornievskaia@gmail.com> wrote:
> 
> On Tue, Oct 19, 2021 at 11:31 AM Chuck Lever III <chuck.lever@oracle.com> wrote:
>> 
>> 
>> 
>>> On Oct 18, 2021, at 6:03 PM, Olga Kornievskaia <olga.kornievskaia@gmail.com> wrote:
>>> 
>>> From: Olga Kornievskaia <kolga@netapp.com>
>>> 
>>> Add a tracepoint to the COPY operation.
>>> 
>>> Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
>>> ---
>>> fs/nfs/nfs42proc.c |   1 +
>>> fs/nfs/nfs4trace.h | 101 +++++++++++++++++++++++++++++++++++++++++++++
>>> 2 files changed, 102 insertions(+)
>>> 
>>> diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c
>>> index c36824888601..a072cdaf7bdc 100644
>>> --- a/fs/nfs/nfs42proc.c
>>> +++ b/fs/nfs/nfs42proc.c
>>> @@ -367,6 +367,7 @@ static ssize_t _nfs42_proc_copy(struct file *src,
>>> 
>>>      status = nfs4_call_sync(dst_server->client, dst_server, &msg,
>>>                              &args->seq_args, &res->seq_res, 0);
>>> +     trace_nfs4_copy(src_inode, dst_inode, args, res, nss, status);
>> 
>> There seems to be a lot of logic in _nfs42_proc_copy() that
>> happens after this tracepoint. Are you sure this is the
>> best placement, or do you want to capture failures that
>> might happen in the subsequent logic?
> 
> I do believe this is the right place for the COPY tracepoint. There
> are 3 more logical decisions after that. (1) dealing with synchronous
> copy with an incorrect verifier -- perhaps that warrants a separate
> tracepoints as a generic COPY doesn't capture verifier information at
> all, (2) deals with completion of async copy but for that we have a
> tracepoint in the callback, and (3) handling commit after copy but
> that has a commit tracepoint in the COMMIT operation.
> 
>>>      if (status == -ENOTSUPP)
>>>              dst_server->caps &= ~NFS_CAP_COPY;
>>>      if (status)
>>> diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
>>> index ba338ee4a82b..4beb59d78ff3 100644
>>> --- a/fs/nfs/nfs4trace.h
>>> +++ b/fs/nfs/nfs4trace.h
>>> @@ -2540,6 +2540,107 @@ DECLARE_EVENT_CLASS(nfs4_sparse_event,
>>> DEFINE_NFS4_SPARSE_EVENT(nfs4_fallocate);
>>> DEFINE_NFS4_SPARSE_EVENT(nfs4_deallocate);
>>> 
>>> +TRACE_EVENT(nfs4_copy,
>>> +             TP_PROTO(
>>> +                     const struct inode *src_inode,
>>> +                     const struct inode *dst_inode,
>>> +                     const struct nfs42_copy_args *args,
>>> +                     const struct nfs42_copy_res *res,
>>> +                     const struct nl4_server *nss,
>>> +                     int error
>>> +             ),
>>> +
>>> +             TP_ARGS(src_inode, dst_inode, args, res, nss, error),
>>> +
>>> +             TP_STRUCT__entry(
>>> +                     __field(unsigned long, error)
>>> +                     __field(u32, src_fhandle)
>>> +                     __field(u32, src_fileid)
>>> +                     __field(u32, dst_fhandle)
>>> +                     __field(u32, dst_fileid)
>>> +                     __field(dev_t, src_dev)
>>> +                     __field(dev_t, dst_dev)
>>> +                     __field(int, src_stateid_seq)
>>> +                     __field(u32, src_stateid_hash)
>>> +                     __field(int, dst_stateid_seq)
>>> +                     __field(u32, dst_stateid_hash)
>>> +                     __field(loff_t, src_offset)
>>> +                     __field(loff_t, dst_offset)
>>> +                     __field(bool, sync)
>>> +                     __field(loff_t, len)
>>> +                     __field(int, res_stateid_seq)
>>> +                     __field(u32, res_stateid_hash)
>>> +                     __field(loff_t, res_count)
>>> +                     __field(bool, res_sync)
>>> +                     __field(bool, res_cons)
>>> +                     __field(bool, intra)
>>> +             ),
>>> +
>>> +             TP_fast_assign(
>>> +                     const struct nfs_inode *src_nfsi = NFS_I(src_inode);
>>> +                     const struct nfs_inode *dst_nfsi = NFS_I(dst_inode);
>>> +
>>> +                     __entry->src_fileid = src_nfsi->fileid;
>>> +                     __entry->src_dev = src_inode->i_sb->s_dev;
>>> +                     __entry->src_fhandle = nfs_fhandle_hash(args->src_fh);
>>> +                     __entry->src_offset = args->src_pos;
>>> +                     __entry->dst_fileid = dst_nfsi->fileid;
>>> +                     __entry->dst_dev = dst_inode->i_sb->s_dev;
>>> +                     __entry->dst_fhandle = nfs_fhandle_hash(args->dst_fh);
>>> +                     __entry->dst_offset = args->dst_pos;
>>> +                     __entry->len = args->count;
>>> +                     __entry->sync = args->sync;
>>> +                     __entry->error = error < 0 ? -error : 0;
>>> +                     __entry->src_stateid_seq =
>>> +                             be32_to_cpu(args->src_stateid.seqid);
>>> +                     __entry->src_stateid_hash =
>>> +                             nfs_stateid_hash(&args->src_stateid);
>>> +                     __entry->dst_stateid_seq =
>>> +                             be32_to_cpu(args->dst_stateid.seqid);
>>> +                     __entry->dst_stateid_hash =
>>> +                             nfs_stateid_hash(&args->dst_stateid);
>>> +                     __entry->res_stateid_seq = error < 0 ? 0 :
>>> +                             be32_to_cpu(res->write_res.stateid.seqid);
>>> +                     __entry->res_stateid_hash = error < 0 ? 0 :
>>> +                             nfs_stateid_hash(&res->write_res.stateid);
>>> +                     __entry->res_count = error < 0 ? 0 :
>>> +                             res->write_res.count;
>>> +                     __entry->res_sync = error < 0 ? 0 :
>>> +                             res->synchronous;
>>> +                     __entry->res_cons = error < 0 ? 0 :
>>> +                             res->consecutive;
>>> +                     __entry->intra = nss ? 0 : 1;
>>> +             ),
>> 
>> I have some general comments about the ternaries here
>> and in some of the other patches.
>> 
>> At the very least you should instead have a single check:
>> 
>>        if (error) {
>>                /* record all the error values */
>>        } else {
>>                /* record zeroes */
>>        }
>> 
>> Although, I recommend a different approach entirely,
>> and that is to to have /two/ trace points: one for
>> the success case and one for the error case. That
>> way the error case can be enabled persistently, as
>> appropriate, and the success case can be used for
>> general debugging, which ought to be rare once the
>> code is working well and we have good error reporting
>> in user space.
> 
> I think I see what you are saying with having something like (in
> nfs42proc.c in copy)
> nfs4_call_sync()
> if (status)
>  trace_nfs4_copy_err()
> else
>  trace_nfs4_copy()
> 
> That would replace my checking for error and setting the field. I can
> do that. But I'm not sure how to handle sharing of "call" arguments
> that we'd want to display for both the error case tracepoint and
> non-error case. If I'm missing an approach on how to can you please
> share, or otherwise, in my revision I'd re-write using if (error)
> approach and keep just a single tracepoint.

A single error tracepoint is fine with me.

If you're curious about multiple tracepoints that record
and display the same information, one example is in the
fs/nfsd/trace.h file, starting with the
NFSD_TRACE_PROC_ARG_FIELDS macro. It's kinda ugly.


>> In some instances (maybe not here in copy), the
>> success tracepoint is completely unnecessary for
>> everyday operation and can be omitted.
>> 
>> What's your thought about that?
>> 
>> 
>>> +
>>> +             TP_printk(
>>> +                     "error=%ld (%s) intra=%d src_fileid=%02x:%02x:%llu "
>>> +                     "src_fhandle=0x%08x dst_fileid=%02x:%02x:%llu "
>>> +                     "dst_fhandle=0x%08x src_stateid=%d:0x%08x "
>>> +                     "dst_stateid=%d:0x%08x src_offset=%llu dst_offset=%llu "
>>> +                     "len=%llu sync=%d cb_stateid=%d:0x%08x res_sync=%d "
>>> +                     "res_cons=%d res_count=%llu",
>>> +                     -__entry->error,
>>> +                     show_nfsv4_errors(__entry->error),
>>> +                     __entry->intra,
>>> +                     MAJOR(__entry->src_dev), MINOR(__entry->src_dev),
>>> +                     (unsigned long long)__entry->src_fileid,
>>> +                     __entry->src_fhandle,
>>> +                     MAJOR(__entry->dst_dev), MINOR(__entry->dst_dev),
>>> +                     (unsigned long long)__entry->dst_fileid,
>>> +                     __entry->dst_fhandle,
>>> +                     __entry->src_stateid_seq, __entry->src_stateid_hash,
>>> +                     __entry->dst_stateid_seq, __entry->dst_stateid_hash,
>>> +                     __entry->src_offset,
>>> +                     __entry->dst_offset,
>>> +                     __entry->len,
>>> +                     __entry->sync,
>>> +                     __entry->res_stateid_seq, __entry->res_stateid_hash,
>>> +                     __entry->res_sync,
>>> +                     __entry->res_cons,
>>> +                     __entry->res_count
>>> +             )
>>> +);
>>> +
>>> #endif /* CONFIG_NFS_V4_1 */
>>> 
>>> #endif /* _TRACE_NFS4_H */
>>> --
>>> 2.27.0
>>> 
>> 
>> --
>> Chuck Lever

--
Chuck Lever




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 5/7] NFSv4.2 add tracepoint to CB_OFFLOAD
  2021-10-19 16:01     ` Olga Kornievskaia
@ 2021-10-19 16:35       ` Chuck Lever III
  0 siblings, 0 replies; 17+ messages in thread
From: Chuck Lever III @ 2021-10-19 16:35 UTC (permalink / raw)
  To: Olga Kornievskaia
  Cc: Trond Myklebust, Anna Schumaker, Steve Dickson,
	Linux NFS Mailing List



> On Oct 19, 2021, at 12:01 PM, Olga Kornievskaia <olga.kornievskaia@gmail.com> wrote:
> 
> On Tue, Oct 19, 2021 at 11:17 AM Chuck Lever III <chuck.lever@oracle.com> wrote:
>> 
>> 
>> 
>>> On Oct 18, 2021, at 6:03 PM, Olga Kornievskaia <olga.kornievskaia@gmail.com> wrote:
>>> 
>>> From: Olga Kornievskaia <kolga@netapp.com>
>>> 
>>> Add a tracepoint to the CB_OFFLOAD operation.
>>> 
>>> Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
>>> ---
>>> fs/nfs/callback_proc.c |  3 +++
>>> fs/nfs/nfs4trace.h     | 50 ++++++++++++++++++++++++++++++++++++++++++
>>> 2 files changed, 53 insertions(+)
>>> 
>>> diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
>>> index ed9d580826f5..09c5b1cb3e07 100644
>>> --- a/fs/nfs/callback_proc.c
>>> +++ b/fs/nfs/callback_proc.c
>>> @@ -739,6 +739,9 @@ __be32 nfs4_callback_offload(void *data, void *dummy,
>>>              kfree(copy);
>>>      spin_unlock(&cps->clp->cl_lock);
>>> 
>>> +     trace_nfs4_cb_offload(&args->coa_fh, &args->coa_stateid,
>>> +                     args->wr_count, args->error,
>>> +                     args->wr_writeverf.committed);
>>>      return 0;
>>> }
>>> #endif /* CONFIG_NFS_V4_2 */
>>> diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
>>> index cc6537a20ebe..33f52d486528 100644
>>> --- a/fs/nfs/nfs4trace.h
>>> +++ b/fs/nfs/nfs4trace.h
>>> @@ -2714,6 +2714,56 @@ TRACE_EVENT(nfs4_clone,
>>>              )
>>> );
>>> 
>>> +#define show_write_mode(how)                 \
>>> +        __print_symbolic(how,                        \
>>> +                { NFS_UNSTABLE, "UNSTABLE" },        \
>>> +                { NFS_DATA_SYNC, "DATA_SYNC" },      \
>>> +             { NFS_FILE_SYNC, "FILE_SYNC"})
>> 
>> Is there no way to reuse fs/nfs/nfstrace.h::nfs_show_stable() ?
>> 
>> Btw, I have patches that move some NFS trace infrastructure
>> into include/trace/events so that it can be shared between the
>> NFS client and server trace subsystems. They might be useful
>> here too.
>> 
>> The generic FS macros are moved in this commit:
>> 
>> https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git/commit/?h=nfsd-more-tracepoints&id=495731e1332c7e26af1e04a88eb65e3c08dfbf53
>> 
>> Some NFS macros are moved in this commit:
>> 
>> https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git/commit/?h=nfsd-more-tracepoints&id=24763f8889e0a18a8d06ddcd05bac06a7d043515
>> 
>> Additional macros are introduced later in that same branch.
>> 
>> I don't have any opinion about whether these should be
>> applied before your patches or after them.
> 
> It sounds like, if there was already a show_nfs_stable_how() that I
> could call then I don't need to define what I'm defining? So if I
> apply your patches and and then my patches on top of that, that seems
> like the way to go? That depends on if your patch(es) are ready to be
> submitted or not? Alternatively, your patch(es) can fix my code. I
> don't have a preference either way.

I can post those two now and the list can decide if they are ready.


>>> +
>>> +TRACE_EVENT(nfs4_cb_offload,
>>> +             TP_PROTO(
>>> +                     const struct nfs_fh *cb_fh,
>>> +                     const nfs4_stateid *cb_stateid,
>>> +                     uint64_t cb_count,
>>> +                     int cb_error,
>>> +                     int cb_how_stable
>>> +             ),
>>> +
>>> +             TP_ARGS(cb_fh, cb_stateid, cb_count, cb_error,
>>> +                     cb_how_stable),
>>> +
>>> +             TP_STRUCT__entry(
>>> +                     __field(unsigned long, error)
>>> +                     __field(u32, fhandle)
>>> +                     __field(loff_t, cb_count)
>>> +                     __field(int, cb_how)
>>> +                     __field(int, cb_stateid_seq)
>>> +                     __field(u32, cb_stateid_hash)
>>> +             ),
>>> +
>>> +             TP_fast_assign(
>>> +                     __entry->error = cb_error < 0 ? -cb_error : 0;
>>> +                     __entry->fhandle = nfs_fhandle_hash(cb_fh);
>>> +                     __entry->cb_stateid_seq =
>>> +                             be32_to_cpu(cb_stateid->seqid);
>>> +                     __entry->cb_stateid_hash =
>>> +                             nfs_stateid_hash(cb_stateid);
>>> +                     __entry->cb_count = cb_count;
>>> +                     __entry->cb_how = cb_how_stable;
>>> +             ),
>>> +
>>> +             TP_printk(
>>> +                     "error=%ld (%s) fhandle=0x%08x cb_stateid=%d:0x%08x "
>>> +                     "cb_count=%llu cb_how=%s",
>>> +                     -__entry->error,
>>> +                     show_nfsv4_errors(__entry->error),
>>> +                     __entry->fhandle,
>>> +                     __entry->cb_stateid_seq, __entry->cb_stateid_hash,
>>> +                     __entry->cb_count,
>>> +                     show_write_mode(__entry->cb_how)
>>> +             )
>>> +);
>>> +
>>> #endif /* CONFIG_NFS_V4_1 */
>>> 
>>> #endif /* _TRACE_NFS4_H */
>>> --
>>> 2.27.0
>>> 
>> 
>> --
>> Chuck Lever

--
Chuck Lever




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/7] NFSv4.2 add tracepoint to SEEK
  2021-10-18 22:03 ` [PATCH 1/7] NFSv4.2 add tracepoint to SEEK Olga Kornievskaia
@ 2021-10-19 17:08   ` Anna Schumaker
  2021-10-27  7:50   ` kernel test robot
  1 sibling, 0 replies; 17+ messages in thread
From: Anna Schumaker @ 2021-10-19 17:08 UTC (permalink / raw)
  To: Olga Kornievskaia; +Cc: Trond Myklebust, Steve Dickson, Linux NFS Mailing List

Hi Olga,

On Mon, Oct 18, 2021 at 6:05 PM Olga Kornievskaia
<olga.kornievskaia@gmail.com> wrote:
>
> From: Olga Kornievskaia <kolga@netapp.com>
>
> Add a tracepoint to the SEEK operation.

Compiling with CONFIG_NFS_V4_1=y but CONFIG_NFS_V4_2=n gives me the following:

In file included from fs/nfs/nfs4trace.h:11,
                 from fs/nfs/nfs4state.c:63:
fs/nfs/nfs4trace.h:2432:38: error: ‘struct nfs42_seek_res’ declared
inside parameter list will not be visible outside of this definition
or declaration [-Werror]
 2432 |                         const struct nfs42_seek_res *res,

You probably need to check for CONFIG_NFS_V4_2 inside nfs4trace.h

Anna

>
> Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
> ---
>  fs/nfs/nfs42proc.c |  1 +
>  fs/nfs/nfs4trace.h | 65 ++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 66 insertions(+)
>
> diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c
> index a24349512ffe..87c0dcb8823b 100644
> --- a/fs/nfs/nfs42proc.c
> +++ b/fs/nfs/nfs42proc.c
> @@ -678,6 +678,7 @@ static loff_t _nfs42_proc_llseek(struct file *filep,
>
>         status = nfs4_call_sync(server->client, server, &msg,
>                                 &args.seq_args, &res.seq_res, 0);
> +       trace_nfs4_llseek(inode, &args, &res, status);
>         if (status == -ENOTSUPP)
>                 server->caps &= ~NFS_CAP_SEEK;
>         if (status)
> diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
> index 7a2567aa2b86..81dcbfca7f74 100644
> --- a/fs/nfs/nfs4trace.h
> +++ b/fs/nfs/nfs4trace.h
> @@ -2417,6 +2417,71 @@ TRACE_EVENT(ff_layout_commit_error,
>                 )
>  );
>
> +TRACE_DEFINE_ENUM(NFS4_CONTENT_DATA);
> +TRACE_DEFINE_ENUM(NFS4_CONTENT_HOLE);
> +
> +#define show_llseek_mode(what)                 \
> +       __print_symbolic(what,                  \
> +               { NFS4_CONTENT_DATA, "DATA" },          \
> +               { NFS4_CONTENT_HOLE, "HOLE" })
> +
> +TRACE_EVENT(nfs4_llseek,
> +               TP_PROTO(
> +                       const struct inode *inode,
> +                       const struct nfs42_seek_args *args,
> +                       const struct nfs42_seek_res *res,
> +                       int error
> +               ),
> +
> +               TP_ARGS(inode, args, res, error),
> +
> +               TP_STRUCT__entry(
> +                       __field(unsigned long, error)
> +                       __field(u32, fhandle)
> +                       __field(u32, fileid)
> +                       __field(dev_t, dev)
> +                       __field(int, stateid_seq)
> +                       __field(u32, stateid_hash)
> +                       __field(loff_t, offset_s)
> +                       __field(u32, what)
> +                       __field(loff_t, offset_r)
> +                       __field(u32, eof)
> +               ),
> +
> +               TP_fast_assign(
> +                       const struct nfs_inode *nfsi = NFS_I(inode);
> +                       const struct nfs_fh *fh = args->sa_fh;
> +
> +                       __entry->fileid = nfsi->fileid;
> +                       __entry->dev = inode->i_sb->s_dev;
> +                       __entry->fhandle = nfs_fhandle_hash(fh);
> +                       __entry->offset_s = args->sa_offset;
> +                       __entry->error = error < 0 ? -error : 0;
> +                       __entry->stateid_seq =
> +                               be32_to_cpu(args->sa_stateid.seqid);
> +                       __entry->stateid_hash =
> +                               nfs_stateid_hash(&args->sa_stateid);
> +                       __entry->what = args->sa_what;
> +                       __entry->offset_r = error < 0 ? 0 : res->sr_offset;
> +                       __entry->eof = error < 0 ? 0 : res->sr_eof;
> +               ),
> +
> +               TP_printk(
> +                       "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
> +                       "stateid=%d:0x%08x offset_s=%llu what=%s "
> +                       "offset_r=%llu eof=%u",
> +                       -__entry->error,
> +                       show_nfsv4_errors(__entry->error),
> +                       MAJOR(__entry->dev), MINOR(__entry->dev),
> +                       (unsigned long long)__entry->fileid,
> +                       __entry->fhandle,
> +                       __entry->stateid_seq, __entry->stateid_hash,
> +                       __entry->offset_s,
> +                       show_llseek_mode(__entry->what),
> +                       __entry->offset_r,
> +                       __entry->eof
> +               )
> +);
>
>  #endif /* CONFIG_NFS_V4_1 */
>
> --
> 2.27.0
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/7] NFSv4.2 add tracepoint to SEEK
  2021-10-18 22:03 ` [PATCH 1/7] NFSv4.2 add tracepoint to SEEK Olga Kornievskaia
  2021-10-19 17:08   ` Anna Schumaker
@ 2021-10-27  7:50   ` kernel test robot
  1 sibling, 0 replies; 17+ messages in thread
From: kernel test robot @ 2021-10-27  7:50 UTC (permalink / raw)
  To: Olga Kornievskaia, trond.myklebust, anna.schumaker, steved
  Cc: kbuild-all, linux-nfs

[-- Attachment #1: Type: text/plain, Size: 41222 bytes --]

Hi Olga,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on trondmy-nfs/linux-next]
[also build test ERROR on v5.15-rc7 next-20211026]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Olga-Kornievskaia/NFSv4-2-add-tracepoints-to-sparse-files-and-copy/20211019-060455
base:   git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
config: csky-randconfig-r035-20211027 (attached as .config)
compiler: csky-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/39d7e45f3011c0936f8a56eb73dd1abca1ff448d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Olga-Kornievskaia/NFSv4-2-add-tracepoints-to-sparse-files-and-copy/20211019-060455
        git checkout 39d7e45f3011c0936f8a56eb73dd1abca1ff448d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=csky 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/bitops.h:33,
                    from include/linux/kernel.h:12,
                    from include/linux/list.h:9,
                    from include/linux/preempt.h:11,
                    from include/linux/spinlock.h:55,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/mm.h:10,
                    from fs/nfs/nfs4proc.c:38:
   arch/csky/include/asm/bitops.h:77: warning: "__clear_bit" redefined
      77 | #define __clear_bit(nr, vaddr) clear_bit(nr, vaddr)
         | 
   In file included from arch/csky/include/asm/bitops.h:76,
                    from include/linux/bitops.h:33,
                    from include/linux/kernel.h:12,
                    from include/linux/list.h:9,
                    from include/linux/preempt.h:11,
                    from include/linux/spinlock.h:55,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/mm.h:10,
                    from fs/nfs/nfs4proc.c:38:
   include/asm-generic/bitops/non-atomic.h:34: note: this is the location of the previous definition
      34 | #define __clear_bit arch___clear_bit
         | 
   In file included from fs/nfs/nfs4trace.h:11,
                    from fs/nfs/nfs4proc.c:72:
>> fs/nfs/nfs4trace.h:2432:38: warning: 'struct nfs42_seek_res' declared inside parameter list will not be visible outside of this definition or declaration
    2432 |                         const struct nfs42_seek_res *res,
         |                                      ^~~~~~~~~~~~~~
   include/linux/tracepoint.h:242:39: note: in definition of macro '__DECLARE_TRACE'
     242 |         extern int __traceiter_##name(data_proto);                      \
         |                                       ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2429:17: note: in expansion of macro 'TP_PROTO'
    2429 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2431:38: warning: 'struct nfs42_seek_args' declared inside parameter list will not be visible outside of this definition or declaration
    2431 |                         const struct nfs42_seek_args *args,
         |                                      ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:242:39: note: in definition of macro '__DECLARE_TRACE'
     242 |         extern int __traceiter_##name(data_proto);                      \
         |                                       ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2429:17: note: in expansion of macro 'TP_PROTO'
    2429 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2432:38: warning: 'struct nfs42_seek_res' declared inside parameter list will not be visible outside of this definition or declaration
    2432 |                         const struct nfs42_seek_res *res,
         |                                      ^~~~~~~~~~~~~~
   include/linux/tracepoint.h:245:41: note: in definition of macro '__DECLARE_TRACE'
     245 |         static inline void trace_##name(proto)                          \
         |                                         ^~~~~
   include/linux/tracepoint.h:419:31: note: in expansion of macro 'PARAMS'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |                               ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2429:17: note: in expansion of macro 'TP_PROTO'
    2429 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2431:38: warning: 'struct nfs42_seek_args' declared inside parameter list will not be visible outside of this definition or declaration
    2431 |                         const struct nfs42_seek_args *args,
         |                                      ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:245:41: note: in definition of macro '__DECLARE_TRACE'
     245 |         static inline void trace_##name(proto)                          \
         |                                         ^~~~~
   include/linux/tracepoint.h:419:31: note: in expansion of macro 'PARAMS'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |                               ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2429:17: note: in expansion of macro 'TP_PROTO'
    2429 |                 TP_PROTO(
         |                 ^~~~~~~~
   fs/nfs/nfs4trace.h: In function 'trace_nfs4_llseek':
>> fs/nfs/nfs4trace.h:2436:32: error: passing argument 3 of '__traceiter_nfs4_llseek' from incompatible pointer type [-Werror=incompatible-pointer-types]
    2436 |                 TP_ARGS(inode, args, res, error),
         |                                ^~~~
         |                                |
         |                                const struct nfs42_seek_args *
   include/linux/tracepoint.h:177:66: note: in definition of macro '__DO_TRACE_CALL'
     177 | #define __DO_TRACE_CALL(name, args)     __traceiter_##name(NULL, args)
         |                                                                  ^~~~
   include/linux/tracepoint.h:206:39: note: in expansion of macro 'TP_ARGS'
     206 |                 __DO_TRACE_CALL(name, TP_ARGS(args));                   \
         |                                       ^~~~~~~
   include/linux/tracepoint.h:248:25: note: in expansion of macro '__DO_TRACE'
     248 |                         __DO_TRACE(name,                                \
         |                         ^~~~~~~~~~
   include/linux/tracepoint.h:249:33: note: in expansion of macro 'TP_ARGS'
     249 |                                 TP_ARGS(args),                          \
         |                                 ^~~~~~~
   include/linux/tracepoint.h:419:9: note: in expansion of macro '__DECLARE_TRACE'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |         ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:419:46: note: in expansion of macro 'PARAMS'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |                                              ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:44: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                                            ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2436:17: note: in expansion of macro 'TP_ARGS'
    2436 |                 TP_ARGS(inode, args, res, error),
         |                 ^~~~~~~
   fs/nfs/nfs4trace.h:2431:55: note: expected 'const struct nfs42_seek_args *' but argument is of type 'const struct nfs42_seek_args *'
    2431 |                         const struct nfs42_seek_args *args,
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
   include/linux/tracepoint.h:242:39: note: in definition of macro '__DECLARE_TRACE'
     242 |         extern int __traceiter_##name(data_proto);                      \
         |                                       ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2429:17: note: in expansion of macro 'TP_PROTO'
    2429 |                 TP_PROTO(
         |                 ^~~~~~~~
   fs/nfs/nfs4trace.h:2436:38: error: passing argument 4 of '__traceiter_nfs4_llseek' from incompatible pointer type [-Werror=incompatible-pointer-types]
    2436 |                 TP_ARGS(inode, args, res, error),
         |                                      ^~~
         |                                      |
         |                                      const struct nfs42_seek_res *
   include/linux/tracepoint.h:177:66: note: in definition of macro '__DO_TRACE_CALL'
     177 | #define __DO_TRACE_CALL(name, args)     __traceiter_##name(NULL, args)
         |                                                                  ^~~~
   include/linux/tracepoint.h:206:39: note: in expansion of macro 'TP_ARGS'
     206 |                 __DO_TRACE_CALL(name, TP_ARGS(args));                   \
         |                                       ^~~~~~~
   include/linux/tracepoint.h:248:25: note: in expansion of macro '__DO_TRACE'
     248 |                         __DO_TRACE(name,                                \
         |                         ^~~~~~~~~~
   include/linux/tracepoint.h:249:33: note: in expansion of macro 'TP_ARGS'
     249 |                                 TP_ARGS(args),                          \
         |                                 ^~~~~~~
   include/linux/tracepoint.h:419:9: note: in expansion of macro '__DECLARE_TRACE'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |         ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:419:46: note: in expansion of macro 'PARAMS'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |                                              ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:44: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                                            ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2436:17: note: in expansion of macro 'TP_ARGS'
    2436 |                 TP_ARGS(inode, args, res, error),
         |                 ^~~~~~~
   fs/nfs/nfs4trace.h:2432:54: note: expected 'const struct nfs42_seek_res *' but argument is of type 'const struct nfs42_seek_res *'
    2432 |                         const struct nfs42_seek_res *res,
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   include/linux/tracepoint.h:242:39: note: in definition of macro '__DECLARE_TRACE'
     242 |         extern int __traceiter_##name(data_proto);                      \
         |                                       ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2429:17: note: in expansion of macro 'TP_PROTO'
    2429 |                 TP_PROTO(
         |                 ^~~~~~~~
   fs/nfs/nfs4trace.h: At top level:
>> fs/nfs/nfs4trace.h:2432:38: warning: 'struct nfs42_seek_res' declared inside parameter list will not be visible outside of this definition or declaration
    2432 |                         const struct nfs42_seek_res *res,
         |                                      ^~~~~~~~~~~~~~
   include/linux/tracepoint.h:218:51: note: in definition of macro '__DECLARE_TRACE_RCU'
     218 |         static inline void trace_##name##_rcuidle(proto)                \
         |                                                   ^~~~~
   include/linux/tracepoint.h:257:35: note: in expansion of macro 'PARAMS'
     257 |         __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args),          \
         |                                   ^~~~~~
   include/linux/tracepoint.h:419:9: note: in expansion of macro '__DECLARE_TRACE'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |         ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:419:31: note: in expansion of macro 'PARAMS'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |                               ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2429:17: note: in expansion of macro 'TP_PROTO'
    2429 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2431:38: warning: 'struct nfs42_seek_args' declared inside parameter list will not be visible outside of this definition or declaration
    2431 |                         const struct nfs42_seek_args *args,
         |                                      ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:218:51: note: in definition of macro '__DECLARE_TRACE_RCU'
     218 |         static inline void trace_##name##_rcuidle(proto)                \
         |                                                   ^~~~~
   include/linux/tracepoint.h:257:35: note: in expansion of macro 'PARAMS'
     257 |         __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args),          \
         |                                   ^~~~~~
   include/linux/tracepoint.h:419:9: note: in expansion of macro '__DECLARE_TRACE'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |         ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:419:31: note: in expansion of macro 'PARAMS'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |                               ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2429:17: note: in expansion of macro 'TP_PROTO'
    2429 |                 TP_PROTO(
         |                 ^~~~~~~~
   fs/nfs/nfs4trace.h: In function 'trace_nfs4_llseek_rcuidle':
>> fs/nfs/nfs4trace.h:2436:32: error: passing argument 3 of '__traceiter_nfs4_llseek' from incompatible pointer type [-Werror=incompatible-pointer-types]
    2436 |                 TP_ARGS(inode, args, res, error),
         |                                ^~~~
         |                                |
         |                                const struct nfs42_seek_args *
   include/linux/tracepoint.h:177:66: note: in definition of macro '__DO_TRACE_CALL'
     177 | #define __DO_TRACE_CALL(name, args)     __traceiter_##name(NULL, args)
         |                                                                  ^~~~
   include/linux/tracepoint.h:206:39: note: in expansion of macro 'TP_ARGS'
     206 |                 __DO_TRACE_CALL(name, TP_ARGS(args));                   \
         |                                       ^~~~~~~
   include/linux/tracepoint.h:221:25: note: in expansion of macro '__DO_TRACE'
     221 |                         __DO_TRACE(name,                                \
         |                         ^~~~~~~~~~
   include/linux/tracepoint.h:222:33: note: in expansion of macro 'TP_ARGS'
     222 |                                 TP_ARGS(args),                          \
         |                                 ^~~~~~~
   include/linux/tracepoint.h:257:9: note: in expansion of macro '__DECLARE_TRACE_RCU'
     257 |         __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args),          \
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/tracepoint.h:257:50: note: in expansion of macro 'PARAMS'
     257 |         __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args),          \
         |                                                  ^~~~~~
   include/linux/tracepoint.h:419:9: note: in expansion of macro '__DECLARE_TRACE'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |         ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:419:46: note: in expansion of macro 'PARAMS'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |                                              ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:44: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                                            ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2436:17: note: in expansion of macro 'TP_ARGS'
    2436 |                 TP_ARGS(inode, args, res, error),
         |                 ^~~~~~~
   fs/nfs/nfs4trace.h:2431:55: note: expected 'const struct nfs42_seek_args *' but argument is of type 'const struct nfs42_seek_args *'
    2431 |                         const struct nfs42_seek_args *args,
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
   include/linux/tracepoint.h:242:39: note: in definition of macro '__DECLARE_TRACE'
     242 |         extern int __traceiter_##name(data_proto);                      \
         |                                       ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2429:17: note: in expansion of macro 'TP_PROTO'
    2429 |                 TP_PROTO(
         |                 ^~~~~~~~
   fs/nfs/nfs4trace.h:2436:38: error: passing argument 4 of '__traceiter_nfs4_llseek' from incompatible pointer type [-Werror=incompatible-pointer-types]
    2436 |                 TP_ARGS(inode, args, res, error),
         |                                      ^~~
         |                                      |
         |                                      const struct nfs42_seek_res *
   include/linux/tracepoint.h:177:66: note: in definition of macro '__DO_TRACE_CALL'
     177 | #define __DO_TRACE_CALL(name, args)     __traceiter_##name(NULL, args)
         |                                                                  ^~~~
   include/linux/tracepoint.h:206:39: note: in expansion of macro 'TP_ARGS'
     206 |                 __DO_TRACE_CALL(name, TP_ARGS(args));                   \
         |                                       ^~~~~~~
   include/linux/tracepoint.h:221:25: note: in expansion of macro '__DO_TRACE'
     221 |                         __DO_TRACE(name,                                \
         |                         ^~~~~~~~~~
   include/linux/tracepoint.h:222:33: note: in expansion of macro 'TP_ARGS'
     222 |                                 TP_ARGS(args),                          \
         |                                 ^~~~~~~
   include/linux/tracepoint.h:257:9: note: in expansion of macro '__DECLARE_TRACE_RCU'
     257 |         __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args),          \
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/tracepoint.h:257:50: note: in expansion of macro 'PARAMS'
     257 |         __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args),          \
         |                                                  ^~~~~~
   include/linux/tracepoint.h:419:9: note: in expansion of macro '__DECLARE_TRACE'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |         ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:419:46: note: in expansion of macro 'PARAMS'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |                                              ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:44: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                                            ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2436:17: note: in expansion of macro 'TP_ARGS'
    2436 |                 TP_ARGS(inode, args, res, error),
         |                 ^~~~~~~
   fs/nfs/nfs4trace.h:2432:54: note: expected 'const struct nfs42_seek_res *' but argument is of type 'const struct nfs42_seek_res *'
    2432 |                         const struct nfs42_seek_res *res,
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   include/linux/tracepoint.h:242:39: note: in definition of macro '__DECLARE_TRACE'
     242 |         extern int __traceiter_##name(data_proto);                      \
         |                                       ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2429:17: note: in expansion of macro 'TP_PROTO'
    2429 |                 TP_PROTO(
         |                 ^~~~~~~~
   fs/nfs/nfs4trace.h: At top level:
>> fs/nfs/nfs4trace.h:2432:38: warning: 'struct nfs42_seek_res' declared inside parameter list will not be visible outside of this definition or declaration
    2432 |                         const struct nfs42_seek_res *res,
         |                                      ^~~~~~~~~~~~~~
   include/linux/tracepoint.h:260:45: note: in definition of macro '__DECLARE_TRACE'
     260 |         register_trace_##name(void (*probe)(data_proto), void *data)    \
         |                                             ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2429:17: note: in expansion of macro 'TP_PROTO'
    2429 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2431:38: warning: 'struct nfs42_seek_args' declared inside parameter list will not be visible outside of this definition or declaration
    2431 |                         const struct nfs42_seek_args *args,
         |                                      ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:260:45: note: in definition of macro '__DECLARE_TRACE'
     260 |         register_trace_##name(void (*probe)(data_proto), void *data)    \
         |                                             ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2429:17: note: in expansion of macro 'TP_PROTO'
    2429 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2432:38: warning: 'struct nfs42_seek_res' declared inside parameter list will not be visible outside of this definition or declaration
    2432 |                         const struct nfs42_seek_res *res,
         |                                      ^~~~~~~~~~~~~~
   include/linux/tracepoint.h:266:50: note: in definition of macro '__DECLARE_TRACE'
     266 |         register_trace_prio_##name(void (*probe)(data_proto), void *data,\
         |                                                  ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2429:17: note: in expansion of macro 'TP_PROTO'
    2429 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2431:38: warning: 'struct nfs42_seek_args' declared inside parameter list will not be visible outside of this definition or declaration
    2431 |                         const struct nfs42_seek_args *args,
         |                                      ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:266:50: note: in definition of macro '__DECLARE_TRACE'
     266 |         register_trace_prio_##name(void (*probe)(data_proto), void *data,\
         |                                                  ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2429:17: note: in expansion of macro 'TP_PROTO'
    2429 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2432:38: warning: 'struct nfs42_seek_res' declared inside parameter list will not be visible outside of this definition or declaration
    2432 |                         const struct nfs42_seek_res *res,
         |                                      ^~~~~~~~~~~~~~
   include/linux/tracepoint.h:273:47: note: in definition of macro '__DECLARE_TRACE'
     273 |         unregister_trace_##name(void (*probe)(data_proto), void *data)  \
         |                                               ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2429:17: note: in expansion of macro 'TP_PROTO'
    2429 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2431:38: warning: 'struct nfs42_seek_args' declared inside parameter list will not be visible outside of this definition or declaration
    2431 |                         const struct nfs42_seek_args *args,
         |                                      ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:273:47: note: in definition of macro '__DECLARE_TRACE'
     273 |         unregister_trace_##name(void (*probe)(data_proto), void *data)  \
         |                                               ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2429:17: note: in expansion of macro 'TP_PROTO'
    2429 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2432:38: warning: 'struct nfs42_seek_res' declared inside parameter list will not be visible outside of this definition or declaration
    2432 |                         const struct nfs42_seek_res *res,
         |                                      ^~~~~~~~~~~~~~
   include/linux/tracepoint.h:279:53: note: in definition of macro '__DECLARE_TRACE'
     279 |         check_trace_callback_type_##name(void (*cb)(data_proto))        \
         |                                                     ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2429:17: note: in expansion of macro 'TP_PROTO'
    2429 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2431:38: warning: 'struct nfs42_seek_args' declared inside parameter list will not be visible outside of this definition or declaration
    2431 |                         const struct nfs42_seek_args *args,
         |                                      ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:279:53: note: in definition of macro '__DECLARE_TRACE'
     279 |         check_trace_callback_type_##name(void (*cb)(data_proto))        \
         |                                                     ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2428:1: note: in expansion of macro 'TRACE_EVENT'
    2428 | TRACE_EVENT(nfs4_llseek,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2429:17: note: in expansion of macro 'TP_PROTO'
    2429 |                 TP_PROTO(
         |                 ^~~~~~~~
   fs/nfs/nfs4proc.c: In function 'nfs4_proc_create_session':
   fs/nfs/nfs4proc.c:9104:19: warning: variable 'ptr' set but not used [-Wunused-but-set-variable]
    9104 |         unsigned *ptr;
         |                   ^~~
   cc1: some warnings being treated as errors
..


vim +/__traceiter_nfs4_llseek +2436 fs/nfs/nfs4trace.h

  2422	
  2423	#define show_llseek_mode(what)			\
  2424		__print_symbolic(what,			\
  2425			{ NFS4_CONTENT_DATA, "DATA" },		\
  2426			{ NFS4_CONTENT_HOLE, "HOLE" })
  2427	
> 2428	TRACE_EVENT(nfs4_llseek,
  2429			TP_PROTO(
  2430				const struct inode *inode,
> 2431				const struct nfs42_seek_args *args,
> 2432				const struct nfs42_seek_res *res,
  2433				int error
  2434			),
  2435	
> 2436			TP_ARGS(inode, args, res, error),
  2437	
  2438			TP_STRUCT__entry(
  2439				__field(unsigned long, error)
  2440				__field(u32, fhandle)
  2441				__field(u32, fileid)
  2442				__field(dev_t, dev)
  2443				__field(int, stateid_seq)
  2444				__field(u32, stateid_hash)
  2445				__field(loff_t, offset_s)
  2446				__field(u32, what)
  2447				__field(loff_t, offset_r)
  2448				__field(u32, eof)
  2449			),
  2450	
  2451			TP_fast_assign(
  2452				const struct nfs_inode *nfsi = NFS_I(inode);
  2453				const struct nfs_fh *fh = args->sa_fh;
  2454	
  2455				__entry->fileid = nfsi->fileid;
  2456				__entry->dev = inode->i_sb->s_dev;
  2457				__entry->fhandle = nfs_fhandle_hash(fh);
  2458				__entry->offset_s = args->sa_offset;
  2459				__entry->error = error < 0 ? -error : 0;
  2460				__entry->stateid_seq =
  2461					be32_to_cpu(args->sa_stateid.seqid);
  2462				__entry->stateid_hash =
  2463					nfs_stateid_hash(&args->sa_stateid);
  2464				__entry->what = args->sa_what;
  2465				__entry->offset_r = error < 0 ? 0 : res->sr_offset;
  2466				__entry->eof = error < 0 ? 0 : res->sr_eof;
  2467			),
  2468	
  2469			TP_printk(
  2470				"error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
  2471				"stateid=%d:0x%08x offset_s=%llu what=%s "
  2472				"offset_r=%llu eof=%u",
  2473				-__entry->error,
  2474				show_nfsv4_errors(__entry->error),
  2475				MAJOR(__entry->dev), MINOR(__entry->dev),
  2476				(unsigned long long)__entry->fileid,
  2477				__entry->fhandle,
  2478				__entry->stateid_seq, __entry->stateid_hash,
  2479				__entry->offset_s,
  2480				show_llseek_mode(__entry->what),
  2481				__entry->offset_r,
  2482				__entry->eof
  2483			)
  2484	);
  2485	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35928 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/7] NFSv4.2 add tracepoint to COPY
  2021-10-18 22:03 ` [PATCH 3/7] NFSv4.2 add tracepoint to COPY Olga Kornievskaia
  2021-10-19 15:31   ` Chuck Lever III
@ 2021-10-27 14:28   ` kernel test robot
  1 sibling, 0 replies; 17+ messages in thread
From: kernel test robot @ 2021-10-27 14:28 UTC (permalink / raw)
  To: Olga Kornievskaia, trond.myklebust, anna.schumaker, steved
  Cc: kbuild-all, linux-nfs

[-- Attachment #1: Type: text/plain, Size: 48588 bytes --]

Hi Olga,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on trondmy-nfs/linux-next]
[also build test ERROR on v5.15-rc7 next-20211027]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Olga-Kornievskaia/NFSv4-2-add-tracepoints-to-sparse-files-and-copy/20211019-060455
base:   git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
config: csky-randconfig-r035-20211027 (attached as .config)
compiler: csky-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/829a1d6d8ca869013f86f9f799c735b6f1ff1acf
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Olga-Kornievskaia/NFSv4-2-add-tracepoints-to-sparse-files-and-copy/20211019-060455
        git checkout 829a1d6d8ca869013f86f9f799c735b6f1ff1acf
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=csky 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   fs/nfs/nfs4trace.h:2541:1: note: in expansion of macro 'DEFINE_NFS4_SPARSE_EVENT'
    2541 | DEFINE_NFS4_SPARSE_EVENT(nfs4_deallocate);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   fs/nfs/nfs4trace.h: At top level:
   fs/nfs/nfs4trace.h:2536:46: warning: 'struct nfs42_falloc_args' declared inside parameter list will not be visible outside of this definition or declaration
    2536 |                                 const struct nfs42_falloc_args *args, \
         |                                              ^~~~~~~~~~~~~~~~~
   include/linux/tracepoint.h:260:45: note: in definition of macro '__DECLARE_TRACE'
     260 |         register_trace_##name(void (*probe)(data_proto), void *data)    \
         |                                             ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:542:9: note: in expansion of macro 'DECLARE_TRACE'
     542 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:542:29: note: in expansion of macro 'PARAMS'
     542 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2533:9: note: in expansion of macro 'DEFINE_EVENT'
    2533 |         DEFINE_EVENT(nfs4_sparse_event, name, \
         |         ^~~~~~~~~~~~
   fs/nfs/nfs4trace.h:2534:25: note: in expansion of macro 'TP_PROTO'
    2534 |                         TP_PROTO( \
         |                         ^~~~~~~~
   fs/nfs/nfs4trace.h:2541:1: note: in expansion of macro 'DEFINE_NFS4_SPARSE_EVENT'
    2541 | DEFINE_NFS4_SPARSE_EVENT(nfs4_deallocate);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   fs/nfs/nfs4trace.h:2536:46: warning: 'struct nfs42_falloc_args' declared inside parameter list will not be visible outside of this definition or declaration
    2536 |                                 const struct nfs42_falloc_args *args, \
         |                                              ^~~~~~~~~~~~~~~~~
   include/linux/tracepoint.h:266:50: note: in definition of macro '__DECLARE_TRACE'
     266 |         register_trace_prio_##name(void (*probe)(data_proto), void *data,\
         |                                                  ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:542:9: note: in expansion of macro 'DECLARE_TRACE'
     542 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:542:29: note: in expansion of macro 'PARAMS'
     542 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2533:9: note: in expansion of macro 'DEFINE_EVENT'
    2533 |         DEFINE_EVENT(nfs4_sparse_event, name, \
         |         ^~~~~~~~~~~~
   fs/nfs/nfs4trace.h:2534:25: note: in expansion of macro 'TP_PROTO'
    2534 |                         TP_PROTO( \
         |                         ^~~~~~~~
   fs/nfs/nfs4trace.h:2541:1: note: in expansion of macro 'DEFINE_NFS4_SPARSE_EVENT'
    2541 | DEFINE_NFS4_SPARSE_EVENT(nfs4_deallocate);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   fs/nfs/nfs4trace.h:2536:46: warning: 'struct nfs42_falloc_args' declared inside parameter list will not be visible outside of this definition or declaration
    2536 |                                 const struct nfs42_falloc_args *args, \
         |                                              ^~~~~~~~~~~~~~~~~
   include/linux/tracepoint.h:273:47: note: in definition of macro '__DECLARE_TRACE'
     273 |         unregister_trace_##name(void (*probe)(data_proto), void *data)  \
         |                                               ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:542:9: note: in expansion of macro 'DECLARE_TRACE'
     542 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:542:29: note: in expansion of macro 'PARAMS'
     542 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2533:9: note: in expansion of macro 'DEFINE_EVENT'
    2533 |         DEFINE_EVENT(nfs4_sparse_event, name, \
         |         ^~~~~~~~~~~~
   fs/nfs/nfs4trace.h:2534:25: note: in expansion of macro 'TP_PROTO'
    2534 |                         TP_PROTO( \
         |                         ^~~~~~~~
   fs/nfs/nfs4trace.h:2541:1: note: in expansion of macro 'DEFINE_NFS4_SPARSE_EVENT'
    2541 | DEFINE_NFS4_SPARSE_EVENT(nfs4_deallocate);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   fs/nfs/nfs4trace.h:2536:46: warning: 'struct nfs42_falloc_args' declared inside parameter list will not be visible outside of this definition or declaration
    2536 |                                 const struct nfs42_falloc_args *args, \
         |                                              ^~~~~~~~~~~~~~~~~
   include/linux/tracepoint.h:279:53: note: in definition of macro '__DECLARE_TRACE'
     279 |         check_trace_callback_type_##name(void (*cb)(data_proto))        \
         |                                                     ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:542:9: note: in expansion of macro 'DECLARE_TRACE'
     542 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:542:29: note: in expansion of macro 'PARAMS'
     542 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2533:9: note: in expansion of macro 'DEFINE_EVENT'
    2533 |         DEFINE_EVENT(nfs4_sparse_event, name, \
         |         ^~~~~~~~~~~~
   fs/nfs/nfs4trace.h:2534:25: note: in expansion of macro 'TP_PROTO'
    2534 |                         TP_PROTO( \
         |                         ^~~~~~~~
   fs/nfs/nfs4trace.h:2541:1: note: in expansion of macro 'DEFINE_NFS4_SPARSE_EVENT'
    2541 | DEFINE_NFS4_SPARSE_EVENT(nfs4_deallocate);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
>> fs/nfs/nfs4trace.h:2548:38: warning: 'struct nfs42_copy_res' declared inside parameter list will not be visible outside of this definition or declaration
    2548 |                         const struct nfs42_copy_res *res,
         |                                      ^~~~~~~~~~~~~~
   include/linux/tracepoint.h:242:39: note: in definition of macro '__DECLARE_TRACE'
     242 |         extern int __traceiter_##name(data_proto);                      \
         |                                       ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2544:17: note: in expansion of macro 'TP_PROTO'
    2544 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2547:38: warning: 'struct nfs42_copy_args' declared inside parameter list will not be visible outside of this definition or declaration
    2547 |                         const struct nfs42_copy_args *args,
         |                                      ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:242:39: note: in definition of macro '__DECLARE_TRACE'
     242 |         extern int __traceiter_##name(data_proto);                      \
         |                                       ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2544:17: note: in expansion of macro 'TP_PROTO'
    2544 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2548:38: warning: 'struct nfs42_copy_res' declared inside parameter list will not be visible outside of this definition or declaration
    2548 |                         const struct nfs42_copy_res *res,
         |                                      ^~~~~~~~~~~~~~
   include/linux/tracepoint.h:245:41: note: in definition of macro '__DECLARE_TRACE'
     245 |         static inline void trace_##name(proto)                          \
         |                                         ^~~~~
   include/linux/tracepoint.h:419:31: note: in expansion of macro 'PARAMS'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |                               ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2544:17: note: in expansion of macro 'TP_PROTO'
    2544 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2547:38: warning: 'struct nfs42_copy_args' declared inside parameter list will not be visible outside of this definition or declaration
    2547 |                         const struct nfs42_copy_args *args,
         |                                      ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:245:41: note: in definition of macro '__DECLARE_TRACE'
     245 |         static inline void trace_##name(proto)                          \
         |                                         ^~~~~
   include/linux/tracepoint.h:419:31: note: in expansion of macro 'PARAMS'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |                               ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2544:17: note: in expansion of macro 'TP_PROTO'
    2544 |                 TP_PROTO(
         |                 ^~~~~~~~
   fs/nfs/nfs4trace.h: In function 'trace_nfs4_copy':
>> fs/nfs/nfs4trace.h:2553:47: error: passing argument 4 of '__traceiter_nfs4_copy' from incompatible pointer type [-Werror=incompatible-pointer-types]
    2553 |                 TP_ARGS(src_inode, dst_inode, args, res, nss, error),
         |                                               ^~~~
         |                                               |
         |                                               const struct nfs42_copy_args *
   include/linux/tracepoint.h:177:66: note: in definition of macro '__DO_TRACE_CALL'
     177 | #define __DO_TRACE_CALL(name, args)     __traceiter_##name(NULL, args)
         |                                                                  ^~~~
   include/linux/tracepoint.h:206:39: note: in expansion of macro 'TP_ARGS'
     206 |                 __DO_TRACE_CALL(name, TP_ARGS(args));                   \
         |                                       ^~~~~~~
   include/linux/tracepoint.h:248:25: note: in expansion of macro '__DO_TRACE'
     248 |                         __DO_TRACE(name,                                \
         |                         ^~~~~~~~~~
   include/linux/tracepoint.h:249:33: note: in expansion of macro 'TP_ARGS'
     249 |                                 TP_ARGS(args),                          \
         |                                 ^~~~~~~
   include/linux/tracepoint.h:419:9: note: in expansion of macro '__DECLARE_TRACE'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |         ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:419:46: note: in expansion of macro 'PARAMS'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |                                              ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:44: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                                            ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2553:17: note: in expansion of macro 'TP_ARGS'
    2553 |                 TP_ARGS(src_inode, dst_inode, args, res, nss, error),
         |                 ^~~~~~~
   fs/nfs/nfs4trace.h:2547:55: note: expected 'const struct nfs42_copy_args *' but argument is of type 'const struct nfs42_copy_args *'
    2547 |                         const struct nfs42_copy_args *args,
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
   include/linux/tracepoint.h:242:39: note: in definition of macro '__DECLARE_TRACE'
     242 |         extern int __traceiter_##name(data_proto);                      \
         |                                       ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2544:17: note: in expansion of macro 'TP_PROTO'
    2544 |                 TP_PROTO(
         |                 ^~~~~~~~
   fs/nfs/nfs4trace.h:2553:53: error: passing argument 5 of '__traceiter_nfs4_copy' from incompatible pointer type [-Werror=incompatible-pointer-types]
    2553 |                 TP_ARGS(src_inode, dst_inode, args, res, nss, error),
         |                                                     ^~~
         |                                                     |
         |                                                     const struct nfs42_copy_res *
   include/linux/tracepoint.h:177:66: note: in definition of macro '__DO_TRACE_CALL'
     177 | #define __DO_TRACE_CALL(name, args)     __traceiter_##name(NULL, args)
         |                                                                  ^~~~
   include/linux/tracepoint.h:206:39: note: in expansion of macro 'TP_ARGS'
     206 |                 __DO_TRACE_CALL(name, TP_ARGS(args));                   \
         |                                       ^~~~~~~
   include/linux/tracepoint.h:248:25: note: in expansion of macro '__DO_TRACE'
     248 |                         __DO_TRACE(name,                                \
         |                         ^~~~~~~~~~
   include/linux/tracepoint.h:249:33: note: in expansion of macro 'TP_ARGS'
     249 |                                 TP_ARGS(args),                          \
         |                                 ^~~~~~~
   include/linux/tracepoint.h:419:9: note: in expansion of macro '__DECLARE_TRACE'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |         ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:419:46: note: in expansion of macro 'PARAMS'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |                                              ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:44: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                                            ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2553:17: note: in expansion of macro 'TP_ARGS'
    2553 |                 TP_ARGS(src_inode, dst_inode, args, res, nss, error),
         |                 ^~~~~~~
   fs/nfs/nfs4trace.h:2548:54: note: expected 'const struct nfs42_copy_res *' but argument is of type 'const struct nfs42_copy_res *'
    2548 |                         const struct nfs42_copy_res *res,
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   include/linux/tracepoint.h:242:39: note: in definition of macro '__DECLARE_TRACE'
     242 |         extern int __traceiter_##name(data_proto);                      \
         |                                       ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2544:17: note: in expansion of macro 'TP_PROTO'
    2544 |                 TP_PROTO(
         |                 ^~~~~~~~
   fs/nfs/nfs4trace.h: At top level:
>> fs/nfs/nfs4trace.h:2548:38: warning: 'struct nfs42_copy_res' declared inside parameter list will not be visible outside of this definition or declaration
    2548 |                         const struct nfs42_copy_res *res,
         |                                      ^~~~~~~~~~~~~~
   include/linux/tracepoint.h:218:51: note: in definition of macro '__DECLARE_TRACE_RCU'
     218 |         static inline void trace_##name##_rcuidle(proto)                \
         |                                                   ^~~~~
   include/linux/tracepoint.h:257:35: note: in expansion of macro 'PARAMS'
     257 |         __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args),          \
         |                                   ^~~~~~
   include/linux/tracepoint.h:419:9: note: in expansion of macro '__DECLARE_TRACE'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |         ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:419:31: note: in expansion of macro 'PARAMS'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |                               ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2544:17: note: in expansion of macro 'TP_PROTO'
    2544 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2547:38: warning: 'struct nfs42_copy_args' declared inside parameter list will not be visible outside of this definition or declaration
    2547 |                         const struct nfs42_copy_args *args,
         |                                      ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:218:51: note: in definition of macro '__DECLARE_TRACE_RCU'
     218 |         static inline void trace_##name##_rcuidle(proto)                \
         |                                                   ^~~~~
   include/linux/tracepoint.h:257:35: note: in expansion of macro 'PARAMS'
     257 |         __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args),          \
         |                                   ^~~~~~
   include/linux/tracepoint.h:419:9: note: in expansion of macro '__DECLARE_TRACE'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |         ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:419:31: note: in expansion of macro 'PARAMS'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |                               ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2544:17: note: in expansion of macro 'TP_PROTO'
    2544 |                 TP_PROTO(
         |                 ^~~~~~~~
   fs/nfs/nfs4trace.h: In function 'trace_nfs4_copy_rcuidle':
>> fs/nfs/nfs4trace.h:2553:47: error: passing argument 4 of '__traceiter_nfs4_copy' from incompatible pointer type [-Werror=incompatible-pointer-types]
    2553 |                 TP_ARGS(src_inode, dst_inode, args, res, nss, error),
         |                                               ^~~~
         |                                               |
         |                                               const struct nfs42_copy_args *
   include/linux/tracepoint.h:177:66: note: in definition of macro '__DO_TRACE_CALL'
     177 | #define __DO_TRACE_CALL(name, args)     __traceiter_##name(NULL, args)
         |                                                                  ^~~~
   include/linux/tracepoint.h:206:39: note: in expansion of macro 'TP_ARGS'
     206 |                 __DO_TRACE_CALL(name, TP_ARGS(args));                   \
         |                                       ^~~~~~~
   include/linux/tracepoint.h:221:25: note: in expansion of macro '__DO_TRACE'
     221 |                         __DO_TRACE(name,                                \
         |                         ^~~~~~~~~~
   include/linux/tracepoint.h:222:33: note: in expansion of macro 'TP_ARGS'
     222 |                                 TP_ARGS(args),                          \
         |                                 ^~~~~~~
   include/linux/tracepoint.h:257:9: note: in expansion of macro '__DECLARE_TRACE_RCU'
     257 |         __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args),          \
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/tracepoint.h:257:50: note: in expansion of macro 'PARAMS'
     257 |         __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args),          \
         |                                                  ^~~~~~
   include/linux/tracepoint.h:419:9: note: in expansion of macro '__DECLARE_TRACE'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |         ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:419:46: note: in expansion of macro 'PARAMS'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |                                              ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:44: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                                            ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2553:17: note: in expansion of macro 'TP_ARGS'
    2553 |                 TP_ARGS(src_inode, dst_inode, args, res, nss, error),
         |                 ^~~~~~~
   fs/nfs/nfs4trace.h:2547:55: note: expected 'const struct nfs42_copy_args *' but argument is of type 'const struct nfs42_copy_args *'
    2547 |                         const struct nfs42_copy_args *args,
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
   include/linux/tracepoint.h:242:39: note: in definition of macro '__DECLARE_TRACE'
     242 |         extern int __traceiter_##name(data_proto);                      \
         |                                       ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2544:17: note: in expansion of macro 'TP_PROTO'
    2544 |                 TP_PROTO(
         |                 ^~~~~~~~
   fs/nfs/nfs4trace.h:2553:53: error: passing argument 5 of '__traceiter_nfs4_copy' from incompatible pointer type [-Werror=incompatible-pointer-types]
    2553 |                 TP_ARGS(src_inode, dst_inode, args, res, nss, error),
         |                                                     ^~~
         |                                                     |
         |                                                     const struct nfs42_copy_res *
   include/linux/tracepoint.h:177:66: note: in definition of macro '__DO_TRACE_CALL'
     177 | #define __DO_TRACE_CALL(name, args)     __traceiter_##name(NULL, args)
         |                                                                  ^~~~
   include/linux/tracepoint.h:206:39: note: in expansion of macro 'TP_ARGS'
     206 |                 __DO_TRACE_CALL(name, TP_ARGS(args));                   \
         |                                       ^~~~~~~
   include/linux/tracepoint.h:221:25: note: in expansion of macro '__DO_TRACE'
     221 |                         __DO_TRACE(name,                                \
         |                         ^~~~~~~~~~
   include/linux/tracepoint.h:222:33: note: in expansion of macro 'TP_ARGS'
     222 |                                 TP_ARGS(args),                          \
         |                                 ^~~~~~~
   include/linux/tracepoint.h:257:9: note: in expansion of macro '__DECLARE_TRACE_RCU'
     257 |         __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args),          \
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/tracepoint.h:257:50: note: in expansion of macro 'PARAMS'
     257 |         __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args),          \
         |                                                  ^~~~~~
   include/linux/tracepoint.h:419:9: note: in expansion of macro '__DECLARE_TRACE'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |         ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:419:46: note: in expansion of macro 'PARAMS'
     419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
         |                                              ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:44: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                                            ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2553:17: note: in expansion of macro 'TP_ARGS'
    2553 |                 TP_ARGS(src_inode, dst_inode, args, res, nss, error),
         |                 ^~~~~~~
   fs/nfs/nfs4trace.h:2548:54: note: expected 'const struct nfs42_copy_res *' but argument is of type 'const struct nfs42_copy_res *'
    2548 |                         const struct nfs42_copy_res *res,
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   include/linux/tracepoint.h:242:39: note: in definition of macro '__DECLARE_TRACE'
     242 |         extern int __traceiter_##name(data_proto);                      \
         |                                       ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2544:17: note: in expansion of macro 'TP_PROTO'
    2544 |                 TP_PROTO(
         |                 ^~~~~~~~
   fs/nfs/nfs4trace.h: At top level:
>> fs/nfs/nfs4trace.h:2548:38: warning: 'struct nfs42_copy_res' declared inside parameter list will not be visible outside of this definition or declaration
    2548 |                         const struct nfs42_copy_res *res,
         |                                      ^~~~~~~~~~~~~~
   include/linux/tracepoint.h:260:45: note: in definition of macro '__DECLARE_TRACE'
     260 |         register_trace_##name(void (*probe)(data_proto), void *data)    \
         |                                             ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2544:17: note: in expansion of macro 'TP_PROTO'
    2544 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2547:38: warning: 'struct nfs42_copy_args' declared inside parameter list will not be visible outside of this definition or declaration
    2547 |                         const struct nfs42_copy_args *args,
         |                                      ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:260:45: note: in definition of macro '__DECLARE_TRACE'
     260 |         register_trace_##name(void (*probe)(data_proto), void *data)    \
         |                                             ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2544:17: note: in expansion of macro 'TP_PROTO'
    2544 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2548:38: warning: 'struct nfs42_copy_res' declared inside parameter list will not be visible outside of this definition or declaration
    2548 |                         const struct nfs42_copy_res *res,
         |                                      ^~~~~~~~~~~~~~
   include/linux/tracepoint.h:266:50: note: in definition of macro '__DECLARE_TRACE'
     266 |         register_trace_prio_##name(void (*probe)(data_proto), void *data,\
         |                                                  ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2544:17: note: in expansion of macro 'TP_PROTO'
    2544 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2547:38: warning: 'struct nfs42_copy_args' declared inside parameter list will not be visible outside of this definition or declaration
    2547 |                         const struct nfs42_copy_args *args,
         |                                      ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:266:50: note: in definition of macro '__DECLARE_TRACE'
     266 |         register_trace_prio_##name(void (*probe)(data_proto), void *data,\
         |                                                  ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2544:17: note: in expansion of macro 'TP_PROTO'
    2544 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2548:38: warning: 'struct nfs42_copy_res' declared inside parameter list will not be visible outside of this definition or declaration
    2548 |                         const struct nfs42_copy_res *res,
         |                                      ^~~~~~~~~~~~~~
   include/linux/tracepoint.h:273:47: note: in definition of macro '__DECLARE_TRACE'
     273 |         unregister_trace_##name(void (*probe)(data_proto), void *data)  \
         |                                               ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2544:17: note: in expansion of macro 'TP_PROTO'
    2544 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2547:38: warning: 'struct nfs42_copy_args' declared inside parameter list will not be visible outside of this definition or declaration
    2547 |                         const struct nfs42_copy_args *args,
         |                                      ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:273:47: note: in definition of macro '__DECLARE_TRACE'
     273 |         unregister_trace_##name(void (*probe)(data_proto), void *data)  \
         |                                               ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2544:17: note: in expansion of macro 'TP_PROTO'
    2544 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2548:38: warning: 'struct nfs42_copy_res' declared inside parameter list will not be visible outside of this definition or declaration
    2548 |                         const struct nfs42_copy_res *res,
         |                                      ^~~~~~~~~~~~~~
   include/linux/tracepoint.h:279:53: note: in definition of macro '__DECLARE_TRACE'
     279 |         check_trace_callback_type_##name(void (*cb)(data_proto))        \
         |                                                     ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2544:17: note: in expansion of macro 'TP_PROTO'
    2544 |                 TP_PROTO(
         |                 ^~~~~~~~
>> fs/nfs/nfs4trace.h:2547:38: warning: 'struct nfs42_copy_args' declared inside parameter list will not be visible outside of this definition or declaration
    2547 |                         const struct nfs42_copy_args *args,
         |                                      ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:279:53: note: in definition of macro '__DECLARE_TRACE'
     279 |         check_trace_callback_type_##name(void (*cb)(data_proto))        \
         |                                                     ^~~~~~~~~~
   include/linux/tracepoint.h:421:25: note: in expansion of macro 'PARAMS'
     421 |                         PARAMS(void *__data, proto))
         |                         ^~~~~~
   include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |         ^~~~~~~~~~~~~
   include/linux/tracepoint.h:553:29: note: in expansion of macro 'PARAMS'
     553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
         |                             ^~~~~~
   fs/nfs/nfs4trace.h:2543:1: note: in expansion of macro 'TRACE_EVENT'
    2543 | TRACE_EVENT(nfs4_copy,
         | ^~~~~~~~~~~
   fs/nfs/nfs4trace.h:2544:17: note: in expansion of macro 'TP_PROTO'
    2544 |                 TP_PROTO(
         |                 ^~~~~~~~
   fs/nfs/nfs4proc.c: In function 'nfs4_proc_create_session':
   fs/nfs/nfs4proc.c:9104:19: warning: variable 'ptr' set but not used [-Wunused-but-set-variable]
    9104 |         unsigned *ptr;
         |                   ^~~
   cc1: some warnings being treated as errors
..


vim +/__traceiter_nfs4_copy +2553 fs/nfs/nfs4trace.h

  2542	
  2543	TRACE_EVENT(nfs4_copy,
  2544			TP_PROTO(
  2545				const struct inode *src_inode,
  2546				const struct inode *dst_inode,
> 2547				const struct nfs42_copy_args *args,
> 2548				const struct nfs42_copy_res *res,
  2549				const struct nl4_server *nss,
  2550				int error
  2551			),
  2552	
> 2553			TP_ARGS(src_inode, dst_inode, args, res, nss, error),
  2554	
  2555			TP_STRUCT__entry(
  2556				__field(unsigned long, error)
  2557				__field(u32, src_fhandle)
  2558				__field(u32, src_fileid)
  2559				__field(u32, dst_fhandle)
  2560				__field(u32, dst_fileid)
  2561				__field(dev_t, src_dev)
  2562				__field(dev_t, dst_dev)
  2563				__field(int, src_stateid_seq)
  2564				__field(u32, src_stateid_hash)
  2565				__field(int, dst_stateid_seq)
  2566				__field(u32, dst_stateid_hash)
  2567				__field(loff_t, src_offset)
  2568				__field(loff_t, dst_offset)
  2569				__field(bool, sync)
  2570				__field(loff_t, len)
  2571				__field(int, res_stateid_seq)
  2572				__field(u32, res_stateid_hash)
  2573				__field(loff_t, res_count)
  2574				__field(bool, res_sync)
  2575				__field(bool, res_cons)
  2576				__field(bool, intra)
  2577			),
  2578	
  2579			TP_fast_assign(
  2580				const struct nfs_inode *src_nfsi = NFS_I(src_inode);
  2581				const struct nfs_inode *dst_nfsi = NFS_I(dst_inode);
  2582	
  2583				__entry->src_fileid = src_nfsi->fileid;
  2584				__entry->src_dev = src_inode->i_sb->s_dev;
  2585				__entry->src_fhandle = nfs_fhandle_hash(args->src_fh);
  2586				__entry->src_offset = args->src_pos;
  2587				__entry->dst_fileid = dst_nfsi->fileid;
  2588				__entry->dst_dev = dst_inode->i_sb->s_dev;
  2589				__entry->dst_fhandle = nfs_fhandle_hash(args->dst_fh);
  2590				__entry->dst_offset = args->dst_pos;
  2591				__entry->len = args->count;
  2592				__entry->sync = args->sync;
  2593				__entry->error = error < 0 ? -error : 0;
  2594				__entry->src_stateid_seq =
  2595					be32_to_cpu(args->src_stateid.seqid);
  2596				__entry->src_stateid_hash =
  2597					nfs_stateid_hash(&args->src_stateid);
  2598				__entry->dst_stateid_seq =
  2599					be32_to_cpu(args->dst_stateid.seqid);
  2600				__entry->dst_stateid_hash =
  2601					nfs_stateid_hash(&args->dst_stateid);
  2602				__entry->res_stateid_seq = error < 0 ? 0 :
  2603					be32_to_cpu(res->write_res.stateid.seqid);
  2604				__entry->res_stateid_hash = error < 0 ? 0 :
  2605					nfs_stateid_hash(&res->write_res.stateid);
  2606				__entry->res_count = error < 0 ? 0 :
  2607					res->write_res.count;
  2608				__entry->res_sync = error < 0 ? 0 :
  2609					res->synchronous;
  2610				__entry->res_cons = error < 0 ? 0 :
  2611					res->consecutive;
  2612				__entry->intra = nss ? 0 : 1;
  2613			),
  2614	
  2615			TP_printk(
  2616				"error=%ld (%s) intra=%d src_fileid=%02x:%02x:%llu "
  2617				"src_fhandle=0x%08x dst_fileid=%02x:%02x:%llu "
  2618				"dst_fhandle=0x%08x src_stateid=%d:0x%08x "
  2619				"dst_stateid=%d:0x%08x src_offset=%llu dst_offset=%llu "
  2620				"len=%llu sync=%d cb_stateid=%d:0x%08x res_sync=%d "
  2621				"res_cons=%d res_count=%llu",
  2622				-__entry->error,
  2623				show_nfsv4_errors(__entry->error),
  2624				__entry->intra,
  2625				MAJOR(__entry->src_dev), MINOR(__entry->src_dev),
  2626				(unsigned long long)__entry->src_fileid,
  2627				__entry->src_fhandle,
  2628				MAJOR(__entry->dst_dev), MINOR(__entry->dst_dev),
  2629				(unsigned long long)__entry->dst_fileid,
  2630				__entry->dst_fhandle,
  2631				__entry->src_stateid_seq, __entry->src_stateid_hash,
  2632				__entry->dst_stateid_seq, __entry->dst_stateid_hash,
  2633				__entry->src_offset,
  2634				__entry->dst_offset,
  2635				__entry->len,
  2636				__entry->sync,
  2637				__entry->res_stateid_seq, __entry->res_stateid_hash,
  2638				__entry->res_sync,
  2639				__entry->res_cons,
  2640				__entry->res_count
  2641			)
  2642	);
  2643	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35928 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-10-27 14:30 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-18 22:03 [PATCH 0/7] NFSv4.2 add tracepoints to sparse files and copy Olga Kornievskaia
2021-10-18 22:03 ` [PATCH 1/7] NFSv4.2 add tracepoint to SEEK Olga Kornievskaia
2021-10-19 17:08   ` Anna Schumaker
2021-10-27  7:50   ` kernel test robot
2021-10-18 22:03 ` [PATCH 2/7] NFSv4.2 add tracepoints to FALLOCATE and DEALLOCATE Olga Kornievskaia
2021-10-18 22:03 ` [PATCH 3/7] NFSv4.2 add tracepoint to COPY Olga Kornievskaia
2021-10-19 15:31   ` Chuck Lever III
2021-10-19 15:51     ` Olga Kornievskaia
2021-10-19 16:01       ` Chuck Lever III
2021-10-27 14:28   ` kernel test robot
2021-10-18 22:03 ` [PATCH 4/7] NFSv4.2 add tracepoint to CLONE Olga Kornievskaia
2021-10-18 22:03 ` [PATCH 5/7] NFSv4.2 add tracepoint to CB_OFFLOAD Olga Kornievskaia
2021-10-19 15:16   ` Chuck Lever III
2021-10-19 16:01     ` Olga Kornievskaia
2021-10-19 16:35       ` Chuck Lever III
2021-10-18 22:03 ` [PATCH 6/7] NFSv4.2 add tracepoint to COPY_NOTIFY Olga Kornievskaia
2021-10-18 22:03 ` [PATCH 7/7] NFSv4.2 add tracepoint to OFFLOAD_CANCEL Olga Kornievskaia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox