r = fallocate(f->fd, FALLOC_FL_KEEP_SIZE, 0,
f->real_file_size);
- if (r != 0) {
+ if (r != 0)
td_verror(td, errno, "fallocate");
- }
+
break;
#endif /* FIO_HAVE_LINUX_FALLOCATE */
default:
extend_size = total_size = 0;
need_extend = 0;
for_each_file(td, f, i) {
- f->file_offset = td->o.start_offset;
+ f->file_offset = td->o.start_offset +
+ (td->thread_number - 1) * td->o.offset_increment;
if (!td->o.file_size_low) {
/*
else
f->filetype = FIO_TYPE_FILE;
+ /* \\.\ is the device namespace in Windows, where every file is
+ * a block device */
+ if (strncmp(f->file_name, "\\\\.\\", 4) == 0)
+ f->filetype = FIO_TYPE_BD;
+
if (!stat(f->file_name, &sb)) {
- /* \\.\ is the device namespace in Windows, where every file is
- * a block device */
- if (S_ISBLK(sb.st_mode) || strncmp(f->file_name, "\\\\.\\", 4) == 0)
+ if (S_ISBLK(sb.st_mode))
f->filetype = FIO_TYPE_BD;
else if (S_ISCHR(sb.st_mode))
f->filetype = FIO_TYPE_CHAR;