From: Damien Le Moal <dlemoal@kernel.org>
To: fio@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
Vincent Fu <vincentfu@gmail.com>
Subject: [PATCH v3 4/8] engines: io_uring: add support for DDIR_SYNCFS
Date: Fri, 27 Feb 2026 14:55:34 +0900 [thread overview]
Message-ID: <20260227055538.2334916-5-dlemoal@kernel.org> (raw)
In-Reply-To: <20260227055538.2334916-1-dlemoal@kernel.org>
Flag the io_uring engine with the FIO_ASYNCIO_SYNC_SYNCFS flag to
indicate that the syncfs operation is supported, synchronously.
Modify fio_ioring_queue() to call do_io_u_sync() for an io_u that has
the DDIR_SYNCFS data direction.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
engines/io_uring.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/engines/io_uring.c b/engines/io_uring.c
index 0ea3aba12e2c..d4dff3b8f275 100644
--- a/engines/io_uring.c
+++ b/engines/io_uring.c
@@ -890,12 +890,19 @@ static enum fio_q_status fio_ioring_queue(struct thread_data *td,
if (ld->queued == td->o.iodepth)
return FIO_Q_BUSY;
- /* if async trim has been tried and failed, punt to sync */
- if (io_u->ddir == DDIR_TRIM && ld->async_trim_fail) {
+ /*
+ * If this is a syncfs request, or if async trim has been tried and
+ * failed, punt to sync.
+ * */
+ if (io_u->ddir == DDIR_SYNCFS ||
+ (io_u->ddir == DDIR_TRIM && ld->async_trim_fail)) {
if (ld->queued)
return FIO_Q_BUSY;
- do_io_u_trim(td, io_u);
+ if (io_u->ddir == DDIR_TRIM)
+ do_io_u_trim(td, io_u);
+ else
+ do_io_u_sync(td, io_u);
io_u_mark_submit(td, 1);
io_u_mark_complete(td, 1);
@@ -2013,7 +2020,8 @@ static struct ioengine_ops ioengine_uring_cmd = {
.version = FIO_IOOPS_VERSION,
.flags = FIO_NO_OFFLOAD | FIO_MEMALIGN | FIO_RAWIO |
FIO_ASYNCIO_SETS_ISSUE_TIME |
- FIO_MULTI_RANGE_TRIM,
+ FIO_MULTI_RANGE_TRIM |
+ FIO_ASYNCIO_SYNC_SYNCFS,
.init = fio_ioring_init,
.post_init = fio_ioring_cmd_post_init,
.io_u_init = fio_ioring_io_u_init,
--
2.53.0
next prev parent reply other threads:[~2026-02-27 6:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-27 5:55 [PATCH v3 0/8] Introduce the end_syncfs option Damien Le Moal
2026-02-27 5:55 ` [PATCH v3 1/8] fio: introduce " Damien Le Moal
2026-02-27 5:55 ` [PATCH v3 2/8] engines: sync: add support for DDIR_SYNCFS Damien Le Moal
2026-02-27 5:55 ` [PATCH v3 3/8] engines: libaio: " Damien Le Moal
2026-02-27 5:55 ` Damien Le Moal [this message]
2026-02-27 5:55 ` [PATCH v3 5/8] engines: fallocate: " Damien Le Moal
2026-02-27 5:55 ` [PATCH v3 6/8] engines: fileoperations: " Damien Le Moal
2026-02-27 5:55 ` [PATCH v3 7/8] engines: ftruncate: " Damien Le Moal
2026-02-27 5:55 ` [PATCH v3 8/8] engines: posixaio: " Damien Le Moal
2026-02-27 7:11 ` [PATCH v3 0/8] Introduce the end_syncfs option fiotestbot
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=20260227055538.2334916-5-dlemoal@kernel.org \
--to=dlemoal@kernel.org \
--cc=axboe@kernel.dk \
--cc=fio@vger.kernel.org \
--cc=vincentfu@gmail.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