fio.git
12 years agoFix io piece logging to not have O(n) runtime
Jens Axboe [Mon, 26 Mar 2007 07:32:22 +0000 (09:32 +0200)]
Fix io piece logging to not have O(n) runtime

Use an rbtree for that log instead.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoMerge branch 'master' of ssh://router/data/git/fio
Jens Axboe [Fri, 23 Mar 2007 17:31:49 +0000 (18:31 +0100)]
Merge branch 'master' of ssh://router/data/git/fio

12 years agoFree/alloc every FIO_OPT_STR_STORE string
Jens Axboe [Fri, 23 Mar 2007 14:57:56 +0000 (15:57 +0100)]
Free/alloc every FIO_OPT_STR_STORE string

Makes ownership clear, though the freeing is a bit anal.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoMake sure the ->files array is job private
Jens Axboe [Fri, 23 Mar 2007 14:29:45 +0000 (15:29 +0100)]
Make sure the ->files array is job private

Otherwise we introduce differences between threads and processes,
we don't want to do that.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFix file unlinking
Jens Axboe [Fri, 23 Mar 2007 14:20:54 +0000 (15:20 +0100)]
Fix file unlinking

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFix bug with numjobs > 1, directory and filename given
Jens Axboe [Fri, 23 Mar 2007 13:26:23 +0000 (14:26 +0100)]
Fix bug with numjobs > 1, directory and filename given

Reported by gurudas pai <gurudas.pai@oracle.com>

If numjobs > 1, add_job() will append the directory name
several times. Fix this by doing the directory append in
add_file() instead, it cleans up the code as well.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoPrint help info on huge page shmget() returning EINVAL
Jens Axboe [Fri, 23 Mar 2007 07:23:51 +0000 (08:23 +0100)]
Print help info on huge page shmget() returning EINVAL

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoMove the huge page size defines into arch code
Jens Axboe [Fri, 23 Mar 2007 07:23:30 +0000 (08:23 +0100)]
Move the huge page size defines into arch code

It's 2MB on x86-64 by default, and 4MB on x86.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoCleanup get_next_offset()
Jens Axboe [Fri, 23 Mar 2007 07:04:27 +0000 (08:04 +0100)]
Cleanup get_next_offset()

Split into two parts, one for generation a random offset, and one
for just setting a new sequential offset.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd option to disable fadvise() hints
Jens Axboe [Thu, 22 Mar 2007 18:24:09 +0000 (19:24 +0100)]
Add option to disable fadvise() hints

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoLeftover debug printf()
Jens Axboe [Thu, 22 Mar 2007 18:04:24 +0000 (19:04 +0100)]
Leftover debug printf()

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoImprove mixed random append option
Jens Axboe [Thu, 22 Mar 2007 18:01:48 +0000 (19:01 +0100)]
Improve mixed random append option

If we set ->ddir_nr to o.ddir_nr initally, we can remove the double
else in get_next_offset().

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd support for mixing a random IO workload a bit
Jens Axboe [Thu, 22 Mar 2007 17:56:45 +0000 (18:56 +0100)]
Add support for mixing a random IO workload a bit

Now you can append a number to randread/randwrite (and others) to
specify only getting a random offset for every X number of ios.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd few debug statements and limit thread usage.
Davide Libenzi [Thu, 22 Mar 2007 06:43:55 +0000 (07:43 +0100)]
Add few debug statements and limit thread usage.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAvoid "ts" going out of scope.
Davide Libenzi [Thu, 22 Mar 2007 06:43:50 +0000 (07:43 +0100)]
Avoid "ts" going out of scope.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdapth guasi.c to the new FIO strctures, and free the requests.
Davide Libenzi [Thu, 22 Mar 2007 06:43:07 +0000 (07:43 +0100)]
Adapth guasi.c to the new FIO strctures, and free the requests.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoIntroduce EXTFLAGS and EXTLIBS in Makefile.
Davide Libenzi [Thu, 22 Mar 2007 06:42:57 +0000 (07:42 +0100)]
Introduce EXTFLAGS and EXTLIBS in Makefile.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoImprove data direction runtime logging
Jens Axboe [Wed, 21 Mar 2007 13:20:20 +0000 (14:20 +0100)]
Improve data direction runtime logging

If we cut a data direction short, log that time so we don't
account the full runtime.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoImprove rwmix states
Jens Axboe [Wed, 21 Mar 2007 13:05:39 +0000 (14:05 +0100)]
Improve rwmix states

