Get rid of int vs siint difference
authorJens Axboe <jens.axboe@oracle.com>
Mon, 9 Mar 2009 13:20:20 +0000 (14:20 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 9 Mar 2009 13:20:20 +0000 (14:20 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
HOWTO
fio.1
parse.c

diff --git a/HOWTO b/HOWTO
index 6f8f3f4ccf35818610b50de85874d23e6692a23f..4e52e6509c18a6efb2350071d15b4899fb0be759 100644 (file)
--- a/HOWTO
+++ b/HOWTO
@@ -197,12 +197,10 @@ Some parameters take an option of a given type, such as an integer or
 a string. The following types are used:
 
 str    String. This is a sequence of alpha characters.
-int    Integer. A whole number value, can be negative. If prefixed with
-       0x, the integer is assumed to be of base 16 (hexadecimal).
 time   Integer with possible time postfix. In seconds unless otherwise
        specified, use eg 10m for 10 minutes. Accepts s/m/h for seconds,
        minutes, and hours.
-siint  SI integer. A whole number value, which may contain a postfix
+int    SI integer. A whole number value, which may contain a postfix
        describing the base of the number. Accepted postfixes are k/m/g,
        meaning kilo, mega, and giga. So if you want to specify 4096,
        you could either write out '4096' or just give 4k. The postfixes
@@ -217,7 +215,7 @@ irange      Integer range with postfix. Allows value range to be given, such
        as 1024-4096. A colon may also be used as the separator, eg
        1k:4k. If the option allows two sets of ranges, they can be
        specified with a ',' or '/' delimiter: 1k-4k/8k-32k. Also see
-       siint.
+       int.
 
 With the above in mind, here follows the complete list of fio job
 parameters.
@@ -302,14 +300,14 @@ fadvise_hint=bool By default, fio will use fadvise() to advise the kernel
                If set, fio will use POSIX_FADV_SEQUENTIAL for sequential
                IO and POSIX_FADV_RANDOM for random IO.
 
-size=siint     The total size of file io for this job. Fio will run until
+size=int       The total size of file io for this job. Fio will run until
                this many bytes has been transferred, unless runtime is
                limited by other options (such as 'runtime', for instance).
                Unless specific nr_files and filesize options are given,
                fio will divide this size between the available files
                specified by the job.
 
-filesize=siint Individual file sizes. May be a range, in which case fio
+filesize=int   Individual file sizes. May be a range, in which case fio
                will select sizes for files at random within the given range
                and limited to 'size' in total (if that is given). If not
                given, each created file is the same size.
@@ -318,10 +316,10 @@ fill_device=bool Sets size to something really large and waits for ENOSPC (no
                space left on device) as the terminating condition. Only makes
                 sense with sequential write.
 
-blocksize=siint
-bs=siint       The block size used for the io units. Defaults to 4k. Values
-               can be given for both read and writes. If a single siint is
-               given, it will apply to both. If a second siint is specified
+blocksize=int
+bs=int         The block size used for the io units. Defaults to 4k. Values
+               can be given for both read and writes. If a single int is
+               given, it will apply to both. If a second int is specified
                after a comma, it will apply to writes only. In other words,
                the format is either bs=read_and_write or bs=read,write.
                bs=4k,8k will thus use 4k blocks for reads, and 8k blocks
@@ -503,7 +501,7 @@ direct=bool If value is true, use non-buffered io. This is usually
 buffered=bool  If value is true, use buffered io. This is the opposite
                of the 'direct' option. Defaults to true.
 
-offset=siint   Start io at the given offset in the file. The data before
+offset=int     Start io 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.
 
@@ -673,7 +671,7 @@ mem=str             Fio can use various types of memory as the io unit buffer.
                location should point there. So if it's mounted in /huge,
                you would use mem=mmaphuge:/huge/somefile.
 
-hugepage-size=siint
+hugepage-size=int
                Defines the size of a huge page. Must at least be equal
                to the system setting, see /proc/meminfo. Defaults to 4MiB.
                Should probably always be a multiple of megabytes, so using
@@ -758,11 +756,11 @@ verifysort=bool   If set, fio will sort written verify blocks when it deems
                fast IO where the red-black tree sorting CPU time becomes
                significant.
 
-verify_offset=siint    Swap the verification header with data somewhere else
+verify_offset=int      Swap the verification header with data somewhere else
                        in the block before writing. Its swapped back before
                        verifying.
 
-verify_interval=siint  Write the verification header at a finer granularity
+verify_interval=int    Write the verification header at a finer granularity
                        than the blocksize. It will be written for chunks the
                        size of header_interval. blocksize should divide this
                        evenly.
@@ -806,9 +804,9 @@ thread              fio defaults to forking jobs, however if this option is
                given, fio will use pthread_create(3) to create threads
                instead.
 
-zonesize=siint Divide a file into zones of the specified size. See zoneskip.
+zonesize=int   Divide a file into zones of the specified size. See zoneskip.
 
-zoneskip=siint Skip the specified number of bytes when zonesize data has
+zoneskip=int   Skip the specified number of bytes when zonesize data has
                been read. The two zone options can be used to only do
                io on zones of a file.
 
@@ -842,7 +840,7 @@ write_lat_log=str Same as write_bw_log, except that this option stores io
                The actual log names will be foo_clat.log and foo_slat.log.
                This helps fio_generate_plot fine the logs automatically.
 
-lockmem=siint  Pin down the specified amount of memory with mlock(2). Can
+lockmem=int    Pin down the specified amount of memory with mlock(2). Can
                potentially be used instead of removing memory or booting
                with less memory to simulate a smaller amount of memory.
 
diff --git a/fio.1 b/fio.1
index 554fe50522fe80b39031674b61317bf7b200e307..4ae0a5c860898d44376fd18c5403ed7c0c021a34 100644 (file)
--- a/fio.1
+++ b/fio.1
@@ -77,13 +77,10 @@ Some parameters may take arguments of a specific type.  The types used are:
 String: a sequence of alphanumeric characters.
 .TP
 .I int
-Integer: a whole number, possibly negative.  If prefixed with `0x', the value
-is assumed to be base 16 (hexadecimal).
-.TP
-.I siint
 SI integer: a whole number, possibly containing a suffix denoting the base unit
 of the value.  Accepted suffixes are `k', 'M' and 'G', denoting kilo (1024),
-mega (1024*1024) and giga (1024*1024*1024) respectively.
+mega (1024*1024) and giga (1024*1024*1024) respectively. If prefixed with '0x',
+the value is assumed to be base 16 (hexadecimal).
 .TP
 .I bool
 Boolean: a true or false value. `0' denotes false, `1' denotes true.
@@ -159,7 +156,7 @@ across runs.  Default: true.
 Disable use of \fIposix_fadvise\fR\|(2) to advise the kernel what I/O patterns
 are likely to be issued. Default: true.
 .TP
-.BI size \fR=\fPsiint
+.BI size \fR=\fPint
 Total size of I/O for this job.  \fBfio\fR will run until this many bytes have
 been transfered, unless limited by other options (\fBruntime\fR, for instance).
 Unless \fBnr_files\fR and \fBfilesize\fR options are given, this amount will be
@@ -171,7 +168,7 @@ for files at random within the given range, limited to \fBsize\fR in total (if
 that is given). If \fBfilesize\fR is not specified, each created file is the
 same size.
 .TP
-.BI blocksize \fR=\fPsiint[,siint] "\fR,\fB bs" \fR=\fPsiint[,siint]
+.BI blocksize \fR=\fPint[,int] "\fR,\fB bs" \fR=\fPint[,int]
 Block size for I/O units.  Default: 4k.  Values for reads and writes can be
 specified seperately in the format \fIread\fR,\fIwrite\fR, either of
 which may be empty to leave that value at its default.
@@ -305,7 +302,7 @@ If true, use non-buffered I/O (usually O_DIRECT).  Default: false.
 If true, use buffered I/O.  This is the opposite of the \fBdirect\fR parameter.
 Default: true.
 .TP
-.BI offset \fR=\fPsiint
+.BI offset \fR=\fPint
 Offset in the file to start I/O. Data before the offset will not be touched.
 .TP
 .BI fsync \fR=\fPint
@@ -431,7 +428,7 @@ the system must have free huge pages allocated.  \fBmmaphuge\fR also needs to
 have hugetlbfs mounted, and \fIfile\fR must point there.
 .RE
 .TP
-.BI hugepage\-size \fR=\fPsiint
+.BI hugepage\-size \fR=\fPint
 Defines the size of a huge page.  Must be at least equal to the system setting.
 Should be a multiple of 1MiB. Default: 4MiB.
 .TP
@@ -486,11 +483,11 @@ Pretend to verify.  Used for testing internals.
 If true, written verify blocks are sorted if \fBfio\fR deems it to be faster to
 read them back in a sorted manner.  Default: true.
 .TP
-.BI verify_offset \fR=\fPsiint
+.BI verify_offset \fR=\fPint
 Swap the verification header with data somewhere else in the block before
 writing.  It is swapped back before verifying.
 .TP
-.BI verify_interval \fR=\fPsiint
+.BI verify_interval \fR=\fPint
 Write the verification header for this number of bytes, which should divide
 \fBblocksize\fR.  Default: \fBblocksize\fR.
 .TP
@@ -518,10 +515,10 @@ specified.
 Use threads created with \fBpthread_create\fR\|(3) instead of processes created
 with \fBfork\fR\|(2).
 .TP
-.BI zonesize \fR=\fPsiint
+.BI zonesize \fR=\fPint
 Divide file into zones of the specified size in bytes.  See \fBzoneskip\fR.
 .TP
-.BI zoneskip \fR=\fPsiint
+.BI zoneskip \fR=\fPint
 Skip the specified number of bytes when \fBzonesize\fR bytes of data have been
 read.
 .TP
@@ -538,7 +535,7 @@ If given, write bandwidth logs of the jobs in this file.
 .B write_lat_log
 Same as \fBwrite_bw_log\fR, but writes I/O completion latencies.
 .TP
-.BI lockmem \fR=\fPsiint
+.BI lockmem \fR=\fPint
 Pin the specified amount of memory with \fBmlock\fR\|(2).  Can be used to
 simulate a smaller amount of memory.
 .TP
diff --git a/parse.c b/parse.c
index 4c6a9ea984ee28475c0f47eeabec549d68e7c55e..a8f42e1d6185159b9ad5c076a3a82d207e9a1b06 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -277,6 +277,7 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data,
        }
        case FIO_OPT_STR_VAL_TIME:
                is_time = 1;
+       case FIO_OPT_INT:
        case FIO_OPT_STR_VAL:
        case FIO_OPT_STR_VAL_INT: {
                fio_opt_str_val_fn *fn = o->cb;
@@ -373,7 +374,6 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data,
 
                break;
        }
-       case FIO_OPT_INT:
        case FIO_OPT_BOOL: {
                fio_opt_int_fn *fn = o->cb;