From 85c1cf35921635723435ca6594f2da28f0a659fd Mon Sep 17 00:00:00 2001 From: Vincent Fu Date: Fri, 17 Feb 2023 13:22:10 -0500 Subject: [PATCH] filesetup: don't skip flags for trim workloads Fio has not been setting O_DIRECT, O_SYNC, O_DSYNC, and O_CREAT for workloads that include trim commands. Stop doing this and actually set these flags when requested for workloads that include trim commands. Signed-off-by: Vincent Fu --- filesetup.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/filesetup.c b/filesetup.c index 1836d7e2..648f48c6 100644 --- a/filesetup.c +++ b/filesetup.c @@ -737,14 +737,11 @@ int generic_open_file(struct thread_data *td, struct fio_file *f) f_out = stderr; } - if (td_trim(td)) - goto skip_flags; if (td->o.odirect) flags |= OS_O_DIRECT; flags |= td->o.sync_io; if (td->o.create_on_open && td->o.allow_create) flags |= O_CREAT; -skip_flags: if (f->filetype != FIO_TYPE_FILE) flags |= FIO_O_NOATIME; -- 2.25.1