We didn't use to look at the previous bytes done for the
data directions, which skewed the mix for buffered IO.
Fix that up.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoDump actual filename in failure to open
Jens Axboe [Wed, 21 Mar 2007 12:07:54 +0000 (13:07 +0100)]
Dump actual filename in failure to open

Helpful for debugging.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoCatch too large memory allocations that cause size_t to wrap
Jens Axboe [Wed, 21 Mar 2007 09:32:54 +0000 (10:32 +0100)]
Catch too large memory allocations that cause size_t to wrap

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoUpdate to guasi 0.5 diff
Davide Libenzi [Wed, 21 Mar 2007 08:15:13 +0000 (09:15 +0100)]
Update to guasi 0.5 diff

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoMention GUASI in the HOWTO for the ioengine= option
Jens Axboe [Wed, 21 Mar 2007 07:51:56 +0000 (08:51 +0100)]
Mention GUASI in the HOWTO for the ioengine= option

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoExpose guasi IO engine in ioengine=
Jens Axboe [Wed, 21 Mar 2007 07:48:26 +0000 (08:48 +0100)]
Expose guasi IO engine in ioengine=

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoGUASI IO engine
Davide Libenzi [Wed, 21 Mar 2007 07:46:18 +0000 (08:46 +0100)]
GUASI IO engine

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFix divide-by-zero
Jens Axboe [Tue, 20 Mar 2007 13:38:11 +0000 (14:38 +0100)]
Fix divide-by-zero

Another file creation crap out, this really needs a rewrite and
soon.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoWarn if default value is given for string option without value
Jens Axboe [Tue, 20 Mar 2007 13:28:34 +0000 (14:28 +0100)]
Warn if default value is given for string option without value

That would not make sense, as the option would then always be set
and there would be no way to unset it.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years ago'new_group' option
Jens Axboe [Tue, 20 Mar 2007 13:23:26 +0000 (14:23 +0100)]
'new_group' option

By default, jobs in a file are part of the same reporting group
unless seperated by a stone wall or if they define a group by
themselves (numjobs=x is used). Inserting a 'new_group' parameter
in a job description, will mark the start of a new reporting group.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoClear ->file_map after free()
Jens Axboe [Tue, 20 Mar 2007 12:54:53 +0000 (13:54 +0100)]
Clear ->file_map after free()

Just in case...

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoSometimes we allocated too little memory for buffers
Jens Axboe [Tue, 20 Mar 2007 12:53:39 +0000 (13:53 +0100)]
Sometimes we allocated too little memory for buffers

Fix it by adding page_mask to the allocation size, then the
alignment is guarenteed to fit.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoPrint clue to reduce queue depth if engine init fails
Jens Axboe [Tue, 20 Mar 2007 09:47:45 +0000 (10:47 +0100)]
Print clue to reduce queue depth if engine init fails

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agolibaio engine: queue init error handling
Jens Axboe [Tue, 20 Mar 2007 09:42:07 +0000 (10:42 +0100)]
libaio engine: queue init error handling

It fails for repeated large io depths, so make sure we retrieve the
error and log it.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAlways make sure buffer sizes are aligned for allocation
Jens Axboe [Tue, 20 Mar 2007 09:33:11 +0000 (10:33 +0100)]
Always make sure buffer sizes are aligned for allocation

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFile creation fix
Jens Axboe [Tue, 20 Mar 2007 09:11:07 +0000 (10:11 +0100)]
File creation fix

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years ago'dev' is 'stdev' in the print out now
Jens Axboe [Tue, 20 Mar 2007 09:02:06 +0000 (10:02 +0100)]
'dev' is 'stdev' in the print out now

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoMake sure mmaphuge file backed file is the size we need
Jens Axboe [Mon, 19 Mar 2007 13:00:54 +0000 (14:00 +0100)]
Make sure mmaphuge file backed file is the size we need

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoSort option possible value map
Jens Axboe [Mon, 19 Mar 2007 12:15:23 +0000 (13:15 +0100)]
Sort option possible value map

We need to match longest option first, since we have to use
strncmp() to avoid fiddling with postfix options.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoRevert b370e46b370e46... Put longest options first
Jens Axboe [Mon, 19 Mar 2007 12:14:03 +0000 (13:14 +0100)]
Revert b370e46b370e46... Put longest options first

