From 85a47ca2eeac70bad992556d077f18752098e44f Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 11 Jun 2012 13:19:13 +0200 Subject: [PATCH] Revert "blktrace: use for_each_file() instead of open coding the loop" There's another bug in where we don't have the number of files in replay mode correctly stored in td->o.nr_files. So revert this until that bug is fixed as well. This reverts commit adfc73488616bac66f910d53c75202d5be8afe87. --- blktrace.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blktrace.c b/blktrace.c index dea1be4f..e195f7f1 100644 --- a/blktrace.c +++ b/blktrace.c @@ -418,8 +418,10 @@ int load_blktrace(struct thread_data *td, const char *filename) } } while (1); - for_each_file(td, f, i) + for (i = 0; i < td->files_index; i++) { + f= td->files[i]; trace_add_open_close_event(td, f->fileno, FIO_LOG_CLOSE_FILE); + } fifo_free(fifo); close(fd); -- 2.25.1