uint64_t get_start_offset(struct thread_data *td, struct fio_file *f)
{
struct thread_options *o = &td->o;
- uint64_t offset;
if (o->file_append && f->filetype == FIO_TYPE_FILE)
return f->real_file_size;
- offset = td->o.start_offset + td->subjob_number * td->o.offset_increment;
- if (offset % td_max_bs(td))
- offset -= (offset % td_max_bs(td));
-
- return offset;
+ return td->o.start_offset +
+ td->subjob_number * td->o.offset_increment;
}
/*
else
f->filetype = FIO_TYPE_FILE;
+#ifdef WIN32
/* \\.\ 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;
+#endif
if (!stat(f->file_name, &sb)) {
if (S_ISBLK(sb.st_mode))