Use td_io_get_file_size() instead of calling ->get_file_size()
authorJens Axboe <jens.axboe@oracle.com>
Tue, 7 Apr 2009 20:20:56 +0000 (22:20 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 7 Apr 2009 20:20:56 +0000 (22:20 +0200)
It may be NULL on some engines, causing a crash.

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

index 68516b9d9a8141ce9c74224464b99fb13434b12e..af23191fb33d9f78442ba24992024c332fa969bd 100644 (file)
@@ -397,7 +397,7 @@ static int get_file_sizes(struct thread_data *td)
                dprint(FD_FILE, "get file size for %p/%d/%p\n", f, i,
                                                                f->file_name);
 
-               if (td->io_ops->get_file_size(td, f)) {
+               if (td_io_get_file_size(td, f)) {
                        if (td->error != ENOENT) {
                                log_err("%s\n", td->verror);
                                err = 1;