Merge branch 'histograms-PR' of https://github.com/cronburg/fio
[fio.git] / filesetup.c
index 012773b95eba7ff27c714e7a5085f15a939c0fb7..1ecdda61c3f460f8ae03dda4a6a5cce9c7fd5278 100644 (file)
@@ -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))