.. option:: offset=int
- Start I/O at the given offset in the file. The data before the given offset
- will not be touched. This effectively caps the file size at `real_size -
- offset`. Can be combined with :option:`size` to constrain the start and
- end range that I/O will be done within.
+ Start I/O at the provided offset in the file, given as either a fixed size or
+ a percentage. If a percentage is given, the next ``blockalign``-ed offset
+ will be used. Data before the given offset will not be touched. This
+ effectively caps the file size at `real_size - offset`. Can be combined with
+ :option:`size` to constrain the start and end range of the I/O workload.
.. option:: offset_increment=int
means default for reads, 8k for writes and trims.
**bs=,8k,**
- means default for reads, 8k for writes, and default for writes.
+ means default for reads, 8k for writes, and default for trims.
.. option:: blocksize_range=irange[,irange][,irange], bsrange=irange[,irange][,irange]
contents to one or more separate threads. If using this offload option, even
sync I/O engines can benefit from using an :option:`iodepth` setting higher
than 1, as it allows them to have I/O in flight while verifies are running.
+ Defaults to 0 async threads, i.e. verification is not asynchronous.
.. option:: verify_async_cpus=str
<type> is "local" for a local run, "sock" for a client/server socket
connection, and "ip" (192.168.0.1, for instance) for a networked
- client/server connection.
+ client/server connection. Defaults to true.
.. option:: verify_state_load=bool
uint64_t get_start_offset(struct thread_data *td, struct fio_file *f)
{
struct thread_options *o = &td->o;
+ unsigned long long align_bs; /* align the offset to this block size */
+ unsigned long long offset; /* align_bs-aligned offset */
if (o->file_append && f->filetype == FIO_TYPE_FILE)
return f->real_file_size;
- return td->o.start_offset +
- td->subjob_number * td->o.offset_increment;
+ if (o->start_offset_percent > 0) {
+
+ /* if blockalign is provided, find the min across read, write, and trim */
+ if (fio_option_is_set(o, ba)) {
+ align_bs = (unsigned long long) min(o->ba[DDIR_READ], o->ba[DDIR_WRITE]);
+ align_bs = min((unsigned long long) o->ba[DDIR_TRIM], align_bs);
+ } else { /* else take the minimum block size */
+ align_bs = td_min_bs(td);
+ }
+
+ /* calculate the raw offset */
+ offset = (f->real_file_size * o->start_offset_percent / 100) +
+ (td->subjob_number * o->offset_increment);
+
+ /* block align the offset at the next available boundary at
+ ceiling(offset / align_bs) * align_bs */
+ offset = (offset / align_bs + (offset % align_bs != 0)) * align_bs;
+
+ } else { /* start_offset_percent not set */
+ offset = o->start_offset + o->start_offset +
+ td->subjob_number * o->offset_increment;
+ }
+ return offset;
}
/*
total_size = -1ULL;
else {
if (o->size_percent) {
- f->io_size = (f->io_size * o->size_percent) / 100;
+ uint64_t file_size;
+
+ file_size = f->io_size + f->file_offset;
+ f->io_size = (file_size *
+ o->size_percent) / 100;
+ if (f->io_size > (file_size - f->file_offset))
+ f->io_size = file_size - f->file_offset;
+
f->io_size -= (f->io_size % td_min_bs(td));
}
total_size += f->io_size;
-.TH fio 1 "March 2017" "User Manual"
+.TH fio 1 "May 2017" "User Manual"
.SH NAME
fio \- flexible I/O tester
.SH SYNOPSIS
bs=8k,32k means 8k for reads, 32k for writes and trims
bs=8k,32k, means 8k for reads, 32k for writes, and default for trims
bs=,8k means default for reads, 8k for writes and trims
-bs=,8k, means default for reads, 8k for writes, and default for writes
+bs=,8k, means default for reads, 8k for writes, and default for trims
.fi
.TP
.BI blocksize_range \fR=\fPirange[,irange][,irange] "\fR,\fB bsrange" \fR=\fPirange[,irange][,irange]
Default: true.
.TP
.BI offset \fR=\fPint
- Offset in the file to start I/O. Data before the offset will not be touched.
+ Start I/O at the provided offset in the file, given as either a fixed size or a
+ percentage. If a percentage is given, the next \fBblockalign\fR-ed offset will
+ be used. Data before the given offset will not be touched. This effectively
+ caps the file size at (real_size - offset). Can be combined with \fBsize\fR to
+ constrain the start and end range of the I/O workload.
.TP
.BI offset_increment \fR=\fPint
If this is provided, then the real offset becomes the
.br
These are typically located under /usr/share/doc/fio.
-\fBHOWTO\fR: http://git.kernel.dk/?p=fio.git;a=blob_plain;f=HOWTO
+\fBHOWTO\fR: http://git.kernel.dk/cgit/fio/plain/HOWTO
.br
-\fBREADME\fR: http://git.kernel.dk/?p=fio.git;a=blob_plain;f=README
+\fBREADME\fR: http://git.kernel.dk/cgit/fio/plain/README
.br