linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Kassey Li <quic_yingangl@quicinc.com>
Cc: brauner@kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] iomap: Add processed for iomap_iter
Date: Wed, 21 Feb 2024 08:31:05 -0800	[thread overview]
Message-ID: <20240221163105.GG6184@frogsfrogsfrogs> (raw)
In-Reply-To: <20240219021138.3481763-1-quic_yingangl@quicinc.com>

On Mon, Feb 19, 2024 at 10:11:38AM +0800, Kassey Li wrote:
> processed: The number of bytes processed by the body in the
> most recent  iteration, or a negative errno. 0 causes the iteration to
> stop.
> 
> The processed is useful to check when the loop breaks.
> 
> Signed-off-by: Kassey Li <quic_yingangl@quicinc.com>

Heh, sorry I didn't even see this one before it got merged, but:
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  fs/iomap/trace.h | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/iomap/trace.h b/fs/iomap/trace.h
> index c16fd55f5595..ff87ac58b6b7 100644
> --- a/fs/iomap/trace.h
> +++ b/fs/iomap/trace.h
> @@ -165,6 +165,7 @@ TRACE_EVENT(iomap_iter,
>  		__field(u64, ino)
>  		__field(loff_t, pos)
>  		__field(u64, length)
> +		__field(s64, processed)
>  		__field(unsigned int, flags)
>  		__field(const void *, ops)
>  		__field(unsigned long, caller)
> @@ -174,15 +175,17 @@ TRACE_EVENT(iomap_iter,
>  		__entry->ino = iter->inode->i_ino;
>  		__entry->pos = iter->pos;
>  		__entry->length = iomap_length(iter);
> +		__entry->processed = iter->processed;
>  		__entry->flags = iter->flags;
>  		__entry->ops = ops;
>  		__entry->caller = caller;
>  	),
> -	TP_printk("dev %d:%d ino 0x%llx pos 0x%llx length 0x%llx flags %s (0x%x) ops %ps caller %pS",
> +	TP_printk("dev %d:%d ino 0x%llx pos 0x%llx length 0x%llx processed %lld flags %s (0x%x) ops %ps caller %pS",
>  		  MAJOR(__entry->dev), MINOR(__entry->dev),
>  		   __entry->ino,
>  		   __entry->pos,
>  		   __entry->length,
> +		   __entry->processed,
>  		   __print_flags(__entry->flags, "|", IOMAP_FLAGS_STRINGS),
>  		   __entry->flags,
>  		   __entry->ops,
> -- 
> 2.25.1
> 
> 

  parent reply	other threads:[~2024-02-21 16:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19  2:11 [PATCH] iomap: Add processed for iomap_iter Kassey Li
2024-02-21  7:38 ` Christian Brauner
2024-02-21 16:31 ` Darrick J. Wong [this message]
2024-02-22  9:22   ` Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240221163105.GG6184@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=quic_yingangl@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).