This reverts commit b370e46abdd2bfe764e28efb41c4caadc632b937.

We should not have to do this, and the commit was even buggy since
it mistakenly put mmap inside the mmaphuge ifdef section. Just make
parse sort the posval entries.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoHelpful indication to run as root
Jens Axboe [Mon, 19 Mar 2007 10:36:36 +0000 (11:36 +0100)]
Helpful indication to run as root

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoNo need to use perror() after td_verror()
Jens Axboe [Mon, 19 Mar 2007 10:32:46 +0000 (11:32 +0100)]
No need to use perror() after td_verror()

That'll just result in the error being displayed twice.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoPut longest options first
Jens Axboe [Mon, 19 Mar 2007 09:51:49 +0000 (10:51 +0100)]
Put longest options first

We need to have things like shmhuge before shm, otherwise the parser
will match shm. The parser needs to be fixed, this is just a quick fix.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoWe can't stringify something the parser doesn't handle
Jens Axboe [Mon, 19 Mar 2007 09:50:47 +0000 (10:50 +0100)]
We can't stringify something the parser doesn't handle

The size needs to be written out in full.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoImprove rwmix buffered split
Jens Axboe [Fri, 16 Mar 2007 19:27:27 +0000 (20:27 +0100)]
Improve rwmix buffered split

For buffered IO, the rwmix split can often be grossly unfair
towards reads, because dirtying tons of memory is done much
faster than reading data. Improve the split for such workloads
by not only looking at time.

Note that it'll still be somewhat unfair, there's only so much
we can reliably do. But it's better.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoIf the rate setting is based on IOPS, reflect that in eta output
Jens Axboe [Fri, 16 Mar 2007 09:24:07 +0000 (10:24 +0100)]
If the rate setting is based on IOPS, reflect that in eta output

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoUntangle the file creation mess
Jens Axboe [Thu, 15 Mar 2007 19:49:25 +0000 (20:49 +0100)]
Untangle the file creation mess

Still needs a lot of work, will do a rewrite of this soonish. At
least it should work now.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoCompile error with FIO_USE_TIMEOUT defined
Jens Axboe [Thu, 15 Mar 2007 14:04:43 +0000 (15:04 +0100)]
Compile error with FIO_USE_TIMEOUT defined

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoMove thread options into a seperate structure
Jens Axboe [Thu, 15 Mar 2007 14:01:33 +0000 (15:01 +0100)]
Move thread options into a seperate structure

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd some more options for commands
Jens Axboe [Thu, 15 Mar 2007 13:12:05 +0000 (14:12 +0100)]
Add some more options for commands

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoShow alias in command help
Jens Axboe [Thu, 15 Mar 2007 13:11:38 +0000 (14:11 +0100)]
Show alias in command help

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoStyle cleanup
Jens Axboe [Thu, 15 Mar 2007 13:11:10 +0000 (14:11 +0100)]
Style cleanup

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoCommand help match also on aliases
Jens Axboe [Thu, 15 Mar 2007 13:09:28 +0000 (14:09 +0100)]
Command help match also on aliases

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoMove setup_rate() out of log.c
Jens Axboe [Thu, 15 Mar 2007 11:09:57 +0000 (12:09 +0100)]
Move setup_rate() out of log.c

Dunno why it ended up in there, doesn't make any sense.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoImprove rate accounting
Jens Axboe [Thu, 15 Mar 2007 11:09:39 +0000 (12:09 +0100)]
Improve rate accounting

Don't assume usec_sleep() is extremely precise.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoSupport for setting rated based on IOPS
Jens Axboe [Thu, 15 Mar 2007 10:41:11 +0000 (11:41 +0100)]
Support for setting rated based on IOPS

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoblockdev_invalidate_cache(): return -1 for error
Jens Axboe [Thu, 15 Mar 2007 10:35:33 +0000 (11:35 +0100)]
blockdev_invalidate_cache(): return -1 for error

This follows the normal system calls, and makes fio pickup errno
appropriately.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFailure to put job in add_job() failure case
Jens Axboe [Thu, 15 Mar 2007 10:06:32 +0000 (11:06 +0100)]
Failure to put job in add_job() failure case

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoSplit option handling out of init.c
Jens Axboe [Thu, 15 Mar 2007 09:48:13 +0000 (10:48 +0100)]
Split option handling out of init.c

