ret = bdev_size(td, f);
else if (f->filetype == FIO_TYPE_CHAR)
ret = char_size(td, f);
- else
+ else {
f->real_file_size = -1;
+ log_info("%s: failed to get file size of %s\n", td->o.name,
+ f->file_name);
+ return 1; /* avoid offset extends end error message */
+ }
if (ret)
return ret;
+ /*
+ * ->file_offset normally hasn't been initialized yet, so this
+ * is basically always false unless ->real_file_size is -1, but
+ * if ->real_file_size is -1 this message doesn't make sense.
+ * As a result, this message is basically useless.
+ */
if (f->file_offset > f->real_file_size) {
log_err("%s: offset extends end (%llu > %llu)\n", td->o.name,
(unsigned long long) f->file_offset,