[PATCH v3 2/8] engines: sync: add support for DDIR_SYNCFS

Damien Le Moal
2026-02-27T06:00:57Z

Flag the sync IO engine with the FIO_SYNCFS flag to indicate that syncfs
operations are supported. No additional changes are needed to enable
syncfs processing as this IO engine already processes all sync operation
variants using do_io_u_sync().

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
engines/sync.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/engines/sync.c b/engines/sync.c
index 89466ca596aa..ba71ee04801d 100644
--- a/engines/sync.c
+++ b/engines/sync.c
@@ -433,7 +433,7 @@ static struct ioengine_ops ioengine_rw = {
.open_file = generic_open_file,
.close_file = generic_close_file,
.get_file_size = generic_get_file_size,
- .flags = FIO_SYNCIO,
+ .flags = FIO_SYNCIO | FIO_SYNCFS,
};

static struct ioengine_ops ioengine_prw = {
@@ -443,7 +443,7 @@ static struct ioengine_ops ioengine_prw = {
.open_file = generic_open_file,
.close_file = generic_close_file,
.get_file_size = generic_get_file_size,
- .flags = FIO_SYNCIO,
+ .flags = FIO_SYNCIO | FIO_SYNCFS,
};

static struct ioengine_ops ioengine_vrw = {
@@ -458,7 +458,7 @@ static struct ioengine_ops ioengine_vrw = {
.open_file = generic_open_file,
.close_file = generic_close_file,
.get_file_size = generic_get_file_size,
- .flags = FIO_SYNCIO,
+ .flags = FIO_SYNCIO | FIO_SYNCFS,
};

#ifdef CONFIG_PWRITEV
@@ -471,7 +471,7 @@ static struct ioengine_ops ioengine_pvrw = {
.open_file = generic_open_file,
.close_file = generic_close_file,
.get_file_size = generic_get_file_size,
- .flags = FIO_SYNCIO,
+ .flags = FIO_SYNCIO | FIO_SYNCFS,
};
#endif

@@ -485,8 +485,7 @@ static struct ioengine_ops ioengine_pvrw2 = {
.open_file = generic_open_file,
.close_file = generic_close_file,
.get_file_size = generic_get_file_size,
- .flags = FIO_SYNCIO |
- FIO_ATOMICWRITES,
+ .flags = FIO_SYNCIO | FIO_ATOMICWRITES | FIO_SYNCFS,
.options = options,
.option_struct_size = sizeof(struct psyncv2_options),
};
--
2.53.0