It grew way too large.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoMore file creation improvements
Jens Axboe [Thu, 15 Mar 2007 08:35:56 +0000 (09:35 +0100)]
More file creation improvements

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoRemember to account for existing files in size setup
Jens Axboe [Thu, 15 Mar 2007 08:33:15 +0000 (09:33 +0100)]
Remember to account for existing files in size setup

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoUse log_info() throughout
Jens Axboe [Thu, 15 Mar 2007 08:22:23 +0000 (09:22 +0100)]
Use log_info() throughout

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agosiint range parsing HOWTO update
Jens Axboe [Thu, 15 Mar 2007 08:15:51 +0000 (09:15 +0100)]
siint range parsing HOWTO update

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAccept '-' as siint delimter as well.
Jens Axboe [Thu, 15 Mar 2007 08:15:12 +0000 (09:15 +0100)]
Accept '-' as siint delimter as well.

Hope this doesn't break any parsing...

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd 'filesize' option
Jens Axboe [Thu, 15 Mar 2007 08:14:47 +0000 (09:14 +0100)]
Add 'filesize' option

Allows the user to define the range of file sizes generated.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFix build on x86-64 distros without __NR_pread64/pwrite64
Jens Axboe [Wed, 14 Mar 2007 19:41:42 +0000 (20:41 +0100)]
Fix build on x86-64 distros without __NR_pread64/pwrite64

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFix build of syslet engine on x86-64
Jens Axboe [Wed, 14 Mar 2007 13:29:16 +0000 (14:29 +0100)]
Fix build of syslet engine on x86-64

Broke on some distros, apparently. Reported by
gurudas pai <gurudas.pai@oracle.com>

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFio 1.14a fio-1.14a
Jens Axboe [Wed, 14 Mar 2007 13:24:11 +0000 (14:24 +0100)]
Fio 1.14a

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFixup new and wrong file name behaviour
Jens Axboe [Wed, 14 Mar 2007 13:23:54 +0000 (14:23 +0100)]
Fixup new and wrong file name behaviour

We used to default to using the jobname as the filename,
if it wasn't a regular existing file. So do that again.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoMerge branch 'master' of ssh://brick.kernel.dk/data/git/fio
Jens Axboe [Wed, 14 Mar 2007 13:15:45 +0000 (14:15 +0100)]
Merge branch 'master' of ssh://brick.kernel.dk/data/git/fio

12 years agoposixaio engine: better handling of partial completions
Jens Axboe [Wed, 14 Mar 2007 13:14:48 +0000 (14:14 +0100)]
posixaio engine: better handling of partial completions

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoDon't free ->files
Jens Axboe [Wed, 14 Mar 2007 12:58:54 +0000 (13:58 +0100)]
Don't free ->files

It may be shared.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoHelp update
Jens Axboe [Wed, 14 Mar 2007 12:28:31 +0000 (13:28 +0100)]
Help update

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd suboption help texts
Jens Axboe [Wed, 14 Mar 2007 12:24:07 +0000 (13:24 +0100)]
Add suboption help texts

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoLeft justify help output
Jens Axboe [Wed, 14 Mar 2007 12:02:53 +0000 (13:02 +0100)]
Left justify help output

The right justification may look prettier, but it's harder
to read and find the option.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFio version 1.14 fio-1.14
Jens Axboe [Wed, 14 Mar 2007 10:37:39 +0000 (11:37 +0100)]
Fio version 1.14

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoNew/old file mix fix
Jens Axboe [Wed, 14 Mar 2007 10:21:27 +0000 (11:21 +0100)]
New/old file mix fix

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoUpdate io engine comments
Jens Axboe [Wed, 14 Mar 2007 09:59:33 +0000 (10:59 +0100)]
Update io engine comments

