fio.git
8 years agorand: use bools
Jens Axboe [Mon, 7 Mar 2016 22:38:44 +0000 (15:38 -0700)]
rand: use bools

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoAdd the sample JESD219 job file
Jens Axboe [Mon, 7 Mar 2016 21:44:24 +0000 (14:44 -0700)]
Add the sample JESD219 job file

Based on the posting from Jeff.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoio_u: speed up __get_next_buflen()
Andrey Kuzmin [Mon, 7 Mar 2016 21:40:25 +0000 (14:40 -0700)]
io_u: speed up __get_next_buflen()

Change the divide-by-100 into a multiplier instead.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agooptions: improvements to parse dry run
Jens Axboe [Mon, 7 Mar 2016 19:19:21 +0000 (12:19 -0700)]
options: improvements to parse dry run

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agooptions: finish merge of bssplit/rand zone code
Jens Axboe [Mon, 7 Mar 2016 19:01:40 +0000 (12:01 -0700)]
options: finish merge of bssplit/rand zone code

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agooptions: unify the bssplit/zone split code
Jens Axboe [Mon, 7 Mar 2016 16:29:13 +0000 (09:29 -0700)]
options: unify the bssplit/zone split code

Most of that parsing code was duplicated, apply a bit of abstraction
to it. Especially because it's not that pretty, so rather have one
copy of that nastiness.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoFix double free of td zone state index
Jens Axboe [Sat, 5 Mar 2016 02:50:41 +0000 (19:50 -0700)]
Fix double free of td zone state index

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoLog to parent instead of twice to child td
Alan C [Sat, 5 Mar 2016 00:13:14 +0000 (16:13 -0800)]
Log to parent instead of twice to child td

8 years agooptions: clean number of zones if we fail parsing
Jens Axboe [Fri, 4 Mar 2016 22:34:27 +0000 (15:34 -0700)]
options: clean number of zones if we fail parsing

Leaves us in a cleaner state, since the zone generation will never
attempt to touch uninitialized data then.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoAdd support for zones of random IO, with varying frequency of access
Jens Axboe [Fri, 4 Mar 2016 22:29:32 +0000 (15:29 -0700)]
Add support for zones of random IO, with varying frequency of access

Let's say you want to ensure that 50% of the IO falls in the first 5%
of the flie, with the remaining 50% over the last 95%. Now that's
possible with random_distribution=zoned. For this particular case,
you would do:

random_distribution=zoned:50/5:50/95

Up to 64 ranges can be specified, and multiple data directions can
be given as well. The above would apply to both reads, writes, and
trims. If you wanted to have 50% of the writes fall in the first
10%, 25% in the next 10%, and the last 25% over the remaining 80%,
you could extend the above ala:

random_distribution=zoned:50/5:50/95,50/10:25/10:25/80

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoUpdate documentation for random_distribution=gauss
Jens Axboe [Thu, 3 Mar 2016 21:00:54 +0000 (14:00 -0700)]
Update documentation for random_distribution=gauss

For some reason this was never committed, add it now.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoAdd support for preadv2/pwritev2
Jens Axboe [Fri, 26 Feb 2016 19:02:54 +0000 (11:02 -0800)]
Add support for preadv2/pwritev2

This is coming on Linux, and supports a high priority flag that will
use polling on the completion side.

Basic support is there, we'll need to add wrappers on x86_64 linux
to use them before it shows up in the glibc devel headers.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoioengines: account any queued IO on the engine side
Jens Axboe [Thu, 25 Feb 2016 20:24:47 +0000 (12:24 -0800)]
ioengines: account any queued IO on the engine side

Currently we don't account if it's not a read/write/trim, but that
can screw up with SYNC, for instance. Account any IO that the
IO engine has returned a queued status for.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agobackend: ensure that fio_io_sync() commits IN on queued status
Jens Axboe [Thu, 25 Feb 2016 16:04:06 +0000 (09:04 -0700)]
backend: ensure that fio_io_sync() commits IN on queued status

