From 15bac8753a8d533fd74ef51d59cc9265e712834e Mon Sep 17 00:00:00 2001 From: Vincent Fu Date: Mon, 31 Mar 2025 10:01:29 -0400 Subject: [PATCH] trim_verify: include a trim panel in the output The trim bit in td_ddir is not set when trim_percentage/backlog is enabled yet fio still issues trim operations. Detect these cases and produce output describing trim operations if we issued any. This is similar to the fix (615c794cbf851c994e94fffe8b8f565e64f137a5) committed for verify_backlog. Signed-off-by: Vincent Fu --- backend.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend.c b/backend.c index b75eea80..f2a4ad35 100644 --- a/backend.c +++ b/backend.c @@ -1994,7 +1994,8 @@ static void *thread_main(void *data) update_runtime(td, elapsed_us, DDIR_READ); if (td_write(td) && td->io_bytes[DDIR_WRITE]) update_runtime(td, elapsed_us, DDIR_WRITE); - if (td_trim(td) && td->io_bytes[DDIR_TRIM]) + if (td->io_bytes[DDIR_TRIM] && (td_trim(td) || + ((td->flags & TD_F_TRIM_BACKLOG) && td_write(td)))) update_runtime(td, elapsed_us, DDIR_TRIM); fio_gettime(&td->start, NULL); fio_sem_up(stat_sem); -- 2.25.1