From 7456a8782940ab20ae78de460ede2cb79d088770 Mon Sep 17 00:00:00 2001 From: Hyunwoo Park Date: Thu, 23 May 2024 07:30:36 +0000 Subject: [PATCH] fio: enable dataplacement(fdp) while replaying I/Os Add initialization and dataplacement logic to enable dataplacement(fdp) while fio replays I/Os with read_iolog. Signed-off-by: Hyunwoo Park --- iolog.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/iolog.c b/iolog.c index 96af4f33e1..5d4e2e0fcd 100644 --- a/iolog.c +++ b/iolog.c @@ -140,8 +140,13 @@ static int ipo_special(struct thread_data *td, struct io_piece *ipo) break; } ret = td_io_open_file(td, f); - if (!ret) + if (!ret){ + if (td->o.dp_type != FIO_DP_NONE) { + if (dp_init(td)) + return false; + } break; + } td_verror(td, ret, "iolog open file"); return -1; case FIO_LOG_CLOSE_FILE: @@ -233,6 +238,9 @@ int read_iolog_get(struct thread_data *td, struct io_u *io_u) usec_sleep(td, (ipo->delay - elapsed) * 1000); } + if (td->o.dp_type != FIO_DP_NONE) + dp_fill_dspec_data(td, io_u); + free(ipo); if (io_u->ddir != DDIR_WAIT)