Add runstate swap helpers

Signed-off-by: Jens Axboe <axboe@fb.com>
Windows: add install directory to the Path environment variable

Signed-off-by: Jens Axboe <axboe@fb.com>
server: fix warnings on some platforms on incompatible pointer type

Signed-off-by: Jens Axboe <axboe@fb.com>
Silence 'io_u might be used uninitialized' warning

Signed-off-by: Jens Axboe <axboe@fb.com>
solaris: fixup new cpuset functions

Signed-off-by: Jens Axboe <axboe@fb.com>
Merge branch 'master' of ssh://git.kernel.dk/data/git/fio
Fix verify_only option not working properly

In commit c4b6117, we changed the place to call log_io_piece but
the new place won't be reached when using verify_only option so
that when we run with the verify_only option, fio won't verify
anything at all.

This patch fix that by also call the log_io_piece in the do_dry_run
function for the verify_only code path.

Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
Fio 2.1.6

Signed-off-by: Jens Axboe <axboe@fb.com>
Fix typo in fio_cpu_count()

Reported-by: Paul Howarth <paul@city-fan.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
Fix compile on CentOS/RHEL5

They don't have CPU_COUNT(), so add a helper for that.

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

Lets tag a minor 2.1.6 update that has the RHEL/CentOS5
compile issue fixed.

Signed-off-by: Jens Axboe <axboe@fb.com>
Honor ./configure --cc= option

The cc variable is assigned before parsing command-line options.  This
effectively ignores the ./configure --cc= option.  Move the cc variable
assigned below option parsing.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Detect Windows operating system in ./configure

We should not rely on `uname -s` if we ever want cross-compiling to
work, so detect _WIN32.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Fix pointer alignment bug causing SIGBUS on Sparc64

OK, the issue was related to the alignment issue between the
thread_options structure and its "packed" version : The lexxx_to_cpu
macros are incorrectly casting the pointers and that causes an bus
error.  I have fixed the issue by avoid casting the pointers and calling
directly the "swap" method.

I have also included a fixed on the thread_options structure regarding
the ddir_seq_add variable : Its length was incorrect.

Signed-off-by: Jens Axboe <axboe@fb.com>
Try a little harder to honor number_ios more accurately

Previously, fio checked this on completion, which means we could
almost spill over by the iodepth setting. Check this before
issue instead, taking the in flight IOs into account as well.

Reported-by: Robert Elliott <Elliott@hp.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Add exceeds_number_ios() helper

Commit 26251d8d open-coded the logic in two places, collapse
that into one function.

Signed-off-by: Jens Axboe <axboe@fb.com>
Update documentation for filename/directory

Sync the HOWTO and man page, and add a reference from 'directory'
to 'filename' on how to escape certain characters.

Signed-off-by: Jens Axboe <axboe@fb.com>
Merge branch 'master' of ssh://git.kernel.dk/data/git/fio
stat: fixup fio-dump-status file location

Don't use /tmp in the actual file name. And kill unused Windows
os_get_tmpdir().

Signed-off-by: Jens Axboe <axboe@fb.com>
Disable status file updates on error

If fio doesn't have permission to unlink() the status file,
it'll continually dump status updates. If this happens, stop
doing status updates and log an error indicating why.

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