Reset file count when freeing files
authorJens Axboe <axboe@fb.com>
Tue, 10 Jun 2014 01:52:05 +0000 (19:52 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 10 Jun 2014 01:52:05 +0000 (19:52 -0600)
This fixes and oops with iolog replay, and a manually specified
filename=

Signed-off-by: Jens Axboe <axboe@fb.com>
filesetup.c

index 84eaed68c230520f47bd2853cb20225c078938ef..2049fd6502cc80ec8c0214c55029c5cad7fb1786 100644 (file)
@@ -1524,6 +1524,8 @@ int get_fileno(struct thread_data *td, const char *fname)
 void free_release_files(struct thread_data *td)
 {
        close_files(td);
+       td->o.nr_files = 0;
+       td->o.open_files = 0;
        td->files_index = 0;
        td->nr_normal_files = 0;
 }