If we get a FIO_Q_QUEUED back, we need to commit pending IO
before we wait for it. Otherwise we trigger this bug:

fio: ioengines.c:257: td_io_getevents: Assertion `td->io_u_in_flight >= r' failed.

Reported-by: Andrey Kuzmin <andrey.v.kuzmin@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoAllow IO engine driven allocations of IO structures
Jens Axboe [Wed, 24 Feb 2016 23:29:08 +0000 (16:29 -0700)]
Allow IO engine driven allocations of IO structures

Based on a patch from Andrey Kuzmin, but modified so that we error
out if the user has specified a specific memory backing type
through the use of mem= or iomem=.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoAllow for the include file specification to be relative.
Andrey Kuzmin [Sat, 13 Feb 2016 19:31:00 +0000 (12:31 -0700)]
Allow for the include file specification to be relative.

Simplifies include file grouping, with same directory file included
via file name. Checked only if the lookup by the file name specified
fails.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agofio.1: man page fixes
Jens Axboe [Fri, 12 Feb 2016 22:00:39 +0000 (15:00 -0700)]
fio.1: man page fixes

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoUpdate documentation
Jens Axboe [Fri, 12 Feb 2016 17:37:01 +0000 (10:37 -0700)]
Update documentation

Section numbering duplicated in one place in the HOWTO.
Add the missing sections to the man page.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoserver: don't make SO_REUSEPORT errors fatal
Jens Axboe [Wed, 10 Feb 2016 15:32:13 +0000 (08:32 -0700)]
server: don't make SO_REUSEPORT errors fatal

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agodiskutil: don't print terse disk util twice for json,terse output format
Jens Axboe [Tue, 9 Feb 2016 20:45:50 +0000 (13:45 -0700)]
diskutil: don't print terse disk util twice for json,terse output format

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agodiskutil: fix segfault for both json and terse output
Jens Axboe [Tue, 9 Feb 2016 20:19:34 +0000 (13:19 -0700)]
diskutil: fix segfault for both json and terse output

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoio_ddir: io_ddir_name array should be static
Jens Axboe [Fri, 5 Feb 2016 15:42:26 +0000 (08:42 -0700)]
io_ddir: io_ddir_name array should be static

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agofio: fix copy/paste error in io_ddir.h
Andrey Kuzmin [Fri, 5 Feb 2016 15:14:52 +0000 (08:14 -0700)]
fio: fix copy/paste error in io_ddir.h

The last 'write' should be 'wait', to match with DDIR_WAIT.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agolog: add support for logging max instead of averages
Jens Axboe [Thu, 4 Feb 2016 19:09:48 +0000 (12:09 -0700)]
log: add support for logging max instead of averages

If we log with lov_avg_msec, fio will log the average over that
period of time to the log. Add log_max_value to change this to
logging maximums over the windowed period instead.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agostat: cleanup average logging
Jens Axboe [Thu, 4 Feb 2016 04:10:33 +0000 (21:10 -0700)]
stat: cleanup average logging

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agofio: fix ignore_error regression
Eric Whitney [Wed, 3 Feb 2016 23:58:43 +0000 (16:58 -0700)]
fio: fix ignore_error regression

Commit e9d512d8e7d2 introduced a regression affecting handling for
the ignore_error parameter.  The common code for io_u event handling
pulled from do_io() and do_verify() into io_queue_event() does not
check for and process errors that are to be ignored in the main I/O
path as I/Os are completed.  Prior to that commit, do_io() called
break_on_this_error() to handle that case.

The change causes fio to return a non-zero exit status after
encountering an error it should ignore while performing I/O, even
though the job does run to completion. This regression causes
failures for some fstests that use fio, including ext4/302, ext4/303,
and generic/300.

This patch restores the original error handling behavior.

Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agolibmtd: compile fix for linux header changes.
Robin H. Johnson [Wed, 3 Feb 2016 16:32:19 +0000 (08:32 -0800)]
libmtd: compile fix for linux header changes.

In the Linux kernel source, mtd/mtd-user.h had a change
'mtd: mtd-user: remove stdint.h include'
(137d36af4a53858b8db7ca83c8480247118b8bdf)

This causes the uint8_t/uint64_t types to be undefined in libmtd.h
now, as they were implicitly coming from it before.

Import stdint.h explicitly into libmtd.h to resolve this.

X-URL: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=137d36af4a53858b8db7ca83c8480247118b8bdf
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
8 years agoMakefile: false positive on _FORTIFY_SOURCE
Robin H. Johnson [Wed, 3 Feb 2016 16:19:52 +0000 (08:19 -0800)]
Makefile: false positive on _FORTIFY_SOURCE

If the compiler is very pedantic and includes _FORTIFY_SOURCE, then you
get the following warning about redefinition:
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined

To prevent it, undefine and redefine _FORTIFY_SOURCE.

Gentoo's gcc does this for -O2.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
8 years agoAdd a note of what is the default value for random_generator
Jens Axboe [Sun, 31 Jan 2016 05:03:39 +0000 (22:03 -0700)]
Add a note of what is the default value for random_generator

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoserver: send trigger state inline
Jens Axboe [Thu, 28 Jan 2016 20:41:18 +0000 (13:41 -0700)]
server: send trigger state inline

If we don't send it inline, we can't be sure that it's transmitted
if the trigger event is a hard reboot or similar.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoclient: fix double removal of client on job file open failure
Jens Axboe [Thu, 28 Jan 2016 19:47:11 +0000 (12:47 -0700)]
client: fix double removal of client on job file open failure

If fio is invoked as a client and the job file does not exist, it
will exit ala:

fio: job file <x.fio> open: No such file or directory
fio: client.c:240: remove_client: Assertion `client->refs' failed.

