fio.git
13 years agoblktrace support: speedup reading of data
Jens Axboe [Wed, 16 May 2007 07:25:09 +0000 (09:25 +0200)]
blktrace support: speedup reading of data

We used to read in data in really small chunks (48 bytes at the time,
the size of the trace). This is really slow for large traces, so
add a fifo frontend to refill the cache in much larger sizes.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoblktrace support: adjust largest io_u buffer size to match trace
Jens Axboe [Wed, 16 May 2007 06:47:46 +0000 (08:47 +0200)]
blktrace support: adjust largest io_u buffer size to match trace

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoblktrace replay: delay support
Jens Axboe [Tue, 15 May 2007 12:29:58 +0000 (14:29 +0200)]
blktrace replay: delay support

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoblktrace fixup + documentation
Jens Axboe [Tue, 15 May 2007 11:23:19 +0000 (13:23 +0200)]
blktrace fixup + documentation

Add a little documentation on using blktrace data files.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoblktrace support now works
Jens Axboe [Tue, 15 May 2007 11:10:41 +0000 (13:10 +0200)]
blktrace support now works

One little buglet - the blktrace offset is the sector, not the
byte offset. For now it's hardcoded at 512, should really get
the value from the device.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoblktrace support update
Jens Axboe [Tue, 15 May 2007 09:54:21 +0000 (11:54 +0200)]
blktrace support update

This should essentially work, except that it will not delay between
io but just issue the entries as fast as it can. Missing bits:

- Utilize the ipo->delay to suitably delay issuing an io
- Extract device name from blktrace file
- Document it

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoiolog bug: TD_DDIR_READ should be TD_DDIR_WRITE
Jens Axboe [Tue, 15 May 2007 09:12:19 +0000 (11:12 +0200)]
iolog bug: TD_DDIR_READ should be TD_DDIR_WRITE

It's a typo, if we don't have reads stored but writes, then the
global direction should naturally be TD_DDIR_WRITE.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix typo in blktrace code
Jens Axboe [Tue, 15 May 2007 08:13:04 +0000 (10:13 +0200)]
Fix typo in blktrace code

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoSome more bits of blktrace support
Jens Axboe [Tue, 15 May 2007 08:12:26 +0000 (10:12 +0200)]
Some more bits of blktrace support

Basic read/write is there. Still need to extract device name from
the trace, and check time delays to wait appropriately.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoInitial blktrace support
Jens Axboe [Tue, 15 May 2007 06:44:04 +0000 (08:44 +0200)]
Initial blktrace support

This doesn't work yet, just committing what little bits I did as not
to lose them.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoLog error on io buffer allocation
Jens Axboe [Thu, 26 Apr 2007 13:24:20 +0000 (15:24 +0200)]
Log error on io buffer allocation

Currently it just exits silently.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoAllow termination during io_u building
Jens Axboe [Thu, 26 Apr 2007 11:47:07 +0000 (13:47 +0200)]
Allow termination during io_u building

If we are setting up gigabytes of io buffers, it can take many seconds
for that operation to complete. If the user wishes to abort, fio wont
honor that request. Fix that.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFio 1.16.1 fio-1.16.1
Jens Axboe [Thu, 26 Apr 2007 08:22:16 +0000 (10:22 +0200)]
Fio 1.16.1

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix bug with file references
Jens Axboe [Thu, 26 Apr 2007 08:21:15 +0000 (10:21 +0200)]
Fix bug with file references

This could cause premature exit of fio with an error at the end of
the run.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoDisk stat improvements
Jens Axboe [Thu, 26 Apr 2007 07:02:34 +0000 (09:02 +0200)]
Disk stat improvements

Add an option to disable the disk stats. And only dump the disk
stat header, if we actually have stats to show.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoMore iolog fixes
Jens Axboe [Wed, 25 Apr 2007 12:24:12 +0000 (14:24 +0200)]
More iolog fixes

- Warn if nrfiles > 1, so that the user knows it's not supported
- Need to clear ipo on malloc, or ->file could be some random value.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix read_iolog
Jens Axboe [Wed, 25 Apr 2007 12:11:18 +0000 (14:11 +0200)]
Fix read_iolog

