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 68516b9..af23191 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;