Fix wrong time conversion on --status-interval= command line option

Signed-off-by: Jens Axboe <axboe@fb.com>
Merge branch 'master' of ssh://git.kernel.dk/data/git/fio
Fio 2.1.7

Signed-off-by: Jens Axboe <axboe@fb.com>
Fix bug in freeing of duplicated files

Signed-off-by: Jens Axboe <axboe@fb.com>
Properly initialize shadow_fd to -1

We forget that in one case, causing all sorts of issues when
we end up closing this bogus (STDIN) descriptor.

Signed-off-by: Jens Axboe <axboe@fb.com>
Properly protect already-allocated file list

We need proper locking around it for thread based setups.

Signed-off-by: Jens Axboe <axboe@fb.com>
Ensure we inherit global latency/bw log settings

Note that you cannot use a filename with these, it's just
an on/off switch. For tighter control of where the log
is written (and its name), use the job option instead of
the command line on/off switch.

Signed-off-by: Jens Axboe <axboe@fb.com>
Add alloc_new_file()

Hopefully avoid a bug like commit 4db205dc fixed by abstracting
out the allocate-and-initialize part of fio_file allocation.

Signed-off-by: Jens Axboe <axboe@fb.com>
File pre-read lseek error check

Signed-off-by: Jens Axboe <axboe@fb.com>
Cleanup symbols that should be static

Run analysis on symbols not used outside of their current file,
turn them into statics.

Signed-off-by: Jens Axboe <axboe@fb.com>
iolog: Keep full path for logs files

The default behavior of fio was to basename() the log filename
preventing relocating it into another directory.

This patch simply removes the basename() that doesn't provides any real
feature but only limit the usage.

Patch tested with genfio with success while relocating to /tmp.
stat: fixing bw_agg reporting

It was wrongly set to the mean value instead of the agg one.
io_u: Using initialized local variable

ddir was feed with io_u->ddir at init time but didn't got used before
reassign it to the same value or another one.

That was making this init useless.

This patch simplify this portion of code by using the initialized
variable.
Merge branch 'erwan/nobasename' of https://github.com/enovance/fio
Merge branch 'erwan/clang' of https://github.com/enovance/fio
Fix propagation of error value on failure to connect to fio server

Fio does detect the error and exits, but it doesn't exit with
a non-zero exit value.

Signed-off-by: Jens Axboe <axboe@fb.com>
Add missing crc/test.h file

Commit 10aa136b forgot to add this file, unfortunately.

Signed-off-by: Jens Axboe <axboe@fb.com>
Don't crash when using filehash lock before init

We might be parsing and adding files (which locks the hash
lock) before we have setup threads. For that case, don't
bother locking, we're serialized at that point.

Signed-off-by: Jens Axboe <axboe@fb.com>
mutex: add open init function and down_trylock() variant

Signed-off-by: Jens Axboe <axboe@fb.com>
Add 'f' (Finishing) flag to status output

Use this for finalizing logs when a thread is done, since
that can take a long time.

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