Caveat - it only works with 1 file, unfortunately. Will need a format
change to get that right.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFio 1.16 fio-1.16
Jens Axboe [Wed, 25 Apr 2007 06:41:04 +0000 (08:41 +0200)]
Fio 1.16

Mainly minor bug fixes, but also a few features.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFio is also available over http://
Jens Axboe [Mon, 23 Apr 2007 16:54:55 +0000 (18:54 +0200)]
Fio is also available over http://

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix file unlinking
Jens Axboe [Thu, 19 Apr 2007 14:31:16 +0000 (16:31 +0200)]
Fix file unlinking

We never set FIO_FILE_UNLINK. Just unlink if it's a regular
file and unlink=1 was given.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix command line parsing bug
Jens Axboe [Thu, 19 Apr 2007 07:53:28 +0000 (09:53 +0200)]
Fix command line parsing bug

The first parameters are for the global job, if no --name section
has been seen yet. We don't require a --name=global section to appear
first.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix --showcmd bug
Jens Axboe [Thu, 19 Apr 2007 07:41:45 +0000 (09:41 +0200)]
Fix --showcmd bug

Only append 'fio' if this is the first time we see a [] section.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoMask in BE ioprio class as default
Jens Axboe [Wed, 18 Apr 2007 10:46:56 +0000 (12:46 +0200)]
Mask in BE ioprio class as default

We can't just set the ioprio value, we always have to set a class
as well. If no class is given, just assume it's the default best
effort class we want.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoRevert "We do need to send a SIGQUIT to a process/thread, even if it is running"
Jens Axboe [Wed, 18 Apr 2007 10:25:41 +0000 (12:25 +0200)]
Revert "We do need to send a SIGQUIT to a process/thread, even if it is running"

This reverts commit ef5fffa591e583de26c6ce14f9448104d6dfbe79.

The problem with the commit is that if we SIGQUIT a thread, it
gets exited without updating runtime/etc info. And then we
don't get a new status display on exit.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoHave the job set ->terminate when runtime is exceeded
Jens Axboe [Wed, 18 Apr 2007 07:02:32 +0000 (09:02 +0200)]
Have the job set ->terminate when runtime is exceeded

Then we don't have to do a seperate check for time_based exit.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoAdd time_based option
Jens Axboe [Tue, 17 Apr 2007 18:14:42 +0000 (20:14 +0200)]
Add time_based option

This allows fio to keep running, even if the workload has completed.
It will simply restart the workload over and over, for as long as the
runtime setting allows.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoReplace random constant with the symbolic name (GR prime)
Jens Axboe [Tue, 17 Apr 2007 17:52:18 +0000 (19:52 +0200)]
Replace random constant with the symbolic name (GR prime)

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoIO buffer allocation cleanup
Jens Axboe [Tue, 17 Apr 2007 17:48:46 +0000 (19:48 +0200)]
IO buffer allocation cleanup

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoAdd zero_buffers option
Jens Axboe [Tue, 17 Apr 2007 13:46:32 +0000 (15:46 +0200)]
Add zero_buffers option

This option will cause all IO buffers to be initialized to all zeroes.
The default is to fill them with random data.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoReduntant write bit checks
Jens Axboe [Tue, 17 Apr 2007 13:37:47 +0000 (15:37 +0200)]
Reduntant write bit checks

No point in checking for td_rw(td) || td_write(), since td_write()
will also be true for td_rw().

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoWe do need to send a SIGQUIT to a process/thread, even if it is running
Jens Axboe [Tue, 17 Apr 2007 11:42:47 +0000 (13:42 +0200)]
We do need to send a SIGQUIT to a process/thread, even if it is running

