From c38e946828472daf5cd0450401a7aba06cda7f60 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 27 Mar 2007 08:48:48 +0200 Subject: [PATCH] Include syncs in the stored io log We want to replay those as well. Signed-off-by: Jens Axboe --- io_u.c | 3 ++- log.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/io_u.c b/io_u.c index 1077c27b..2e0f8e9c 100644 --- a/io_u.c +++ b/io_u.c @@ -310,7 +310,7 @@ static int fill_io_u(struct thread_data *td, struct io_u *io_u) !(td->io_issues[DDIR_WRITE] % td->o.fsync_blocks) && td->io_issues[DDIR_WRITE] && should_fsync(td)) { io_u->ddir = DDIR_SYNC; - return 0; + goto out; } io_u->ddir = get_rw_ddir(td); @@ -335,6 +335,7 @@ static int fill_io_u(struct thread_data *td, struct io_u *io_u) /* * If using a write iolog, store this entry. */ +out: if (td->o.write_iolog_file) write_iolog_put(td, io_u); diff --git a/log.c b/log.c index 2b90f452..d59c38fd 100644 --- a/log.c +++ b/log.c @@ -113,7 +113,7 @@ static int init_iolog_read(struct thread_data *td) reads++; else if (rw == DDIR_WRITE) writes++; - else { + else if (rw != DDIR_SYNC) { log_err("bad ddir: %d\n", rw); continue; } -- 2.25.1