Fix fallocate erroneously returning ENOSYS on Linux systems

Currently, the helpers.c file provides a function defintion for Linux
fallocate that sets errno to ENOSYS and returns failure; this is useful
for a non-Linux OS. However, this definition will override the Linux
implementation of fallocate when 'fallocate=keep' is set. Adding a
preprocessor macro to check if Linux fallocate is defined fixes this
issue.

Signed-off-by: Wade Cline <wcline@us.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diskutil: ensure that we lock around disk_list access

And also ensure that before we free the disk util structures,
we wait for the disk util thread to exit.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Revert "diskutil: ensure that we lock around disk_list access"

This reverts commit feb418556a236aa041a625b083d6b99e55d23d74.

It causes hangs, needs further testing.
update rdma engine compile command
Merge branch 'master' of git://git.kernel.dk/fio into numa
diskutil: ensure that we lock around disk_list access

And also ensure that before we free the disk util structures,
we wait for the disk util thread to exit.

This is v2 of the patch. Commit feb41855 had a bug where it
would deadlock on the disk_util_mutex, when handling drives
that had slaves (lvm/md).

Signed-off-by: Jens Axboe <axboe@kernel.dk>
mutex: make 0/1 FIO_MUTEX_LOCKED and FIO_MUTEX_UNLOCKED

Makes the API look cleaner.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Merge branch 'master' of git://git.kernel.dk/fio
fio Makefile improvement - don't override $(CC)

I tried to build fio 2.0.8 today and found that the Makefile
unconditionally sets CC.
Since I've only got clang on my FreeBSD box it needs to avoid overriding
the default.

Use the default system compiler - don't override $(CC) if already set.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fio: add nanosleep() to Windows

I've attached a patch which adds an implementation of nanosleep() to
Windows, fixing rate-limiting.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fix 32-bit Windows fio (overflow in getusage and gettimeofday)

Fix overflow in getrusage and gettimeofday for 32-bit versions of fio
on Windows.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Fixing wraparound behavior for time-based sequential read jobs

Previously, a buggy patch made sequential jobs wrap around when they
reached an offset of 'size'. However, the appropriate wraparound is at
size + initial offset. This patch restores the previous behavior.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Windows fio fixes

Here's the latest set of Windows fio fixes:

Windows posix.c fixes

Reset the file pointer at the end of posix_fallocate().
Use 64-bit versions of tell() and seek().
Fix basename().
Use uint64_t instead of unsigned long long.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
eta: make CR= display more easy to understand

Currently we sum up read and write IOPS/BW rates, but that reads
a bit strange when a given workload only does reads OR writes.
The user then thinks that fio mis-parsed the setting, reading
twice as much as expected.

Only sum up for the read OR write side if one direction is given.
For a mixed workload, it's still the sum of both.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Windows fio: implement some more POSIX functions

Implement opendir, closedir, readdir, and basic openlog, closelog and
syslog functionality on Windows.

Remove inet_aton since it wasn't being used.

Remove warning that msync isn't implemented - just return an error.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Fio 2.0.9

Signed-off-by: Jens Axboe <axboe@kernel.dk>
example: add SSD steady state test case

Simple test case:

- Start by filling a drive with large block sequential writes
- Once that is done, start filling it with random 4k writes.

At some point the latter phase will hit steady state. Progress
is logged.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
client: support per-client job files

Currently the fio network client sends all job files to all clients.
This isn't very flexible.

Add support for specifying a specific job file for each client. Example:

$ fio --client hostname1 jobfile1 --client hostname2 jobfile2

would before add jobfile1 and jobfile2 as job files for both clients.
With this change, only jobfile1 is sent to hostname1, and only
jobfile2 is sent to hostname2.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
README: update for newer client job file argument format

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Fixup README indentation

Some tabs were missing.

Signed-off-by: xieliang <xieliang@xiaomi.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>