It could be stuck in a syscall, and not abort on its own.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoLog and dump short ios
Jens Axboe [Tue, 17 Apr 2007 11:31:34 +0000 (13:31 +0200)]
Log and dump short ios

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoIf writing to stdout, move stat output to stderr
Jens Axboe [Tue, 17 Apr 2007 11:27:32 +0000 (13:27 +0200)]
If writing to stdout, move stat output to stderr

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoBetter checks for disk util init
Jens Axboe [Tue, 17 Apr 2007 07:06:43 +0000 (09:06 +0200)]
Better checks for disk util init

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoNo need to check for type before doing fsync()
Jens Axboe [Tue, 17 Apr 2007 07:05:10 +0000 (09:05 +0200)]
No need to check for type before doing fsync()

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoAdd support for using '-' as filename for stdin/stdout
Jens Axboe [Mon, 16 Apr 2007 19:54:24 +0000 (21:54 +0200)]
Add support for using '-' as filename for stdin/stdout

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix problem with f->last_completed_pos not being correct on requeues
Jens Axboe [Mon, 16 Apr 2007 19:39:33 +0000 (21:39 +0200)]
Fix problem with f->last_completed_pos not being correct on requeues

This causes an unnecessary seek. Usually this is just noise, but if
the device isn't seekable, it becomes a real problem.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoAdd check for pipe/fifo files
Jens Axboe [Mon, 16 Apr 2007 18:42:33 +0000 (20:42 +0200)]
Add check for pipe/fifo files

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoWarn more gently if the kernel is too old for io scheduler switching
Jens Axboe [Mon, 16 Apr 2007 10:56:00 +0000 (12:56 +0200)]
Warn more gently if the kernel is too old for io scheduler switching

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFio 1.15.2 fio-1.15.2
Jens Axboe [Mon, 16 Apr 2007 07:48:53 +0000 (09:48 +0200)]
Fio 1.15.2

Fixes:

- Segfault on stonewall option issues
- Disk utilization on raw devices on Linux
- Parsing fixes (blank at front/end, comments)
- --showcmd option, turning a job file into a command line
- Update to work with newest GUASI
- File creation problem.
- disk-less IO engine init clean

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoPut the ->real_file_size handling into fio
Jens Axboe [Thu, 12 Apr 2007 11:02:38 +0000 (13:02 +0200)]
Put the ->real_file_size handling into fio

Then we can remove it from the io engines, where the disk-less IO
engines provided a ->setup() hook just to set that.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoA ->close_file() operation isn't strictly needed
Jens Axboe [Thu, 12 Apr 2007 10:57:27 +0000 (12:57 +0200)]
A ->close_file() operation isn't strictly needed

So be sure to check the pointer before calling it.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFor non-file engines, set ->real_file_size if total size is known
Jens Axboe [Wed, 11 Apr 2007 19:20:03 +0000 (21:20 +0200)]
For non-file engines, set ->real_file_size if total size is known

Fixes a segfault with rand* directions.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix bug with stonewall option causing segfault
gurudas pai [Wed, 11 Apr 2007 10:44:27 +0000 (12:44 +0200)]
Fix bug with stonewall option causing segfault

fio core dumped , with stonewall,

[global]
ioengine=libaio
direct=1
bs=8k
iodepth=1024
iodepth_batch=60
randrepeat=1
size=1024m
directory=/home/oracle
[job1]
rw=randread
filename=file1
[job2]
rw=randwrite
filename=file1

stonewall

[job3]
rw=randread
filename=file1
[job4]
rw=randwrite
filename=file1

 >fio myjob
job1: (g=0): rw=randread, bs=8K-8K/8K-8K, ioengine=libaio, iodepth=1024
job2: (g=1): rw=randwrite, bs=8K-8K/8K-8K, ioengine=libaio, iodepth=1024
job3: (g=1): rw=randread, bs=8K-8K/8K-8K, ioengine=libaio, iodepth=1024
job4: (g=1): rw=randwrite, bs=8K-8K/8K-8K, ioengine=libaio, iodepth=1024
Starting 4 processes
Quit (core dumped)PP] [99.3% done] [  1298/     0 kb/s] [eta 00m:03s]

(gdb) bt
t_rate=0xfeeee790, m_rate=0xfeeee794) at fio.c:1011

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix problem with treating ENOENT as an error
Jens Axboe [Wed, 11 Apr 2007 10:43:35 +0000 (12:43 +0200)]
Fix problem with treating ENOENT as an error

It's just a zero-sized file, as far as get_file_sizes() is concerned.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoGUASI API change
Davide Libenzi [Tue, 10 Apr 2007 20:29:29 +0000 (22:29 +0200)]
GUASI API change

