filesetup: assign fileno at setup time
authorJens Axboe <axboe@fb.com>
Thu, 14 Apr 2016 14:57:46 +0000 (08:57 -0600)
committerJens Axboe <axboe@fb.com>
Thu, 14 Apr 2016 14:57:46 +0000 (08:57 -0600)
For duplicate jobs, we don't always get fileno assigned if we have
multiple files per job. Ensure that we do.

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

index a82163255690027f94baa487112458746c1256be..3fc14641ed7d34380d5f735006eb129ab0b7faf0 100644 (file)
@@ -809,6 +809,7 @@ int setup_files(struct thread_data *td)
         */
        total_size = 0;
        for_each_file(td, f, i) {
+               f->fileno = i;
                if (f->real_file_size == -1ULL)
                        total_size = -1ULL;
                else