because the break path ends up doing the removal twice. Fix that
to only remove it once, so we don't trigger the assert.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoFio 2.6 fio-2.6
Jens Axboe [Wed, 27 Jan 2016 02:02:07 +0000 (19:02 -0700)]
Fio 2.6

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoserver: split vectored commands into fragments
Jens Axboe [Tue, 26 Jan 2016 23:44:24 +0000 (16:44 -0700)]
server: split vectored commands into fragments

This fixes the fio_send_cmd_ext_pdu() path to split commands
into properly sized fragments. This also reverts the
previous commit, that bypassed the check since this path
was broken.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoserver: disable pdu length check for now
Jens Axboe [Tue, 26 Jan 2016 18:19:16 +0000 (11:19 -0700)]
server: disable pdu length check for now

Vectored entries don't always honor it. Allow longer payloads, until
we fix the breakdown again.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoclient: remove debug printf() for compressed iolog
Jens Axboe [Tue, 26 Jan 2016 18:02:16 +0000 (11:02 -0700)]
client: remove debug printf() for compressed iolog

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agopowerpc: fix cpus_online() to get correct max CPU number for powerpc64
Dan Qing Zhang [Mon, 25 Jan 2016 13:04:18 +0000 (13:04 +0000)]
powerpc: fix cpus_online() to get correct max CPU number for powerpc64

This patch tries to fix cpus_online() for powerpc64 when running fio
by using parameter "cpus_allowed", in order to obtain correct max CPU
number on powerpc64 architecture.

When changing SMT settings on powerpc architecture, the way of cpu
numbering is changing as well. For example, when SMT=off, CPUs are
numbered like 0,8,16,..., while when SMT=2, CPUs are numbered like
0,1,8,9,.... Therefore, sysconf(_SC_NPROCESSORS_ONLN) is not applied
to get exact max CPU number on powerpc. And the max_cpu value can be
correctly ontained by using sysconf(_SC_NPROCESSORS_CONF).

Signed-off-by: Dan Qing Zhang <dqzhang@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoFix Windows build: define rand_r()
Bruce Cran [Fri, 22 Jan 2016 17:54:47 +0000 (10:54 -0700)]
Fix Windows build: define rand_r()

