From f082667807b89ee1b4598e793e6568d7c58348d9 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 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/iolog.c b/iolog.c index 96af4f33..37ad0d2a 100644 --- a/iolog.c +++ b/iolog.c @@ -140,8 +140,17 @@ 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) { + int dp_init_ret = dp_init(td); + + if (dp_init_ret != 0) { + td_verror(td, dp_init_ret, "dp_init"); + return -1; + } + } break; + } td_verror(td, ret, "iolog open file"); return -1; case FIO_LOG_CLOSE_FILE: @@ -233,6 +242,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) -- 2.25.1