There's been an API change in the latest GUASI library, and this fixes it
inside FIO.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoAdd a '--showcmd' option for dumping a job file
Jens Axboe [Wed, 4 Apr 2007 09:09:19 +0000 (11:09 +0200)]
Add a '--showcmd' option for dumping a job file

It effectively shows what the equivelant command line string would be.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoLet parse_options() decide on when parsing failed
Jens Axboe [Wed, 4 Apr 2007 09:04:34 +0000 (11:04 +0200)]
Let parse_options() decide on when parsing failed

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoHave strip_blank_end() also strip off any comments
Jens Axboe [Wed, 4 Apr 2007 09:04:06 +0000 (11:04 +0200)]
Have strip_blank_end() also strip off any comments

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix sysfs_root assignment with multiple identical devices
Jens Axboe [Tue, 3 Apr 2007 23:33:04 +0000 (16:33 -0700)]
Fix sysfs_root assignment with multiple identical devices

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoMove os/arch/compiler headers into directories
Jens Axboe [Mon, 2 Apr 2007 19:36:44 +0000 (21:36 +0200)]
Move os/arch/compiler headers into directories

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoSeperate disk util code out of fio.c
Jens Axboe [Mon, 2 Apr 2007 13:08:01 +0000 (15:08 +0200)]
Seperate disk util code out of fio.c

It's only used if FIO_HAVE_DISK_UTIL is set.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix disk utilization and ioscheduler switch on raw devices
Jens Axboe [Mon, 2 Apr 2007 12:46:07 +0000 (14:46 +0200)]
Fix disk utilization and ioscheduler switch on raw devices

Add a method for mapping a raw device to the real block device,
so our sysfs lookup stuff works as expected.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFio 1.15.1 fio-1.15.1
Jens Axboe [Mon, 2 Apr 2007 09:11:34 +0000 (11:11 +0200)]
Fio 1.15.1

Minor bug fixes, do a maintenance release.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agosg engine: fix old comment
Jens Axboe [Mon, 2 Apr 2007 09:04:47 +0000 (11:04 +0200)]
sg engine: fix old comment

We don't even need to set f to files[0], the loop sets up
the poll appropriately.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agosg engine: do type check only when sd has been setup
Jens Axboe [Mon, 2 Apr 2007 08:51:10 +0000 (10:51 +0200)]
sg engine: do type check only when sd has been setup

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agosg engine: errno return value fixes
Jens Axboe [Mon, 2 Apr 2007 08:42:33 +0000 (10:42 +0200)]
sg engine: errno return value fixes

It was a little all-over-the-place, unify it - return -1 for error,
let the caller look at errno for the specific error.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agosplice engine: return negative for error
Jens Axboe [Mon, 2 Apr 2007 08:36:59 +0000 (10:36 +0200)]
splice engine: return negative for error

Otherwise fio_splice_queue() will think it has handle errno number
of bytes.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoLog and return error in early file open checks
Jens Axboe [Mon, 2 Apr 2007 08:34:18 +0000 (10:34 +0200)]
Log and return error in early file open checks

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoSave a division, if delta is non-zero.
Jens Axboe [Thu, 29 Mar 2007 13:36:29 +0000 (15:36 +0200)]
Save a division, if delta is non-zero.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoUnlink a writeable file, if overwrite isn't set
Jens Axboe [Thu, 29 Mar 2007 12:52:13 +0000 (14:52 +0200)]
Unlink a writeable file, if overwrite isn't set

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoMerge branch 'master' of axboe@router:/data/git/fio
root [Thu, 29 Mar 2007 22:13:10 +0000 (14:13 -0800)]
Merge branch 'master' of axboe@router:/data/git/fio

13 years agoWarn when seeing a job option outside of a job section
Jens Axboe [Thu, 29 Mar 2007 22:12:57 +0000 (14:12 -0800)]
Warn when seeing a job option outside of a job section

