Re: [PATCH 4/4] nfs: new tracepoint in match_stateid operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3 Jun 2025, at 7:42, Jeff Layton wrote:

> Add new tracepoints in the NFSv4 match_stateid minorversion op that show
> the info in both stateids.
>
> Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
> ---
>  fs/nfs/nfs4proc.c  |  4 ++++
>  fs/nfs/nfs4trace.h | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 60 insertions(+)
>
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index 341740fa293d8fb1cfabe0813c7fcadf04df4f62..80126290589aaccd801c8965252523894e37c44a 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -10680,6 +10680,8 @@ nfs41_free_lock_state(struct nfs_server *server, struct nfs4_lock_state *lsp)
>  static bool nfs41_match_stateid(const nfs4_stateid *s1,
>  		const nfs4_stateid *s2)
>  {
> +	trace_nfs41_match_stateid(s1, s2);
> +
>  	if (s1->type != s2->type)
>  		return false;
>
> @@ -10697,6 +10699,8 @@ static bool nfs41_match_stateid(const nfs4_stateid *s1,
>  static bool nfs4_match_stateid(const nfs4_stateid *s1,
>  		const nfs4_stateid *s2)
>  {
> +	trace_nfs4_match_stateid(s1, s2);
> +
>  	return nfs4_stateid_match(s1, s2);
>  }
>
> diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
> index 73a6b60a848066546c2ae98b4982b0ab36bb0f73..9b56ce9f2f3dcb31a3e21d5740bcf62aca814214 100644
> --- a/fs/nfs/nfs4trace.h
> +++ b/fs/nfs/nfs4trace.h
> @@ -1497,6 +1497,62 @@ DECLARE_EVENT_CLASS(nfs4_inode_stateid_callback_event,
>  DEFINE_NFS4_INODE_STATEID_CALLBACK_EVENT(nfs4_cb_recall);
>  DEFINE_NFS4_INODE_STATEID_CALLBACK_EVENT(nfs4_cb_layoutrecall_file);
>
> +#define show_stateid_type(type) \
> +	__print_symbolic(type, \
> +		{ NFS4_INVALID_STATEID_TYPE, "INVALID" }, \
> +		{ NFS4_SPECIAL_STATEID_TYPE, "SPECIAL" }, \
> +		{ NFS4_OPEN_STATEID_TYPE, "OPEN" }, \
> +		{ NFS4_LOCK_STATEID_TYPE, "LOCK" }, \
> +		{ NFS4_DELEGATION_STATEID_TYPE, "DELEGATION" }, \
> +		{ NFS4_LAYOUT_STATEID_TYPE, "LAYOUT" },	\
> +		{ NFS4_PNFS_DS_STATEID_TYPE, "PNFS_DS" }, \
> +		{ NFS4_REVOKED_STATEID_TYPE, "REVOKED" })

Let's add NFS4_FREED_STATEID_TYPE at the end here, for after 77be29b7a3f89.

Reviewed-by: Benjamin Coddington <bcodding@xxxxxxxxxx>

Ben






[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux