From: Damien Le Moal <dlemoal@kernel.org>
To: fio@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
Vincent Fu <vincentfu@gmail.com>
Subject: [PATCH v4 8/8] engines: posixaio: add support for DDIR_SYNCFS
Date: Fri, 27 Feb 2026 17:07:11 +0900 [thread overview]
Message-ID: <20260227080712.2422380-9-dlemoal@kernel.org> (raw)
In-Reply-To: <20260227080712.2422380-1-dlemoal@kernel.org>
Flag the posixaio IO engine with FIO_ASYNCIO_SYNC_SYNCFS to indicate
that it supports the syncfs operation, synchronously. Also change
fio_posixaio_queue() to execute aio_fsync() only for sync operations
that are not a syncfs, in which case, we directly call do_io_u_sync().
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
engines/posixaio.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/engines/posixaio.c b/engines/posixaio.c
index 2d0ac9fcc369..828e535157a0 100644
--- a/engines/posixaio.c
+++ b/engines/posixaio.c
@@ -142,7 +142,10 @@ static enum fio_q_status fio_posixaio_queue(struct thread_data *td,
return FIO_Q_COMPLETED;
} else {
#ifdef CONFIG_POSIXAIO_FSYNC
- ret = aio_fsync(O_SYNC, aiocb);
+ if (io_u->ddir != DDIR_SYNCFS)
+ ret = aio_fsync(O_SYNC, aiocb);
+ else
+ ret = 0;
#else
if (pd->queued)
return FIO_Q_BUSY;
@@ -196,7 +199,8 @@ static int fio_posixaio_init(struct thread_data *td)
static struct ioengine_ops ioengine = {
.name = "posixaio",
.version = FIO_IOOPS_VERSION,
- .flags = FIO_ASYNCIO_SYNC_TRIM,
+ .flags = FIO_ASYNCIO_SYNC_TRIM |
+ FIO_ASYNCIO_SYNC_SYNCFS,
.init = fio_posixaio_init,
.prep = fio_posixaio_prep,
.queue = fio_posixaio_queue,
--
2.53.0
next prev parent reply other threads:[~2026-02-27 8:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-27 8:07 [PATCH v4 0/8] Introduce the end_syncfs option Damien Le Moal
2026-02-27 8:07 ` [PATCH v4 1/8] fio: introduce " Damien Le Moal
2026-02-27 8:07 ` [PATCH v4 2/8] engines: sync: add support for DDIR_SYNCFS Damien Le Moal
2026-02-27 8:07 ` [PATCH v4 3/8] engines: libaio: " Damien Le Moal
2026-02-27 8:07 ` [PATCH v4 4/8] engines: io_uring: " Damien Le Moal
2026-02-27 8:07 ` [PATCH v4 5/8] engines: fallocate: " Damien Le Moal
2026-02-27 8:07 ` [PATCH v4 6/8] engines: fileoperations: " Damien Le Moal
2026-02-27 8:07 ` [PATCH v4 7/8] engines: ftruncate: " Damien Le Moal
2026-02-27 8:07 ` Damien Le Moal [this message]
2026-02-27 9:07 ` [PATCH v4 0/8] Introduce the end_syncfs option fiotestbot
2026-03-01 10:47 ` Sitsofe Wheeler
2026-03-02 2:18 ` Damien Le Moal
2026-03-02 6:25 ` Jens Axboe
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=20260227080712.2422380-9-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