8 years agoMakefile: fix duplicate strcasestr for windows
Jens Axboe [Fri, 22 Jan 2016 22:10:31 +0000 (15:10 -0700)]
Makefile: fix duplicate strcasestr for windows

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoserver: use the wrapped MSG_DONTWAIT
Jens Axboe [Fri, 22 Jan 2016 18:49:57 +0000 (11:49 -0700)]
server: use the wrapped MSG_DONTWAIT

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoioengine: remove duplicate queue handler check
David Disseldorp [Thu, 21 Jan 2016 16:45:44 +0000 (17:45 +0100)]
ioengine: remove duplicate queue handler check

Signed-off-by: David Disseldorp <ddiss@suse.de>
8 years agoFio 2.5 fio-2.5
Jens Axboe [Thu, 21 Jan 2016 05:00:17 +0000 (22:00 -0700)]
Fio 2.5

2.4 was short lived, 2.5 fixes an important regression that
happened between fio-2.2.12 and fio-2.2.13.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agomutex: fix double unlock in fio_mutex_down_timeout()
Jens Axboe [Thu, 21 Jan 2016 04:52:47 +0000 (21:52 -0700)]
mutex: fix double unlock in fio_mutex_down_timeout()

In case of error, we unlock twice.

Fixes: 09400a60042e ("mutex: fixup fio_mutex_down_timeout()")
Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoinit: fix compile for FIO_INC_DEBUG not being set
Jens Axboe [Thu, 21 Jan 2016 04:17:55 +0000 (21:17 -0700)]
init: fix compile for FIO_INC_DEBUG not being set

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoFio 2.4 fio-2.4
Jens Axboe [Thu, 21 Jan 2016 04:13:08 +0000 (21:13 -0700)]
Fio 2.4

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoinit: increment stat count if parent == default thread
Jens Axboe [Thu, 21 Jan 2016 00:45:13 +0000 (17:45 -0700)]
init: increment stat count if parent == default thread

We skip doing the stat increment if group_reporting is set,
but that means we can end up with stat_number == 0. That
isn't correct, increment for group_reporting as well, but
only if the parent is the default thread. That means we
still won't do it for sub-jobs.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoclient: fix non-text command leak
Jens Axboe [Wed, 20 Jan 2016 19:17:54 +0000 (12:17 -0700)]
client: fix non-text command leak

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoclient: drain text output when exiting
Jens Axboe [Wed, 20 Jan 2016 18:22:22 +0000 (11:22 -0700)]
client: drain text output when exiting

If we don't, we can lose error messages from the server side. One
example would be for protocol version mismatch - the server will
notify the client, but the client doesn't check for these messages
before exiting.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoFix issue with termination before io_size has been reached
Jens Axboe [Thu, 14 Jan 2016 21:44:23 +0000 (14:44 -0700)]
Fix issue with termination before io_size has been reached

If the size of the device isn't a multiple of the block size,
then we can exit prematurely for cases where an io_limit has
been set higher than the device size. This is because the file(s)
get marked completely done if bs is a multiple of the device size,
but doesn't for the opposite case.

We should not factor this in for deciding to keep running or not.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoio_u: ensure that we align new start offset properly for time_based
Jens Axboe [Thu, 14 Jan 2016 17:31:38 +0000 (10:31 -0700)]
io_u: ensure that we align new start offset properly for time_based

If io_size isn't a multiple of the block size, weird things can
happen, which usually means that fio will exit with an unaligned
IO error:

fio: io_u error on file /dev/nvme0n1: Invalid argument: write offset=125830, buflen=1048576

where offset=125830 really should have been aligned to the block
size. Ensure that we do that.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agot/verify-state: one more printf type fix
Jens Axboe [Wed, 13 Jan 2016 20:17:39 +0000 (13:17 -0700)]
t/verify-state: one more printf type fix

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agot/verify-state: fix type for printf
Jens Axboe [Wed, 13 Jan 2016 20:17:00 +0000 (13:17 -0700)]
t/verify-state: fix type for printf

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoDestroy sk_out server key when we are done
Jens Axboe [Wed, 13 Jan 2016 16:40:51 +0000 (09:40 -0700)]
Destroy sk_out server key when we are done

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoAlways create server sk_out key
Jens Axboe [Wed, 13 Jan 2016 16:34:46 +0000 (09:34 -0700)]
Always create server sk_out key

