From: Vincent Fu Date: Mon, 31 Mar 2025 14:01:29 +0000 (-0400) Subject: trim_verify: include a trim panel in the output X-Git-Tag: fio-3.40~37 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=15bac8753a8d533fd74ef51d59cc9265e712834e;p=fio.git 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 --- 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);