return 1;
}
+ if (!new_layout)
+ goto done;
+
if (ftruncate(f->fd, f->real_file_size) == -1) {
td_verror(td, errno, "ftruncate");
goto err;
}
- if (!new_layout)
- goto done;
-
if (posix_fallocate(f->fd, 0, f->real_file_size) < 0) {
td_verror(td, errno, "posix_fallocate");
goto err;
* device/file sizes are zero and no size given, punt
*/
if ((!total_size || total_size == -1ULL) && !td->o.size &&
- !(td->io_ops->flags & FIO_NOIO)) {
+ !(td->io_ops->flags & FIO_NOIO) && !td->o.fill_device) {
log_err("%s: you need to specify size=\n", td->o.name);
td_verror(td, EINVAL, "total_file_size");
return 1;