We use it from helper threads, so let's just unconditionally
set it up. This fixes a problem on fio exit with libraries or
engines that also create pthread keys.

Reported-by: Jens Rosenboom <j.rosenboom@x-ion.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agooptions: fix bs_cmp()
Jens Axboe [Tue, 12 Jan 2016 17:18:50 +0000 (10:18 -0700)]
options: fix bs_cmp()

Return the int difference between the two, not a bool.

Reported-by: Yury Gribov <>
Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agouse option smalloc_pool_size
Andreas Piesk [Fri, 8 Jan 2016 13:29:12 +0000 (14:29 +0100)]
use option smalloc_pool_size

8 years agot/verify-state: add helper to inspect verify dump state files
Jens Axboe [Thu, 7 Jan 2016 22:06:22 +0000 (15:06 -0700)]
t/verify-state: add helper to inspect verify dump state files

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoMerge branch 'master' of git://github.com/ezrapedersen/fio
Jens Axboe [Thu, 7 Jan 2016 22:01:09 +0000 (15:01 -0700)]
Merge branch 'master' of git://github.com/ezrapedersen/fio

8 years agoverify-state: forward declare io_u
Jens Axboe [Thu, 7 Jan 2016 21:26:57 +0000 (14:26 -0700)]
verify-state: forward declare io_u

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoDisable libaio for ESXi build - bug#80
root [Thu, 7 Jan 2016 21:25:10 +0000 (21:25 +0000)]
Disable libaio for ESXi build - bug#80

8 years agoverify: split out state header code
Jens Axboe [Thu, 7 Jan 2016 21:22:09 +0000 (14:22 -0700)]
verify: split out state header code

We'll need to use it in a separate helper utility, and we don't
need all the verify code for this.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoserver: sk_out exit error handling
Jens Axboe [Thu, 7 Jan 2016 18:19:28 +0000 (11:19 -0700)]
server: sk_out exit error handling

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoconfigure: lex force off
Jens Axboe [Thu, 7 Jan 2016 18:18:22 +0000 (11:18 -0700)]
configure: lex force off

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoserver: include name of verify file requested for error message
Jens Axboe [Thu, 7 Jan 2016 18:07:51 +0000 (11:07 -0700)]
server: include name of verify file requested for error message

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agooptions: move pattern_fmt_desc where we need it
Jens Axboe [Wed, 30 Dec 2015 16:27:05 +0000 (09:27 -0700)]
options: move pattern_fmt_desc where we need it

No need for that to be global.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agooptions: we don't need the crc32c verify include
Jens Axboe [Wed, 30 Dec 2015 16:23:13 +0000 (09:23 -0700)]
options: we don't need the crc32c verify include

We used to test for the availability of the hw accellerated code,
but that happens elsewhere now.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agooptions: split out option grouping code
Jens Axboe [Wed, 30 Dec 2015 16:03:55 +0000 (09:03 -0700)]
options: split out option grouping code

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agooptions: make the groups/categories constant
Jens Axboe [Wed, 30 Dec 2015 15:55:19 +0000 (08:55 -0700)]
options: make the groups/categories constant

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoconfigure: add --enable-lex
Jens Axboe [Wed, 30 Dec 2015 03:58:13 +0000 (20:58 -0700)]
configure: add --enable-lex

