projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Check for a valid block device size
[fio.git]
/
filesetup.c
diff --git
a/filesetup.c
b/filesetup.c
index 464c0f2018f51672f88cdd2bd3ced44c8bceda4e..cfcfa9ae5e5f02398e25cbf49e14a9f033135686 100644
(file)
--- a/
filesetup.c
+++ b/
filesetup.c
@@
-156,6
+156,11
@@
static int bdev_size(struct thread_data *td, struct fio_file *f)
return 1;
}
return 1;
}
+ if (!bytes) {
+ log_err("%s: zero sized block device?\n", f->file_name);
+ return 1;
+ }
+
f->real_file_size = bytes;
return 0;
}
f->real_file_size = bytes;
return 0;
}