Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message Jan 12

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit 6ff32768ff322a269f87cd515ecfb218400f22bf:

Add option to specify ramp period by amount of IO (2026-01-07 14:01:53 -0500)

are available in the Git repository at:

git://git.kernel.dk/fio.git master

for you to fetch changes up to adeceb86edb28070cbae79dd38b5ec7354271063:

Merge branch 'sync-fileop' of https://github.com/struschev/fio (2026-01-11 13:05:54 -0700)

----------------------------------------------------------------
Jens Axboe (3):
t/io_uring: enable setting an opcode and register opcode filter Merge branch 'patch-1' of https://github.com/CookiePLMonster/fio
Merge branch 'sync-fileop' of https://github.com/struschev/fio

Sergey Truschev (1):
fio: add sync capability for file operations

Silent (1):
windows: fix Y2038 bug caused by 32 bit truncation

 engines/falloc.c         | 20 +++++++++++-------
 engines/fileoperations.c |  2 ++
 engines/ftruncate.c      | 11 +++++-----
 os/windows/posix.c       |  2 +-
 t/io_uring.c             | 54 ++++++++++++++++++++++++++++++++++++++++++++++--
 5 files changed, 73 insertions(+), 16 deletions(-)

---

Diff of recent changes:

engines/falloc.c +12 -8
index 290b980f..5bd5aa54 100644
@@ -76,14 +76,18 @@ static enum fio_q_status fio_fallocate_queue(struct thread_data *td,
 
 	fio_ro_check(td, io_u);
 
-	if (io_u->ddir == DDIR_READ)
-		flags = FALLOC_FL_KEEP_SIZE;
-	else if (io_u->ddir == DDIR_WRITE)
-		flags = 0;
-	else if (io_u->ddir == DDIR_TRIM)
-		flags = FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE;
-
-	ret = fallocate(f->fd, flags, io_u->offset, io_u->xfer_buflen);
+	if (io_u->ddir != DDIR_SYNC) {
+		if (io_u->ddir == DDIR_READ)
+			flags = FALLOC_FL_KEEP_SIZE;
+		else if (io_u->ddir == DDIR_WRITE)
+			flags = 0;
+		else if (io_u->ddir == DDIR_TRIM)
+			flags = FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE;
+
+		ret = fallocate(f->fd, flags, io_u->offset, io_u->xfer_buflen);
+	} else {
+		ret = do_io_u_sync(td, io_u);
+	}
 
 	if (ret)
 		io_u->error = errno;
engines/fileoperations.c +2 -0
index e5303359..ce3e7c39 100644
@@ -264,6 +264,8 @@ static int invalidate_do_nothing(struct thread_data *td, struct fio_file *f)
 
 static enum fio_q_status queue_io(struct thread_data *td, struct io_u *io_u)
 {
+	if (io_u->ddir == DDIR_SYNC && do_io_u_sync(td, io_u))
+		io_u->error = errno;
 	return FIO_Q_COMPLETED;
 }
 
engines/ftruncate.c +6 -5
index d1757b79..70211e07 100644
@@ -15,16 +15,17 @@ static enum fio_q_status fio_ftruncate_queue(struct thread_data *td,
 					     struct io_u *io_u)
 {
 	struct fio_file *f = io_u->file;
-	int ret;
+	int ret = 0;
 
 	fio_ro_check(td, io_u);
 
-	if (io_u->ddir != DDIR_WRITE) {
+	if (io_u->ddir == DDIR_WRITE)
+		ret = ftruncate(f->fd, io_u->offset);
+	else if (io_u->ddir == DDIR_SYNC)
+		ret = do_io_u_sync(td, io_u);
+	else
 		io_u->error = EINVAL;
-		return FIO_Q_COMPLETED;
-	}
 
-	ret = ftruncate(f->fd, io_u->offset);
 	if (ret)
 		io_u->error = errno;
 
os/windows/posix.c +1 -1
index 4c692a1e..ca3ee389 100644
@@ -297,7 +297,7 @@ void Time_tToSystemTime(time_t dosTime, SYSTEMTIME *systemTime)
 	LONGLONG jan1970;
 	SYSTEMTIME tempSystemTime;
 
-	jan1970 = Int32x32To64(dosTime, 10000000) + 116444736000000000;
+	jan1970 = (dosTime * 10000000LL) + 116444736000000000LL;
 	utcFT.dwLowDateTime = (DWORD)jan1970;
 	utcFT.dwHighDateTime = jan1970 >> 32;
 
t/io_uring.c +52 -2

100 lines not on this page · raw message