bsrange=irange Instead of giving a single block size, specify a range
and fio will mix the issued io block sizes. The issued
io unit will always be a multiple of the minimum value
- given.
+ given (also see bs_unaligned).
+
+bs_unaligned If this option is given, any byte size value within bsrange
+ may be used as a block range. This typically wont work with
+ direct IO, as that normally requires sector alignment.
nrfiles=int Number of files to use for this job. Defaults to 1.
unsigned int write_lat_log;
unsigned int write_bw_log;
unsigned int norandommap;
+ unsigned int bs_unaligned;
unsigned int bs;
unsigned int min_bs;
.type = FIO_OPT_STR_SET,
.off1 = td_var_offset(norandommap),
},
+ {
+ .name = "bs_unaligned",
+ .type = FIO_OPT_STR_SET,
+ .off1 = td_var_offset(bs_unaligned),
+ },
{
.name = NULL,
},
log_err("fio: norandommap given, verify disabled\n");
td->verify = VERIFY_NONE;
}
+ if (td->bs_unaligned && (td->odirect || td->io_ops->flags & FIO_RAWIO))
+ log_err("fio: bs_unaligned may not work with raw io\n");
}
/*
}
}
+ if (td->odirect)
+ td->io_ops->flags |= FIO_RAWIO;
+
fixup_options(td);
td->filetype = FIO_TYPE_FILE;
td->filetype = FIO_TYPE_CHAR;
}
- if (td->odirect)
- td->io_ops->flags |= FIO_RAWIO;
-
if (td->filename)
td->nr_uniq_files = 1;
else
else {
r = os_random_long(&td->bsrange_state);
buflen = (1 + (double) (td->max_bs - 1) * r / (RAND_MAX + 1.0));
- buflen = (buflen + td->min_bs - 1) & ~(td->min_bs - 1);
+ if (!td->bs_unaligned)
+ buflen = (buflen + td->min_bs - 1) & ~(td->min_bs - 1);
}
if (buflen > td->io_size - td->this_io_bytes[td->ddir]) {