Some were plain wrong, mainly because they were born through
copying an existing engine.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agommap engine: make sure that page unaligned syncs work
Jens Axboe [Wed, 14 Mar 2007 09:34:47 +0000 (10:34 +0100)]
mmap engine: make sure that page unaligned syncs work

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agorecurse_dir(): Move . and .. check earlier
Jens Axboe [Wed, 14 Mar 2007 08:39:06 +0000 (09:39 +0100)]
recurse_dir(): Move . and .. check earlier

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoBetter handling of file creation vs existing files
Jens Axboe [Wed, 14 Mar 2007 08:16:09 +0000 (09:16 +0100)]
Better handling of file creation vs existing files

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFix for bs shrinkage
Jens Axboe [Wed, 14 Mar 2007 08:15:42 +0000 (09:15 +0100)]
Fix for bs shrinkage

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoWhen opening a new file, check file limit not total number
Jens Axboe [Wed, 14 Mar 2007 07:50:49 +0000 (08:50 +0100)]
When opening a new file, check file limit not total number

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFix double io_u free in error path
Jens Axboe [Tue, 13 Mar 2007 20:50:34 +0000 (21:50 +0100)]
Fix double io_u free in error path

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoPrint informative error when we hit the max number of files open
Jens Axboe [Tue, 13 Mar 2007 20:41:38 +0000 (21:41 +0100)]
Print informative error when we hit the max number of files open

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd 'opendir' option
Jens Axboe [Tue, 13 Mar 2007 14:28:55 +0000 (15:28 +0100)]
Add 'opendir' option

This option adds all files from a directory and downward in the
filesystem hierarchy.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoCheck for open files on io operations
Jens Axboe [Tue, 13 Mar 2007 13:50:28 +0000 (14:50 +0100)]
Check for open files on io operations

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd 'fsync_on_close' option
Jens Axboe [Tue, 13 Mar 2007 13:42:15 +0000 (14:42 +0100)]
Add 'fsync_on_close' option

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoObscure file randommap fix
Jens Axboe [Tue, 13 Mar 2007 13:16:08 +0000 (14:16 +0100)]
Obscure file randommap fix

If file size < block and no size is given, we could be generating
a random offset within -1 and deref ->file_map[] beyond its size.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agonr_files conflict with filename
Jens Axboe [Tue, 13 Mar 2007 13:02:16 +0000 (14:02 +0100)]
nr_files conflict with filename

If nr_files is larger than the given number of files, it has
to be lowered. Assume that if the user gives a set of filenames
that this is the number he wants, otherwise he should use not
use a filename setting.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoTotal file size handling fix
Jens Axboe [Tue, 13 Mar 2007 12:30:40 +0000 (13:30 +0100)]
Total file size handling fix

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoImprove handling of nr_files != open_files
Jens Axboe [Tue, 13 Mar 2007 12:25:18 +0000 (13:25 +0100)]
Improve handling of nr_files != open_files

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoInit stat for all files, not just current range
Jens Axboe [Tue, 13 Mar 2007 11:51:40 +0000 (12:51 +0100)]
Init stat for all files, not just current range

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoMake disk_util() account for all files
Jens Axboe [Tue, 13 Mar 2007 11:28:40 +0000 (12:28 +0100)]
Make disk_util() account for all files

Now we can have files all over the place, so we need to loop
over td->files[] to setup disk util stats.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoNormal vs special files fixups
Jens Axboe [Tue, 13 Mar 2007 10:52:47 +0000 (11:52 +0100)]
Normal vs special files fixups

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoOne more f->file_name typo
Jens Axboe [Tue, 13 Mar 2007 10:25:07 +0000 (11:25 +0100)]
One more f->file_name typo

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agotd->filename vs f->filename typo
Jens Axboe [Tue, 13 Mar 2007 10:22:09 +0000 (11:22 +0100)]
td->filename vs f->filename typo

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoStrip blank end/front of filenames
Jens Axboe [Tue, 13 Mar 2007 10:18:57 +0000 (11:18 +0100)]
Strip blank end/front of filenames

We do this for other options.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoIf we use jobname as file, only append job/file numer for nrfiles > 1
Jens Axboe [Tue, 13 Mar 2007 10:17:07 +0000 (11:17 +0100)]
If we use jobname as file, only append job/file numer for nrfiles > 1

Otherwise we break the abillity to do [/dev/sda] for /dev/sda and
so on.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoDon't stack allocate file name
Jens Axboe [Tue, 13 Mar 2007 10:12:14 +0000 (11:12 +0100)]
Don't stack allocate file name

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd file reference counting
Jens Axboe [Tue, 13 Mar 2007 10:06:45 +0000 (11:06 +0100)]
Add file reference counting

We must not close a file, while io is in progress to it. That
will make the queuing engines barf.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoTurn file ->open and ->unlink into flags
Jens Axboe [Tue, 13 Mar 2007 09:16:34 +0000 (10:16 +0100)]
Turn file ->open and ->unlink into flags

We'll need more flags in the next commits, so do this as a
preparatory patch.

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