Otherwise it's easy to screw up because fio will have ignored
a number of options. This has happened to me with bad pasting
of job files before, missing the starting '[' bracket.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoIncrease latency histogram resolution
Jens Axboe [Thu, 29 Mar 2007 20:55:58 +0000 (12:55 -0800)]
Increase latency histogram resolution

Currently it was at one decimal, but that can cause us to lose
precision. Always ensure to round up for higher entries of they
get rounded to 0.0 for print.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agosyslet engine: fix segfault if syslets are not available
Jens Axboe [Thu, 29 Mar 2007 11:26:17 +0000 (13:26 +0200)]
syslet engine: fix segfault if syslets are not available

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix loop with multiple files
Jens Axboe [Thu, 29 Mar 2007 09:15:06 +0000 (11:15 +0200)]
Fix loop with multiple files

The random lookup would loop infinitely, if no files were
open. So check for that and check for number of files
done.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix memory overflow with > 64 byte options
Jens Axboe [Thu, 29 Mar 2007 09:00:43 +0000 (11:00 +0200)]
Fix memory overflow with > 64 byte options

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoOnly use posix_fallocate(), if we are overwriting
Jens Axboe [Thu, 29 Mar 2007 08:31:51 +0000 (10:31 +0200)]
Only use posix_fallocate(), if we are overwriting

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix parsing of job section with preceeding space
gurudas pai [Thu, 29 Mar 2007 08:10:56 +0000 (10:10 +0200)]
Fix parsing of job section with preceeding space

We need to strip the blank spaces from the front.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agocompiler.h needs to define __must_check if not set
Jens Axboe [Thu, 29 Mar 2007 07:35:35 +0000 (09:35 +0200)]
compiler.h needs to define __must_check if not set

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix typo in previous compiler patch for gcc 3.x
Jens Axboe [Thu, 29 Mar 2007 07:33:46 +0000 (09:33 +0200)]
Fix typo in previous compiler patch for gcc 3.x

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix __must_check compile on older compilers
Jens Axboe [Thu, 29 Mar 2007 07:33:03 +0000 (09:33 +0200)]
Fix __must_check compile on older compilers

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix bug with stripping white space at the front of an option
Jens Axboe [Wed, 28 Mar 2007 17:34:53 +0000 (19:34 +0200)]
Fix bug with stripping white space at the front of an option

After advancing the passed in pointer, the destination never
got set.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFio version 1.15 fio-1.15
Jens Axboe [Wed, 28 Mar 2007 10:14:06 +0000 (12:14 +0200)]
Fio version 1.15

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix typo in the netio example
Jens Axboe [Wed, 28 Mar 2007 09:31:01 +0000 (11:31 +0200)]
Fix typo in the netio example

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix short IO handling for verifies as well
Jens Axboe [Wed, 28 Mar 2007 09:10:09 +0000 (11:10 +0200)]
Fix short IO handling for verifies as well

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoHandle short read at the end of file
Jens Axboe [Wed, 28 Mar 2007 09:07:20 +0000 (11:07 +0200)]
Handle short read at the end of file

Currently we don't issue an io operation if offset + buflen
is larger than the file size, but that means we don't reach
the last bit of a file if the size isn't block size aligned.
Instead handle a short read properly. It actually cleans up
the code as well.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoDon't inherit new_group for sub-jobs
Jens Axboe [Wed, 28 Mar 2007 08:04:08 +0000 (10:04 +0200)]
Don't inherit new_group for sub-jobs

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix size setting on raw devices
Jens Axboe [Wed, 28 Mar 2007 07:57:01 +0000 (09:57 +0200)]
Fix size setting on raw devices

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix infinite loop in get_next_file_rr()
Jens Axboe [Wed, 28 Mar 2007 07:33:43 +0000 (09:33 +0200)]
Fix infinite loop in get_next_file_rr()

We need to clear f to NULL before doing a continue on FIO_FILE_DONE.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoAdd a REPORTING-BUGS file
Jens Axboe [Wed, 28 Mar 2007 07:16:08 +0000 (09:16 +0200)]
Add a REPORTING-BUGS file

Often people forget the fio version, job file, or parameters.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoBetter check for not doing a file twice
Jens Axboe [Tue, 27 Mar 2007 18:34:47 +0000 (20:34 +0200)]
Better check for not doing a file twice

