[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260205191717.2066475-1-clm@meta.com>
Date: Thu, 5 Feb 2026 11:16:54 -0800
From: Chris Mason <clm@...a.com>
To: "Darrick J. Wong" <djwong@...nel.org>
CC: <miklos@...redi.hu>, <joannelkoong@...il.com>, <bernd@...ernd.com>,
<neal@...pa.dev>, <linux-ext4@...r.kernel.org>,
<linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH 13/31] fuse_trace: implement direct IO with iomap
"Darrick J. Wong" <djwong@...nel.org> wrote:
> From: Darrick J. Wong <djwong@...nel.org>
>
> Add tracepoints for the previous patch.
>
commit 3fad15ebe8d51187a2b6820ed6db4774a8b065b0
Author: Darrick J. Wong <djwong@...nel.org>
fuse_trace: implement direct IO with iomap
Add tracepoints for the previous patch.
> diff --git a/fs/fuse/fuse_trace.h b/fs/fuse/fuse_trace.h
> index 730ab8bce4445..efba6ecbbf670 100644
> --- a/fs/fuse/fuse_trace.h
> +++ b/fs/fuse/fuse_trace.h
[ ... ]
> @@ -484,6 +499,75 @@ TRACE_EVENT(fuse_iomap_end_error,
> +TRACE_EVENT(fuse_iomap_ioend,
> + TP_PROTO(const struct inode *inode,
> + const struct fuse_iomap_ioend_in *inarg),
> +
> + TP_ARGS(inode, inarg),
> +
> + TP_STRUCT__entry(
> + FUSE_IO_RANGE_FIELDS()
> + __field(unsigned, ioendflags)
> + __field(int, error)
> + __field(uint32_t, dev)
> + __field(uint64_t, new_addr)
> + ),
> +
> + TP_fast_assign(
> + FUSE_INODE_ASSIGN(inode, fi, fm);
> + __entry->offset = inarg->pos;
> + __entry->length = inarg->written;
> + __entry->ioendflags = inarg->flags;
> + __entry->error = inarg->error;
> + __entry->dev = inarg->dev;
> + __entry->new_addr = inarg->new_addr;
> + ),
> +
> + TP_printk(FUSE_IO_RANGE_FMT() " ioendflags (%s) error %d dev %u new_addr 0x%llx",
> + FUSE_IO_RANGE_PRINTK_ARGS(),
> + __print_flags(__entry->ioendflags, "|", FUSE_IOMAP_IOEND_STRINGS),
> + __entry->dev,
> + __entry->error,
> + __entry->new_addr)
^^^^
Are the error and dev fields swapped in the argument list?
The format string expects 'error %d dev %u' but the arguments are
provided as __entry->dev, __entry->error. This would cause the trace
output to display the dev value as error and the error value as dev.
> +);
> +
> +TRACE_EVENT(fuse_iomap_ioend_error,
> + TP_PROTO(const struct inode *inode,
> + const struct fuse_iomap_ioend_in *inarg,
> + const struct fuse_iomap_ioend_out *outarg,
> + int error),
> +
> + TP_ARGS(inode, inarg, outarg, error),
> +
> + TP_STRUCT__entry(
> + FUSE_IO_RANGE_FIELDS()
> + __field(unsigned, ioendflags)
> + __field(int, error)
> + __field(uint32_t, dev)
> + __field(uint64_t, new_addr)
> + __field(uint64_t, new_size)
> + ),
> +
> + TP_fast_assign(
> + FUSE_INODE_ASSIGN(inode, fi, fm);
> + __entry->offset = inarg->pos;
> + __entry->length = inarg->written;
> + __entry->ioendflags = inarg->flags;
> + __entry->error = error;
> + __entry->dev = inarg->dev;
> + __entry->new_addr = inarg->new_addr;
> + __entry->new_size = outarg->newsize;
> + ),
> +
> + TP_printk(FUSE_IO_RANGE_FMT() " ioendflags (%s) error %d dev %u new_addr 0x%llx new_size 0x%llx",
> + FUSE_IO_RANGE_PRINTK_ARGS(),
> + __print_flags(__entry->ioendflags, "|", FUSE_IOMAP_IOEND_STRINGS),
> + __entry->dev,
> + __entry->error,
> + __entry->new_addr,
> + __entry->new_size)
^^^^
Same issue here. The format string expects 'error %d dev %u' but the
arguments are provided as __entry->dev, __entry->error, swapping the
values in the trace output.
> +);
> +
[ ... ]
Powered by blists - more mailing lists