X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=filesetup.c;h=1ecdda61c3f460f8ae03dda4a6a5cce9c7fd5278;hp=012773b95eba7ff27c714e7a5085f15a939c0fb7;hb=dd32be11d1e158ce16a0266816df1a7b86389b32;hpb=922a5be82ca50f7c89a1f9c4b84757ba8636e2d1 diff --git a/filesetup.c b/filesetup.c index 012773b9..1ecdda61 100644 --- a/filesetup.c +++ b/filesetup.c @@ -329,7 +329,7 @@ static int char_size(struct thread_data *td, struct fio_file *f) int r; if (td->io_ops->open_file(td, f)) { - log_err("fio: failed opening blockdev %s for size check\n", + log_err("fio: failed opening chardev %s for size check\n", f->file_name); return 1; } @@ -761,16 +761,12 @@ static unsigned long long get_fs_free_counts(struct thread_data *td) 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; } /* @@ -1225,10 +1221,12 @@ static void get_file_type(struct fio_file *f) 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))