For AIX, default to lex being off. It can be enabled with
--enable-lex. For other platforms, rely on the regular
configure check to check enable/disable.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoconfigure: check if lex requires/fails with -o for output
Jens Axboe [Tue, 29 Dec 2015 19:23:17 +0000 (12:23 -0700)]
configure: check if lex requires/fails with -o for output

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agot/dedupe: silence bogus warning on 'bytes' being used uninitialized
Jens Axboe [Tue, 29 Dec 2015 15:30:33 +0000 (08:30 -0700)]
t/dedupe: silence bogus warning on 'bytes' being used uninitialized

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agot/genzipf: fix for strcasestr missing
Jens Axboe [Tue, 29 Dec 2015 00:39:22 +0000 (17:39 -0700)]
t/genzipf: fix for strcasestr missing

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoFix included getopt locations
Jens Axboe [Tue, 29 Dec 2015 00:14:46 +0000 (17:14 -0700)]
Fix included getopt locations

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agolib/pattern: include oslib/strcasestr.h
Jens Axboe [Mon, 28 Dec 2015 23:45:49 +0000 (16:45 -0700)]
lib/pattern: include oslib/strcasestr.h

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoclient: rename send_file() to fio_send_file()
Jens Axboe [Mon, 28 Dec 2015 23:16:06 +0000 (16:16 -0700)]
client: rename send_file() to fio_send_file()

AIX apparently has a symbol clash.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoFio 2.3 fio-2.3
Jens Axboe [Wed, 23 Dec 2015 16:39:04 +0000 (09:39 -0700)]
Fio 2.3

Let's switch to a simpler numbering scheme. 2.3 follows 2.2.13, so
it should have been 2.2.14. But from now on, let's just use a simpler
MAJOR.MINOR release numbering scheme.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agogfio: use ffz64 for 64-bit types
Jens Axboe [Wed, 23 Dec 2015 16:10:05 +0000 (09:10 -0700)]
gfio: use ffz64 for 64-bit types

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoarch: add ffs64 and ffz64
Jens Axboe [Wed, 23 Dec 2015 16:09:23 +0000 (09:09 -0700)]
arch: add ffs64 and ffz64

These just use the normal C software version, extended to 64-bit
even on 32-bit archs. The fast variant is still machine word native.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoFix runtime of terse output
shoichi.sawada@toshiba.co.jp [Tue, 22 Dec 2015 08:16:24 +0000 (08:16 +0000)]
Fix runtime of terse output

Hi,

When I used fio with option of '--status-interval=1 --minimal' and 'random_distribution=zipf:1.2',
'runtime' of 2nd line was 18446744073709551345.
This value is -271 in int_64.

This is because 'runtime' was subtracted in function '__show_running_run_stats'.
If 'td->io_bytes' is 0 when this function was called,
and 'td->io_bytes' is not 0 when '__show_run_stats' returned,
'runtime' is subtracted by 'rt' even though 'runtime' have not added.

I fixed the problem by applying this patch to fio-2.2.13.

Regards
Shoichi

----

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agobackend: continue on failed wait_for() check, not break
Jens Axboe [Tue, 22 Dec 2015 20:40:14 +0000 (13:40 -0700)]
backend: continue on failed wait_for() check, not break

If we have this job file:

[a]

[b]
wait_for=a

[c]
wait_for=a

[d]

then we expect a/d to run together, then b/c after a is done. However,
right now we break out of the job loop, so it acts like a stonewall.
That means that a will run first, then b/c/d. That isn't correct.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agogfio: update for 64-bit option category/group
Jens Axboe [Tue, 22 Dec 2015 18:11:14 +0000 (11:11 -0700)]
gfio: update for 64-bit option category/group

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoAdd support for waiting for other jobs by name
Andrey Kuzmin [Tue, 22 Dec 2015 16:21:25 +0000 (09:21 -0700)]
Add support for waiting for other jobs by name

We have stonewall to barrier against previous jobs before a new
job runs. This adds support for 'wait_for', which allows the
user to explicitly wait for a given job before starting.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoparse: ensure that option group/category hold 64-bit
Jens Axboe [Tue, 22 Dec 2015 16:04:27 +0000 (09:04 -0700)]
parse: ensure that option group/category hold 64-bit

options.c:3459:12: warning: large integer implicitly truncated to unsigned type [-Woverflow]
   .group = FIO_OPT_G_INVALID,

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agorewrote libhdfs engine
Fabrice Bacchella [Tue, 22 Dec 2015 11:26:51 +0000 (12:26 +0100)]
rewrote libhdfs engine

8 years agoMake options mask a 64-bit type
Jens Axboe [Mon, 21 Dec 2015 23:03:01 +0000 (16:03 -0700)]
Make options mask a 64-bit type

