2021-10-18 22:05:27

by Olga Kornievskaia

[permalink] [raw]
Subject: [PATCH 0/7] NFSv4.2 add tracepoints to sparse files and copy

From: Olga Kornievskaia <[email protected]>

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


2021-10-18 22:05:27

by Olga Kornievskaia

[permalink] [raw]
Subject: [PATCH 2/7] NFSv4.2 add tracepoints to FALLOCATE and DEALLOCATE

From: Olga Kornievskaia <[email protected]>

Add a tracepoint to the FALLOCATE/DEALLOCATE operations.

Signed-off-by: Olga Kornievskaia <[email protected]>
---
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

2021-10-18 22:05:27

by Olga Kornievskaia

[permalink] [raw]
Subject: [PATCH 5/7] NFSv4.2 add tracepoint to CB_OFFLOAD

From: Olga Kornievskaia <[email protected]>

Add a tracepoint to the CB_OFFLOAD operation.

Signed-off-by: Olga Kornievskaia <[email protected]>
---
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

2021-10-18 22:05:27

by Olga Kornievskaia

[permalink] [raw]
Subject: [PATCH 4/7] NFSv4.2 add tracepoint to CLONE

From: Olga Kornievskaia <[email protected]>

Add a tracepoint to the CLONE operation.

Signed-off-by: Olga Kornievskaia <[email protected]>
---
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

2021-10-18 22:05:27

by Olga Kornievskaia

[permalink] [raw]
Subject: [PATCH 3/7] NFSv4.2 add tracepoint to COPY

From: Olga Kornievskaia <[email protected]>

Add a tracepoint to the COPY operation.

Signed-off-by: Olga Kornievskaia <[email protected]>
---
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

2021-10-18 22:06:20

by Olga Kornievskaia

[permalink] [raw]
Subject: [PATCH 6/7] NFSv4.2 add tracepoint to COPY_NOTIFY

From: Olga Kornievskaia <[email protected]>

Add a tracepoint to COPY_NOTIFY operation.

Signed-off-by: Olga Kornievskaia <[email protected]>
---
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

2021-10-19 15:17:46

by Chuck Lever III

[permalink] [raw]
Subject: Re: [PATCH 5/7] NFSv4.2 add tracepoint to CB_OFFLOAD



> On Oct 18, 2021, at 6:03 PM, Olga Kornievskaia <[email protected]> wrote:
>
> From: Olga Kornievskaia <[email protected]>
>
> Add a tracepoint to the CB_OFFLOAD operation.
>
> Signed-off-by: Olga Kornievskaia <[email protected]>
> ---
> 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



2021-10-19 15:31:45

by Chuck Lever III

[permalink] [raw]
Subject: Re: [PATCH 3/7] NFSv4.2 add tracepoint to COPY



> On Oct 18, 2021, at 6:03 PM, Olga Kornievskaia <[email protected]> wrote:
>
> From: Olga Kornievskaia <[email protected]>
>
> Add a tracepoint to the COPY operation.
>
> Signed-off-by: Olga Kornievskaia <[email protected]>
> ---
> 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



2021-10-19 15:54:14

by Olga Kornievskaia

[permalink] [raw]
Subject: Re: [PATCH 3/7] NFSv4.2 add tracepoint to COPY

On Tue, Oct 19, 2021 at 11:31 AM Chuck Lever III <[email protected]> wrote:
>
>
>
> > On Oct 18, 2021, at 6:03 PM, Olga Kornievskaia <[email protected]> wrote:
> >
> > From: Olga Kornievskaia <[email protected]>
> >
> > Add a tracepoint to the COPY operation.
> >
> > Signed-off-by: Olga Kornievskaia <[email protected]>
> > ---
> > 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
>
>
>

2021-10-19 16:02:29

by Chuck Lever III

[permalink] [raw]
Subject: Re: [PATCH 3/7] NFSv4.2 add tracepoint to COPY



> On Oct 19, 2021, at 11:51 AM, Olga Kornievskaia <[email protected]> wrote:
>
> On Tue, Oct 19, 2021 at 11:31 AM Chuck Lever III <[email protected]> wrote:
>>
>>
>>
>>> On Oct 18, 2021, at 6:03 PM, Olga Kornievskaia <[email protected]> wrote:
>>>
>>> From: Olga Kornievskaia <[email protected]>
>>>
>>> Add a tracepoint to the COPY operation.
>>>
>>> Signed-off-by: Olga Kornievskaia <[email protected]>
>>> ---
>>> 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



2021-10-19 16:04:22

by Olga Kornievskaia

[permalink] [raw]
Subject: Re: [PATCH 5/7] NFSv4.2 add tracepoint to CB_OFFLOAD

On Tue, Oct 19, 2021 at 11:17 AM Chuck Lever III <[email protected]> wrote:
>
>
>
> > On Oct 18, 2021, at 6:03 PM, Olga Kornievskaia <[email protected]> wrote:
> >
> > From: Olga Kornievskaia <[email protected]>
> >
> > Add a tracepoint to the CB_OFFLOAD operation.
> >
> > Signed-off-by: Olga Kornievskaia <[email protected]>
> > ---
> > 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
>
>
>

2021-10-19 16:36:31

by Chuck Lever III

[permalink] [raw]
Subject: Re: [PATCH 5/7] NFSv4.2 add tracepoint to CB_OFFLOAD



> On Oct 19, 2021, at 12:01 PM, Olga Kornievskaia <[email protected]> wrote:
>
> On Tue, Oct 19, 2021 at 11:17 AM Chuck Lever III <[email protected]> wrote:
>>
>>
>>
>>> On Oct 18, 2021, at 6:03 PM, Olga Kornievskaia <[email protected]> wrote:
>>>
>>> From: Olga Kornievskaia <[email protected]>
>>>
>>> Add a tracepoint to the CB_OFFLOAD operation.
>>>
>>> Signed-off-by: Olga Kornievskaia <[email protected]>
>>> ---
>>> 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



2021-10-27 21:29:08

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 3/7] NFSv4.2 add tracepoint to COPY

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 <[email protected]>

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/[email protected]


Attachments:
(No filename) (48.22 kB)
.config.gz (35.09 kB)
Download all attachments