Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message Apr 20, 2024

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit 420415dd1180c14ec0f55f65a05e57ea1fd85f9f:

fio: ioengine flag cleanup (2024-04-18 12:36:01 -0400)

are available in the Git repository at:

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

for you to fetch changes up to c948ee34afde7eda14adf82512772b03f6fb1d69:

Merge branch 'master' of https://github.com/celestinechen/fio (2024-04-19 13:51:05 -0600)

----------------------------------------------------------------
Jens Axboe (1):
Merge branch 'master' of https://github.com/celestinechen/fio

celestinechen (1):
FIO with fsync option issues more DDIR_SYNC commands than expected

 io_u.c      | 2 --
 ioengines.c | 4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)

---

Diff of recent changes:

io_u.c +0 -2
index 83895893..a499ff07 100644
@@ -2113,7 +2113,6 @@ static void io_completed(struct thread_data *td, struct io_u **io_u_ptr,
 	if (ddir_sync(ddir)) {
 		if (io_u->error)
 			goto error;
-		td->last_was_sync = true;
 		if (f) {
 			f->first_write = -1ULL;
 			f->last_write = -1ULL;
@@ -2123,7 +2122,6 @@ static void io_completed(struct thread_data *td, struct io_u **io_u_ptr,
 		return;
 	}
 
-	td->last_was_sync = false;
 	td->last_ddir = ddir;
 
 	if (!io_u->error && ddir_rw(ddir)) {
ioengines.c +4 -0
index 87cc2286..6b81dc77 100644
@@ -436,6 +436,8 @@ enum fio_q_status td_io_queue(struct thread_data *td, struct io_u *io_u)
 			io_u_mark_depth(td, 1);
 			td->ts.total_io_u[io_u->ddir]++;
 		}
+
+		td->last_was_sync = ddir_sync(io_u->ddir);
 	} else if (ret == FIO_Q_QUEUED) {
 		td->io_u_queued++;
 
@@ -445,6 +447,8 @@ enum fio_q_status td_io_queue(struct thread_data *td, struct io_u *io_u)
 
 		if (td->io_u_queued >= td->o.iodepth_batch)
 			td_io_commit(td);
+
+		td->last_was_sync = ddir_sync(io_u->ddir);
 	}
 
 	if (!td_ioengine_flagged(td, FIO_SYNCIO) &&