We're running out of bit numbers, double it up.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agobackend: only terminate multiple loops if we did no IO
Jens Axboe [Mon, 21 Dec 2015 17:01:40 +0000 (10:01 -0700)]
backend: only terminate multiple loops if we did no IO

Commit 095196b1e76b introduced a stop point if do_io() returned
nothing, but that only counts writes and trims. Change that to
count all types of IO.

Fixes: 095196b1e76b ("backend: terminate loop if we didn't do IO")
Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agobackend: count iterative bytes for progress
Jens Axboe [Sat, 19 Dec 2015 05:33:35 +0000 (22:33 -0700)]
backend: count iterative bytes for progress

Commit ac28d9053679 changed it so we don't clear ->bytes_done[]
necessarily for each loop. However, this introduced a busy loop
where we this we did IO and continue to loop, but we really
didn't.

Fixes: ac28d9053679 ("Fixup bw/iops logging for short runs")
Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoserver: command tag cleanup
Jens Axboe [Fri, 18 Dec 2015 17:36:57 +0000 (10:36 -0700)]
server: command tag cleanup

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoserver: don't store command tag on the stack
Jens Axboe [Fri, 18 Dec 2015 16:17:41 +0000 (09:17 -0700)]
server: don't store command tag on the stack

It'll go out-of-scope, making the server unhappy.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoclient: iolog cleanups
Jens Axboe [Fri, 18 Dec 2015 15:57:24 +0000 (08:57 -0700)]
client: iolog cleanups

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoserver: code cleanups
Jens Axboe [Thu, 17 Dec 2015 22:23:48 +0000 (15:23 -0700)]
server: code cleanups

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoserver: remove leftover debug statement
Jens Axboe [Thu, 17 Dec 2015 21:59:49 +0000 (14:59 -0700)]
server: remove leftover debug statement

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoconfigure: fix zlib typo
Jens Axboe [Thu, 17 Dec 2015 21:55:16 +0000 (14:55 -0700)]
configure: fix zlib typo

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoclient/server: transparent handling of storing compressed logs
Jens Axboe [Thu, 17 Dec 2015 21:54:15 +0000 (14:54 -0700)]
client/server: transparent handling of storing compressed logs

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoFix compile warning for !zlib
Jens Axboe [Thu, 17 Dec 2015 21:53:45 +0000 (14:53 -0700)]
Fix compile warning for !zlib

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoclient/server: various bug fixes
Jens Axboe [Thu, 17 Dec 2015 17:24:03 +0000 (10:24 -0700)]
client/server: various bug fixes

- Better handling of vectored commands
- Improve sk_out mutex handling (don't alloc separately)
- Add support for sync sending of network data
- Prep for network xmit of logs

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoEnsure that command line options also end up in json output
Jens Axboe [Thu, 17 Dec 2015 15:32:15 +0000 (08:32 -0700)]
Ensure that command line options also end up in json output

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agogclient: don't free pdu on iolog return
Jens Axboe [Wed, 16 Dec 2015 22:05:54 +0000 (15:05 -0700)]
gclient: don't free pdu on iolog return

The command is freed separately, don't free it twice.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoclient: fix double free of command on timeout
Jens Axboe [Wed, 16 Dec 2015 22:05:22 +0000 (15:05 -0700)]
client: fix double free of command on timeout

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoverify: dump failed header, if verification fails
Jens Axboe [Wed, 16 Dec 2015 15:59:38 +0000 (08:59 -0700)]
verify: dump failed header, if verification fails

And verify_dump=1 is enabled.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoparse: fix segfault if posval option doesn't have a value
Jens Axboe [Wed, 16 Dec 2015 15:32:30 +0000 (08:32 -0700)]
parse: fix segfault if posval option doesn't have a value

If the user did

continue_on_error

in the job file without setting one of the possible values
for that option, we'd crash in string compare. Now fio will
exit in error, showing the valid options instead.

Signed-off-by: Jens Axboe <axboe@fb.com>