HOWTO: add offset unit info for offset= option
authorTomohiro Kusumi <tkusumi@tuxera.com>
Tue, 27 Jun 2017 10:21:03 +0000 (13:21 +0300)
committerJens Axboe <axboe@kernel.dk>
Tue, 27 Jun 2017 14:20:11 +0000 (08:20 -0600)
Add "in bytes" and "A percentage can be specified by ...",
based on an email post titled "in what units is offset option?".

-- example of offset in percentage
 # ./fio --debug=parse --name=xxxxx --ioengine=sync --rw=rw --size=1m --unlink=1 --offset=-51 | grep "SET start_offset_percent"
 parse    12859 SET start_offset_percent 50

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
HOWTO

diff --git a/HOWTO b/HOWTO
index 012bca84e9cceb6c438440da0ad406da1c7bcc02..37caa3c0ecd54a9371f483755ccb1f58dfdaf152 100644 (file)
--- a/HOWTO
+++ b/HOWTO
@@ -1090,11 +1090,13 @@ I/O type
 
 .. option:: offset=int
 
-       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
+       Start I/O at the provided offset in the file, given as either a fixed size in
+       bytes 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.
+       A percentage can be specified by the percentage number plus 1 with preceding '-'.
+       For example, -1 is parsed as 0%, -10 is parsed as 9%, -101 is parsed as 100%.
 
 .. option:: offset_increment=int