Mark it as done when we close it, so we don't open the same
one again.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix bug with not noticing end of file
Jens Axboe [Tue, 27 Mar 2007 18:21:24 +0000 (20:21 +0200)]
Fix bug with not noticing end of file

We repeatedly re-read the last end of a file, instead of skipping
to a new one. The problem was that the offset got turned into a
block number for comparison, so we would screw up if size % bs.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoPrint number of open files in eta dump
Jens Axboe [Tue, 27 Mar 2007 18:20:36 +0000 (20:20 +0200)]
Print number of open files in eta dump

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoDon't free the string options
Jens Axboe [Tue, 27 Mar 2007 18:06:25 +0000 (20:06 +0200)]
Don't free the string options

We need at least ->name, just leave them all alone.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoUse clear_error() instead of clearing the error manually
Jens Axboe [Tue, 27 Mar 2007 17:50:11 +0000 (19:50 +0200)]
Use clear_error() instead of clearing the error manually

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoAuto limit open files if we get EMFILE
Jens Axboe [Tue, 27 Mar 2007 17:49:31 +0000 (19:49 +0200)]
Auto limit open files if we get EMFILE

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years ago'opendir' fixes
Jens Axboe [Tue, 27 Mar 2007 17:43:53 +0000 (19:43 +0200)]
'opendir' fixes

- Don't dive into a directory if it isn't a directory
- Dump info on how many files added

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoUpdate fio io engine version
Jens Axboe [Tue, 27 Mar 2007 13:57:19 +0000 (15:57 +0200)]
Update fio io engine version

The interface didn't really change, but if the engine is using
->setup() then it needs updating. Generally it just needs to
remove any code other than the part setting ->real_file_size.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoNo need to return an error from get_file_sizes()
Jens Axboe [Tue, 27 Mar 2007 13:56:10 +0000 (15:56 +0200)]
No need to return an error from get_file_sizes()

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoOnly overwrite in layout if needed
Jens Axboe [Tue, 27 Mar 2007 13:52:46 +0000 (15:52 +0200)]
Only overwrite in layout if needed

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoDo the invalidate/advise hinting in td_open_file()
Jens Axboe [Tue, 27 Mar 2007 13:38:21 +0000 (15:38 +0200)]
Do the invalidate/advise hinting in td_open_file()

Then we only do it once per file, not twice.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoRevamp the file creation code
Jens Axboe [Tue, 27 Mar 2007 13:30:28 +0000 (15:30 +0200)]
Revamp the file creation code

This was long overdue, it's much simpler now and hopefully
less bug prone. Probably a few stray bugs here and there
that needs straightening out, but the end result should
be a lot better.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoCleanup generic_file_open()
Jens Axboe [Tue, 27 Mar 2007 11:10:00 +0000 (13:10 +0200)]
Cleanup generic_file_open()

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoDon't completely fail for block device flushing failure
Jens Axboe [Tue, 27 Mar 2007 10:49:56 +0000 (12:49 +0200)]
Don't completely fail for block device flushing failure

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoMake sure to set io size on non-files
Jens Axboe [Tue, 27 Mar 2007 10:45:34 +0000 (12:45 +0200)]
Make sure to set io size on non-files

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoTrim the rbtree stuff fio doesn't use
Jens Axboe [Tue, 27 Mar 2007 09:09:40 +0000 (11:09 +0200)]
Trim the rbtree stuff fio doesn't use

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoRemove kernel headers from rbtree.h
Jens Axboe [Tue, 27 Mar 2007 09:03:28 +0000 (11:03 +0200)]
Remove kernel headers from rbtree.h

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoGUASI engine: should use log_err() during runtime
Jens Axboe [Tue, 27 Mar 2007 09:04:59 +0000 (11:04 +0200)]
GUASI engine: should use log_err() during runtime

stderr may be redirected somewhere else.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoImprove random verify block sorting
Jens Axboe [Tue, 27 Mar 2007 08:59:49 +0000 (10:59 +0200)]
Improve random verify block sorting

Add an option to control it and also check the nosort flag in file
layout to further catch a case where sorting isn't needed.

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