fio2gnplot: Print specific message if cmdline parsing fails

If the cmdline isn't consistent regarding the getopt, let's print a
specific message to inform user about this situation instead of printing
the help.

Showing the help without any specific message was very confusing.
fio2gnuplot: Adding getoplong support for cmdline

Help message was misleading since long options were not supported....
This patch adds all the long options to be supported.
fio2gnuplot: Fixing typo in error message
fio2gnuplot: Adding verbose option

Reducing default's verbosity and add a -v option to increase it.
This avoids flooding end-users and let an option for thoses who need to
get a complete trace.
fio2gnuplot: Deleting temporary files by default
fio2gnuplot: Managing temporary files in a better way

If gnuplot success at rendering, let's delete all temporary files.
If gnuplot fails at rendering, let's keep all temporary files.
If user don't want to run gnuplot, let's keep temporary files.
If user ask to keep the temporary files (option -k), let's always keep
them.
fio2gnuplot: Fixing help message

Adding missing features & fix indent
fio2gnuplot: Removing .py extension

It's pretty boring having the .py extension to the tool.
Let's remove it !
fio2gnuplot: Adding manpage

As requested by users, let's add a manpage to make things easier to
understand.

I'm providing here the raw file used to generate the manpage. It can be
converted to a real manpage by using txt2man.

I'm also providing the manpage file to avoid dependencies at build time,
anyway the makefile target can be easily used to rebuild it if
necessary.
genfio: Don't consider only /dev/ disk device

Prior this patch, genfio was considering the disks __NOT__ having the "/dev"
name in it.

That's a serious limitation as
- we can't test regular files
- that doesn't works for complex /dev/ naming like /dev/disk/by-id/...

This patch removes this requirement and let user giving the complete
path.
powerpc: disable use of ATBU clock

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Add number_ios= option

Signed-off-by: Jens Axboe <axboe@kernel.dk>
verify: fix problem with hole punching on newer Linux kernels

Jeff Moyer writes:

Our QE team noticed fio failures on recent kernels.  I simplified the
job file to the following:

[global]
name=fio-mmap
rw=write
bs=4K
direct=1
end_fsync=1
verify=crc32

[file3]
size=100M
ioengine=mmap
mem=malloc
direct=1

After fio completes (and returns verify errors), the file is completely
full of zeroes.

Here is what the verify logic is doing:

static void do_verify(struct thread_data *td, uint64_t verify_bytes)
{
...
        /*
         * sync io first and invalidate cache, to make sure we really
         * read from disk.
         */
        for_each_file(td, f, i) {
                if (!fio_file_open(f))
                        continue;
                if (fio_io_sync(td, f))
                        break;
                if (file_invalidate_cache(td, f)) <--------
                        break;
        }

That invalidate cache call looks like so:

static int __file_invalidate_cache(struct thread_data *td, struct fio_file *f,
                                   unsigned long long off,
                                   unsigned long long len)
{
...
        /*
         * FIXME: add blockdev flushing too
         */
        if (f->mmap_ptr) {
                ret = posix_madvise(f->mmap_ptr, f->mmap_sz, POSIX_MADV_DONTNEED);
                (void) posix_madvise(f->mmap_ptr, f->mmap_sz, FIO_MADV_FREE); <-------

FIO_MADV_FREE can be defined as MADV_REMOVE, which will actually punch a
hole in the file (a hole the size of the entire file, btw).  Of course,
unallocated blocks are returned as zeroes by the file system, so that
explains that!

---

For now, only do the MADV_FREE on non-files to avoid punching holes.
Further investigation is needed on the blockdev side, but at least
this should cure the immediate problem.

Reported-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Fix spelling error in fio man page

Signed-off-by: Jens Axboe <axboe@kernel.dk>
LFSR: Do not ignore returning the seed

Fix a situation where we would spin prematurely and would hop over the
seed value.

Also, add some more comments to the code.

Signed-off-by: Alex Pyrgiotis <apyrgio@grnet.gr>
Signed-off-by: Jens Axboe <axboe@kernel.dk>