From: Chao Yu via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: jaegeuk@kernel.org
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] [PATCH] f2fs_io: fix to keep output order of do_read() for forward compatibility
Date: Mon, 10 Nov 2025 17:04:09 +0800 [thread overview]
Message-ID: <20251110090409.1279009-1-chao@kernel.org> (raw)
Some scripts relies on output order of do_read(), let's append the
new logs to keep forward compatibility.
e.g.
f2fs_io read 128 0 $((2*1024)) buffered 1 0 /mnt/f2fs/file
Before:
Read 1073741824 bytes IO time = 153715 us mlock time = 0 us, BW = 6985 MB/s print 0 bytes:
00000000 :
After:
Read 1073741824 bytes total_time = 155166 us, BW = 6920 MB/s, IO time = 155166 us, mlock time = 0 us, print 0 bytes:
00000000 :
Fixes: 615036f ("f2fs_io: calculate IO bandwidth vs. mlock latency")
Signed-off-by: Chao Yu <chao@kernel.org>
---
tools/f2fs_io/f2fs_io.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c
index 231da47..326b3bd 100644
--- a/tools/f2fs_io/f2fs_io.c
+++ b/tools/f2fs_io/f2fs_io.c
@@ -1065,10 +1065,13 @@ static void do_read(int argc, char **argv, const struct cmd_desc *cmd)
}
io_time_end = get_current_us();
}
- printf("Read %"PRIu64" bytes IO time = %"PRIu64" us mlock time = %"PRIu64" us, BW = %.Lf MB/s print %u bytes:\n",
- read_cnt, io_time_end - io_time_start,
+ printf("Read %"PRIu64" bytes total_time = %"PRIu64" us, BW = %.Lf MB/s, "
+ "IO time = %"PRIu64" us, mlock time = %"PRIu64" us, print %u bytes:\n",
+ read_cnt, get_current_us() - io_time_start,
+ ((long double)read_cnt / (get_current_us() - io_time_start)),
+ io_time_end - io_time_start,
mlock_time_end - mlock_time_start,
- ((long double)read_cnt / (io_time_end - io_time_start)), print_bytes);
+ print_bytes);
printf("%08"PRIx64" : ", offset);
for (i = 1; i <= print_bytes; i++) {
printf("%02x", print_buf[i - 1]);
--
2.49.0
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
reply other threads:[~2025-11-10 9:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20251110090409.1279009-1-chao@kernel.org \
--to=linux-f2fs-devel@lists.sourceforge.net \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
/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).