fio.git
11 years agoFio 1.17.2 fio-1.17.2
Jens Axboe [Tue, 30 Oct 2007 14:45:12 +0000 (15:45 +0100)]
Fio 1.17.2

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
11 years agoFix spurious eta output
Aaron Carroll [Fri, 26 Oct 2007 09:10:28 +0000 (11:10 +0200)]
Fix spurious eta output

 - Pad eta output with enough spaces to overwrite remaining characters
   from the end of previous lines;
 - Wrap an overly-long line.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
11 years agoMore cpu engine fixes
Jens Axboe [Thu, 25 Oct 2007 16:44:45 +0000 (18:44 +0200)]
More cpu engine fixes

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
11 years agoMerge branch 'master' of ssh://git.kernel.dk/data/git/fio
Jens Axboe [Thu, 25 Oct 2007 16:34:14 +0000 (18:34 +0200)]
Merge branch 'master' of ssh://git.kernel.dk/data/git/fio

11 years agoFixes for CPU burn engine
Jens Axboe [Thu, 25 Oct 2007 16:34:02 +0000 (18:34 +0200)]
Fixes for CPU burn engine

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
11 years agoAdd pread/pwrite support to sync engine
gurudas pai [Tue, 23 Oct 2007 13:12:30 +0000 (15:12 +0200)]
Add pread/pwrite support to sync engine

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
11 years agofio: build warning fix on gcc-3.4.6-3
gurudas pai [Mon, 22 Oct 2007 20:10:39 +0000 (22:10 +0200)]
fio: build warning fix on  gcc-3.4.6-3

On gcc-3.4.6-3

 >make log.o
gcc -W -Wwrite-strings -Wall -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 -g  -D_FORTIFY_SOURCE=2 -rdynamic  -c -o
log.o log.c
log.c: In function `read_iolog':
log.c:308: warning: int format, fio_ddir arg (arg 3)

Which corresponds to

enum fio_ddir rw;
..
..
if (sscanf(p, "%d,%llu,%u", &rw, &offset, &bytes) != 3) {

Following patch will fix the warning. This was added by commit
21bd2987dc5d82a18af485cd1e7841e94137fc0c

Thanks,
-Guru

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
11 years agosplice: fix fallback from copy vmsplice to nothing
Jens Axboe [Tue, 16 Oct 2007 07:44:47 +0000 (09:44 +0200)]
splice: fix fallback from copy vmsplice to nothing

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
11 years agosplice: fix problem with current mainline kernels
Jens Axboe [Tue, 16 Oct 2007 07:42:40 +0000 (09:42 +0200)]
splice: fix problem with current mainline kernels

splice was updated to work well with the newer vmsplice patches,
where we don't have to copy data at all. But that broke the
regular vmsplice that copies data, which is all the mainline kernel
still support.

Fix that up, so we do appropriate fallbacks. Fixes the problem
reported by gurudas pai <gurudas.pai@oracle.com>

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
11 years agoSet O_NOATIME on open for non-regular files
Jens Axboe [Thu, 11 Oct 2007 19:41:41 +0000 (21:41 +0200)]
Set O_NOATIME on open for non-regular files

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
11 years agofio HOWTO/man fix
gurudas pai [Fri, 5 Oct 2007 11:20:18 +0000 (13:20 +0200)]
fio HOWTO/man fix

If I use ioengine=cpu , fio errors out, I referred HOWTO and man pages,
both  says use "cpu" for cpu load. Looked at the code it should be
ioengine=cpuio.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
11 years agoGet rid of syslet-rw compile warnings on 32-bit
Jens Axboe [Fri, 28 Sep 2007 06:48:52 +0000 (08:48 +0200)]
Get rid of syslet-rw compile warnings on 32-bit

The fixed size API repeatedly warns on the pointer to integer
of different size cast, so sneak an unsigned long conversion in
first. Makes gcc happy and should always be ok.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
11 years agoDon't use seeks on stdin for job file parsing
Jens Axboe [Thu, 27 Sep 2007 08:48:55 +0000 (10:48 +0200)]
Don't use seeks on stdin for job file parsing

The previous commit added the support for reading a job file
from stdin, but this breaks when fio uses fgetpos/fsetpos on
the file handle. So remove the seeking.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
11 years agoAdd support for `-' file to read from stdin
Aaron Carroll [Thu, 27 Sep 2007 07:03:55 +0000 (09:03 +0200)]
Add support for `-' file to read from stdin

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoUpdate syslet-rw to fixed size ABI structures
Zach Brown [Tue, 18 Sep 2007 23:28:48 +0000 (16:28 -0700)]
Update syslet-rw to fixed size ABI structures

The syslet system calls moved to using fixed size members of structures.  This
updates the syslet-rw engine to match.  syslet.h was copied from the kernel and
then uXX was replaced with uintXX_T.  Casts were added to move between integers
and pointers.

Signed-off-by: Zach Brown <zach.brown@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoExec the getpid atom when testing for syslet support
Zach Brown [Wed, 19 Sep 2007 06:42:19 +0000 (08:42 +0200)]
Exec the getpid atom when testing for syslet support

Signed-off-by: Zach Brown <zach.brown@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoInitialize the new_thread_stack so syslet support testing has one
Zach Brown [Wed, 19 Sep 2007 06:42:18 +0000 (08:42 +0200)]
Initialize the new_thread_stack so syslet support testing has one

Signed-off-by: Zach Brown <zach.brown@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoTrivial spelling correction
Zach Brown [Wed, 19 Sep 2007 06:42:17 +0000 (08:42 +0200)]
Trivial spelling correction

Signed-off-by: Zach Brown <zach.brown@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoUpdate syslet system call numbers
Zach Brown [Wed, 19 Sep 2007 06:42:16 +0000 (08:42 +0200)]
Update syslet system call numbers

System calls have been added to mainline while syslets has been pending.

Signed-off-by: Zach Brown <zach.brown@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoGeneral fio.1 improvements
Aaron Carroll [Tue, 18 Sep 2007 06:10:57 +0000 (08:10 +0200)]
General fio.1 improvements

 - Fixed a bunch of typos and formatting errors.

 - Wrapped some overly-long lines.

 - Added a few new default parameter values.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoman 1 fio
Aaron Carroll [Mon, 17 Sep 2007 08:32:59 +0000 (10:32 +0200)]
man 1 fio

I have put together a draft man page for fio.  The contents are from
fio's HOWTO and README documents and edited for brevity and the odd
typo.  The point is not to replace the existing docmentation, but to
serve as a quick reference.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd ETA output control and interactivity check
Aaron Carroll [Fri, 14 Sep 2007 07:49:41 +0000 (09:49 +0200)]
Add ETA output control and interactivity check

 - Real-time ETA display is only printed if output is to a terminal.

 - Accordingly, add --eta=always|never|auto option.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFull readonly check
Jens Axboe [Wed, 12 Sep 2007 11:12:39 +0000 (13:12 +0200)]
Full readonly check

Both in core and in engines. To the extent possible, this should catch
even fio errors.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoExtend --readonly
Jens Axboe [Wed, 12 Sep 2007 06:18:36 +0000 (08:18 +0200)]
Extend --readonly

- Never allow open of a data file with writeable bits sets, and that
  includes extend as well.

- Skip any writes in replay logs (iolog/iolog2/blktrace)

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd --readonly option
Jens Axboe [Tue, 11 Sep 2007 18:02:05 +0000 (20:02 +0200)]
Add --readonly option

Suggested by Valerie Henson. It can be used as an extra safety guard
against accidentically turning on a write setting. See README.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agosplice: update to new vmsplice-to-user interface
Jens Axboe [Fri, 7 Sep 2007 18:36:08 +0000 (20:36 +0200)]
splice: update to new vmsplice-to-user interface

I changed the kernel bits (they aren't merged yet), so update
the fio splice engine to reflect that.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd display of major and minor faults
Jens Axboe [Fri, 7 Sep 2007 18:33:33 +0000 (20:33 +0200)]
Add display of major and minor faults

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoVerify handlers should return Exxx error, not just 1
Jens Axboe [Thu, 6 Sep 2007 14:16:44 +0000 (16:16 +0200)]
Verify handlers should return Exxx error, not just 1

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFix splice engine compile
Jens Axboe [Wed, 5 Sep 2007 16:10:11 +0000 (18:10 +0200)]
Fix splice engine compile

We need to move the splice_unmap_io_u() function.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agosplice engine: add unmapping for vmsplice-to-user
Jens Axboe [Tue, 4 Sep 2007 13:19:59 +0000 (15:19 +0200)]
splice engine: add unmapping for vmsplice-to-user

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd unmap hook that belongs to the IO engines
Jens Axboe [Tue, 4 Sep 2007 13:17:09 +0000 (15:17 +0200)]
Add unmap hook that belongs to the IO engines

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoType in SPLICE_F_UNMAP ifdef
Jens Axboe [Tue, 4 Sep 2007 13:16:39 +0000 (15:16 +0200)]
Type in SPLICE_F_UNMAP ifdef

Should be an ifndef obviously, not ifdef.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFix eta for pure read workload with verify enabled
Jens Axboe [Tue, 4 Sep 2007 10:38:28 +0000 (12:38 +0200)]
Fix eta for pure read workload with verify enabled

Verify doubles the expected IO count, but that is only true if
we are first writing a file and then reading it back to verify.
If the workload running is just reading back data to verify it,
the IO count is already correct.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFio 1.17.1 fio-1.17.1
Jens Axboe [Mon, 3 Sep 2007 08:26:54 +0000 (10:26 +0200)]
Fio 1.17.1

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFix ETA display for iolog replay
Jens Axboe [Mon, 3 Sep 2007 08:09:37 +0000 (10:09 +0200)]
Fix ETA display for iolog replay

Valerie Henson reported (and supplied a patch) to fix the issue with
ETA display not being anywhere near correct when replaying an iolog.
Fix this by ensuring that td->total_io_size is always set correctly.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdjust file layout printf
Jens Axboe [Fri, 24 Aug 2007 08:24:09 +0000 (10:24 +0200)]
Adjust file layout printf

Make it file(s) not files, there may be 1 or many.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoStyle fixup
Jens Axboe [Thu, 23 Aug 2007 07:03:38 +0000 (09:03 +0200)]
Style fixup

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoblktrace: skip notify traces
Jens Axboe [Thu, 23 Aug 2007 07:03:26 +0000 (09:03 +0200)]
blktrace: skip notify traces

Fio will not interpret them correctly, resulting in weird behaviour
(like replaying that seems to hang, but is merely just waiting for a
very long time).

Fixes the issue reported by Joshua Root.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoclat/slat display improvements
Jens Axboe [Thu, 16 Aug 2007 11:07:46 +0000 (13:07 +0200)]
clat/slat display improvements

If the avg and min are small, we'll display in usec. But that can make
the max hard to read, so convert min/max to strings like we do for
other values.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoREADME: correct command line description
Jens Axboe [Wed, 15 Aug 2007 07:32:21 +0000 (09:32 +0200)]
README: correct command line description

You can do anything on the command line, it's not limited.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agosplice: automatically detect whether vmsplice-to-user works
Jens Axboe [Tue, 14 Aug 2007 11:43:05 +0000 (13:43 +0200)]
splice: automatically detect whether vmsplice-to-user works

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFio 1.17 fio-1.17
Jens Axboe [Tue, 14 Aug 2007 08:23:44 +0000 (10:23 +0200)]
Fio 1.17

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAllow upper-case 'X' for hexidecimal in parser
Jens Axboe [Fri, 10 Aug 2007 12:03:20 +0000 (14:03 +0200)]
Allow upper-case 'X' for hexidecimal in parser

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoRemove verify_pattern option, replace with verify=pattern:x
Jens Axboe [Fri, 10 Aug 2007 11:56:08 +0000 (13:56 +0200)]
Remove verify_pattern option, replace with verify=pattern:x

Integrate the pattern verification with the other verify types,
it's much cleaner that way.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoMark do_verify and verify_fatal as booleans
Jens Axboe [Fri, 10 Aug 2007 08:32:14 +0000 (10:32 +0200)]
Mark do_verify and verify_fatal as booleans

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd verify_fatal option
Jens Axboe [Thu, 9 Aug 2007 08:20:54 +0000 (10:20 +0200)]
Add verify_fatal option

Causes fio to exit after a single block verification failure, instead of
checking the remainder as well.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoImprove verify pattern failure logging
Jens Axboe [Thu, 9 Aug 2007 08:16:31 +0000 (10:16 +0200)]
Improve verify pattern failure logging

Show number of bad bits and block offset.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoNote parent option 'verify' for 'do_verify'
Jens Axboe [Thu, 2 Aug 2007 20:21:36 +0000 (22:21 +0200)]
Note parent option 'verify' for 'do_verify'

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years ago[PATCH] Add do_verify option
Shawn Lewis [Thu, 2 Aug 2007 20:19:32 +0000 (22:19 +0200)]
[PATCH] Add do_verify option

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoVerify the pattern we've written
Shawn Lewis [Thu, 2 Aug 2007 20:18:29 +0000 (22:18 +0200)]
Verify the pattern we've written

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years ago[PATCH] Fix memswp. Its scratch space was too small
Shawn Lewis [Thu, 2 Aug 2007 20:17:52 +0000 (22:17 +0200)]
[PATCH] Fix memswp. Its scratch space was too small

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years ago[PATCH] Add verify_meta verification type
Shawn Lewis [Thu, 2 Aug 2007 19:05:58 +0000 (21:05 +0200)]
[PATCH] Add verify_meta verification type

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoMore option help updates
Jens Axboe [Tue, 31 Jul 2007 21:12:16 +0000 (23:12 +0200)]
More option help updates

Rearrange some of the entries, and add more parent <-> child links.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoBe a little more clever in finding child options
Jens Axboe [Tue, 31 Jul 2007 21:06:09 +0000 (23:06 +0200)]
Be a little more clever in finding child options

We don't need ->parent_seen, just start from the next option.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoParent options didn't recurse properly
Jens Axboe [Tue, 31 Jul 2007 20:56:53 +0000 (22:56 +0200)]
Parent options didn't recurse properly

It only displayed the first found. Add a ->parent_seen and
find all matches.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd parent option to 'verifysort'
Jens Axboe [Tue, 31 Jul 2007 20:51:47 +0000 (22:51 +0200)]
Add parent option to 'verifysort'

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd parent link to options
Jens Axboe [Tue, 31 Jul 2007 14:14:34 +0000 (16:14 +0200)]
Add parent link to options

Then we can nest display for --cmdhelp=all, to tie options
together.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoUpdate non-linux Makefiles
Jens Axboe [Mon, 30 Jul 2007 10:29:37 +0000 (12:29 +0200)]
Update non-linux Makefiles

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoMove checksumming files to seperate directory
Jens Axboe [Mon, 30 Jul 2007 10:27:58 +0000 (12:27 +0200)]
Move checksumming files to seperate directory

Too many of them now, move them out-of-sight. They will rarely
be modified anyway.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoSeperate verify_header from the checksum type
Jens Axboe [Mon, 30 Jul 2007 10:23:05 +0000 (12:23 +0200)]
Seperate verify_header from the checksum type

If using one of the leaner checksums, we potentially have almost
128 more bytes of real data in a block.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoPrepare for splitting the verify_header from the checksum header
Jens Axboe [Mon, 30 Jul 2007 10:08:14 +0000 (12:08 +0200)]
Prepare for splitting the verify_header from the checksum header

Some of the checksums carry a lot of data. We unionize the checksum
header right now inside the verify header, causing a lot of wasted
space for the leaner variants.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd sha256 and sha512 checksums
Jens Axboe [Mon, 30 Jul 2007 08:59:33 +0000 (10:59 +0200)]
Add sha256 and sha512 checksums

That should suffice...

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoProperly initialize md5 hash seed
Jens Axboe [Mon, 30 Jul 2007 08:18:06 +0000 (10:18 +0200)]
Properly initialize md5 hash seed

We started from 0, that's not entirely correct.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoRemove .maxval from verify_pattern
Jens Axboe [Mon, 30 Jul 2007 07:50:13 +0000 (09:50 +0200)]
Remove .maxval from verify_pattern

Let the parser handle it.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd verify_pattern option
Jens Axboe [Mon, 30 Jul 2007 07:33:12 +0000 (09:33 +0200)]
Add verify_pattern option

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoDocument parser int taking hex input
Jens Axboe [Mon, 30 Jul 2007 07:08:01 +0000 (09:08 +0200)]
Document parser int taking hex input

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoParser: make check_int() accept hex input if prefixed with 0x
Jens Axboe [Mon, 30 Jul 2007 07:07:04 +0000 (09:07 +0200)]
Parser: make check_int() accept hex input if prefixed with 0x

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoRename header_offset and header_interval options
Jens Axboe [Mon, 30 Jul 2007 06:53:27 +0000 (08:53 +0200)]
Rename header_offset and header_interval options

Header doesn't really express that this has to do with io verification.
So rename the options to verify_offset and verify_interval.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFix bug in md5 calculation
Jens Axboe [Sun, 29 Jul 2007 18:59:01 +0000 (20:59 +0200)]
Fix bug in md5 calculation

Commit 8c432325c3df2075a77b27eab8a87704cf7b48ee introduced a bug for
smaller sizes. Just basically revert the optimization, safer to stay
with a 'reference' implementation than skip a memset.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFix md5 verify
Jens Axboe [Sun, 29 Jul 2007 06:49:16 +0000 (08:49 +0200)]
Fix md5 verify

The header_interval/offset changes introduced a bug, doing sizeof
on a pointer where it should have been the array. So we didn't compare
the full md5, just the first sizeof(pointer) bytes.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFix header_interval minimum value
Jens Axboe [Sat, 28 Jul 2007 19:30:31 +0000 (21:30 +0200)]
Fix header_interval minimum value

It doesn't make sense to have a value of header size or less, since
then there's no room for actual data. Fio even crashes with a value
less than the header size.

Lets just make the minimum twice the header size, seems reasonable...

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAbstract out the data offset calculation
Jens Axboe [Sat, 28 Jul 2007 19:22:03 +0000 (21:22 +0200)]
Abstract out the data offset calculation

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoCleanup verify pointer casting
Jens Axboe [Sat, 28 Jul 2007 19:17:50 +0000 (21:17 +0200)]
Cleanup verify pointer casting

Just make 'p' void *, like io_u->buf.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years ago[PATCH] Offset verification header by a user-specified distance
Shawn Lewis [Sat, 28 Jul 2007 19:11:37 +0000 (21:11 +0200)]
[PATCH] Offset verification header by a user-specified distance

Offset verification header by user specified distance.

 - Implementation is somewhat simple and probably not ideal but it works. The
   header is just swapped with the bytes at offset after the chunk has been
   filled during populate. Everything is swapped back before verify.

 - Also fixes a bug where we were relying on a moving pointer for increment
   size in populate_verify_io_u (which was working until this patch).

 - Also cleans up a couple smalls things from the header_interval patch.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years ago[PATCH] Allow verification to be done at finer granularity
Shawn Lewis [Sat, 28 Jul 2007 19:10:37 +0000 (21:10 +0200)]
[PATCH] Allow verification to be done at finer granularity

Allow verification to be done at a finer granularity than blocksize.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years ago[PATCH] Fix file_size_high
ljzhang,Yaxin Hu,Jianchao Tang [Fri, 27 Jul 2007 13:54:10 +0000 (15:54 +0200)]
[PATCH] Fix file_size_high

It is generating a size between

[file_size_low, file_size_low+file_size_high]

where it should be

[file_size_low, file_size_high].

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoShow md5 as first verify function
Jens Axboe [Fri, 27 Jul 2007 13:42:00 +0000 (15:42 +0200)]
Show md5 as first verify function

It's probably the best/fastest choice.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd crc7 and crc64 to HOWTO
Jens Axboe [Fri, 27 Jul 2007 13:36:02 +0000 (15:36 +0200)]
Add crc7 and crc64 to HOWTO

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd sample crc64 checksum
Jens Axboe [Fri, 27 Jul 2007 13:35:06 +0000 (15:35 +0200)]
Add sample crc64 checksum

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years ago[PATCH] Fix fileoffset option
ljzhang,Yaxin Hu,Jianchao Tang [Fri, 27 Jul 2007 11:28:26 +0000 (13:28 +0200)]
[PATCH] Fix fileoffset option

1. The job file we prepared:
----------offset-----------------
[global]
filename=./temp/HOWTO
nrfiles=1
rw=read
size=8K
offset=16k
bs=1k
thread
loops=10
[offset]
description="Option 'offset' doesn't work."
---------------------------------
Besides, we copied the file HOWTO to the directory ./temp/.
So we thought fio would read 8K text sequentially from the point 16K off
the beginning of HOWTO.

we run fio with gdb to see what was read out after the first io, and we
got this:
---------------------------------
... ...
(gdb) bt
from /lib/tls/i686/cmov/libpthread.so.0
(gdb) x/4w io_u->xfer_buf
0x8073f08:      0x6c626154      0x666f2065      0x6e6f6320
0x746e6574
(gdb)
---------------------------------
The above was performed after the first io finished by td_io_queue.
The contents read out as we can see was the ASCII codes for 'Table of
content', which was right from the beginning of file HOWTO.
That means fio read from the beginning but not the point 16K off the
beginning.Is that right?

2. Reason for the problem:
It seems the offset is saved in td->o.start_offset. But it isn't passed
to  f->file_offset.And the setting up of f->io_size doesn't refer to
f->file_offset.

--------------------------------------------------------

And now we can check it with gdb:
--------------------------------------------------------
... ...
(gdb) bt
from /lib/tls/i686/cmov/libpthread.so.0
(gdb) x/4w io_u->xfer_buf
0x8073f08:      0x206b636f      0x7420666f      0x66206568
0x20656c69
(gdb)
---------------------------------------------------------
After the first io, I got '0x206b636f 0x7420666f 0x66206568 0x20656c69'
read out.And they represent the string 'ock of the file '.Then i search
the string in HOWTO and got only one line containing the string:
'norandommap Normally fio will cover every block of the file when doing'
I removed the text following that line in HOWTO, and then I found that
the size of the rest text in HOWTO was 16K, which equaled to the offset
we set in job file.
So I think the option 'offset' does work after the changes.

In fact, I am not sure of the fix, but i do hope it can help.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years ago[PATCH] Fix size given larger than filesize given
ljzhang,Yaxin Hu,Jianchao Tang [Fri, 27 Jul 2007 11:21:28 +0000 (13:21 +0200)]
[PATCH] Fix size given larger than filesize given

1. The mission is defined like this:
----------filesize----------------
[global]
directory=./temp
nrfiles=2
rw=randread
filesize=32k
size=96k
thread
[filesize]
description="Filesize less than size."
----------------------------------

This job file caused another non-stop thread, which was asked to read
96K but only provided two files of 32K each. The running information
kept looking like this:
---------------------------------
nonggia@nonggia-desktop:~/fio$ fio --version
fio 1.16.9
nonggia@nonggia-desktop:~/fio$ fio filesize
filesize: (g=0): rw=randread, bs=4K-4K/4K-4K, ioengine=sync, iodepth=1
Starting 1 thread
Jobs: 1 (f=2): [r] [66.7% done] [     0/     0 kb/s] [eta 00m:51s]
---------------------------------

2. The reason:
After having covered both the two files, the thread still had 32K to
issued, while there were already no available files on hand.
I agree that it is far from a bug.Maybe it was the job file that we
should blame. It was wrong written from the beginning.But why not make
it more gentle if we can?

3. Fix suggestion:
So what about change it like this?
Just limit the max td->o.size with the total_size that all the files can
provide.
---------------------------------
diff -Nraup fio-7.25/filesetup.c fio-7.25-filesize/filesetup.c
--- fio-7.25/filesetup.c 2007-07-25 14:25:05.000000000 +0800
+++ fio-7.25-filesize/filesetup.c 2007-07-27 14:17:39.000000000 +0800
@@ -414,7 +414,7 @@ int setup_files(struct thread_data *td)
}
}

- if (!td->o.size)
+ if (!td->o.size || td->o.size > total_size)
td->o.size = total_size;

/*
---------------------------------

Now it behaves like this, just finishes as much job as it can and comes
to the end:
---------------------------------
nonggia@nonggia-desktop:~/fio$ ./filesize_fio filesize
filesize: (g=0): rw=randread, bs=4K-4K/4K-4K, ioengine=sync, iodepth=1
Starting 1 thread

filesize: (groupid=0, jobs=1): err= 0: pid=8045
  Description  : ["Filesize less than size."]
  read : io=64KiB, bw=32768KiB/s, iops=8000, runt=     2msec
    clat (usec): min=   72, max=  907, avg=167.56, stdev=210.90
  cpu          : usr=0.00%, sys=0.00%, ctx=1
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%,
>=64=0.0%
     issued r/w: total=16/0, short=0/0
     lat (usec): 100=62.50%, 250=25.00%, 500=6.25%, 1000=6.25%

Run status group 0 (all jobs):
   READ: io=64KiB, aggrb=32768KiB/s, minb=32768KiB/s, maxb=32768KiB/s,
mint=2msec, maxt=2msec

Disk stats (read/write):
  sda: ios=16/0, merge=0/0, ticks=0/0, in_queue=0, util=0.00%
nonggia@nonggia-desktop:~/fio$
---------------------------------

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoSpeed up md5 hash filling/verifying by 20%
Jens Axboe [Fri, 27 Jul 2007 11:16:24 +0000 (13:16 +0200)]
Speed up md5 hash filling/verifying by 20%

Get rid of the on-stack hash copies, hash directly into the buffer.
We need to 'fix' md5 to just initially clear a/b/c/d in md5_update().
Tested, works, generates same checksums.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoClean up verify_io_u()
Jens Axboe [Fri, 27 Jul 2007 10:59:25 +0000 (12:59 +0200)]
Clean up verify_io_u()

Use a switch statement, like in the pre-io filler.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoSpeed up verify fill
Jens Axboe [Fri, 27 Jul 2007 10:57:25 +0000 (12:57 +0200)]
Speed up verify fill

It's silly to fill an on-stack header, and then copy it to the io_u.
Just map the pointer to the buffer start.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoType in crc16 verify failure
Jens Axboe [Fri, 27 Jul 2007 07:53:14 +0000 (09:53 +0200)]
Type in crc16 verify failure

Should dump crc16, not crc32.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd crc7 verify type
Jens Axboe [Fri, 27 Jul 2007 07:52:40 +0000 (09:52 +0200)]
Add crc7 verify type

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd crc16 verify type
Jens Axboe [Fri, 27 Jul 2007 07:07:17 +0000 (09:07 +0200)]
Add crc16 verify type

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years ago[PATCH] Only verify_io_u on reads
Shawn Lewis [Fri, 27 Jul 2007 06:02:45 +0000 (08:02 +0200)]
[PATCH] Only verify_io_u on reads

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd data integrity example to netio sample job file
Jens Axboe [Thu, 26 Jul 2007 11:19:57 +0000 (13:19 +0200)]
Add data integrity example to netio sample job file

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoMissed FIO_UNIDIR io ops flags on net engine
Jens Axboe [Thu, 26 Jul 2007 11:13:49 +0000 (13:13 +0200)]
Missed FIO_UNIDIR io ops flags on net engine

Inadvertenly only set it on the netsplice engine, not net.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoIO verification improvements
Jens Axboe [Thu, 26 Jul 2007 10:22:30 +0000 (12:22 +0200)]
IO verification improvements

- Add a FIO_UNIDIR io ops flag. This like networked IO can't be read/write,
  so verify only makes sense for data summed by another writer.
- Allow a read workload to verify previously written data.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFix verify random bytes filling
Jens Axboe [Thu, 26 Jul 2007 09:55:10 +0000 (11:55 +0200)]
Fix verify random bytes filling

Shawn Lewis <shawnlewis@google.com> reports:

---

verify.c: fill_random_bytes() doesn't work as intended.

drand48 on linux returns a double whose value is evenly distributed between
0.0 and 0.1. This is not the same as having an 8-byte value where each bit
has the same chance of being 0 as it does of being 1.

I'd fix this but it should probably be done in a cross-platformish way and
I'm not quite sure how to do it. Maybe just use smaller randoms? Have an
os_random_uint32?

---

I just got rid of os_random_double() and used os_random_long(),
truncating that to an unsigned integer.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years ago[PATCH] empty result
ljzhang,Yaxin Hu,Jianchao Tang [Thu, 26 Jul 2007 09:00:29 +0000 (11:00 +0200)]
[PATCH] empty result

1. The job file looks like this:
---------runtime------------
[global]
directory=./temp
nrfiles=1
rw=randread
size=32k
thread
[runtime]
description="Too tiny a mission using less than 1sec."
----------------------------

Most of the time,it seems like no io has been performed:
----------------------------
nonggia@nonggia-desktop:~/fio$ fio runtime
runtime: (g=0): rw=randread, bs=4K-4K/4K-4K, ioengine=sync, iodepth=1
Starting 1 thread

runtime: (groupid=0, jobs=1): err= 0: pid=7155
  Description  : ["Too tiny a mission using less than 1sec."]
  cpu          : usr=0.00%, sys=0.00%, ctx=1
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%,
>=64=0.0%
     issued r/w: total=8/0, short=0/0
     lat (usec): 100=87.50%, 250=12.50%

Run status group 0 (all jobs):

Disk stats (read/write):
  sda: ios=8/0, merge=0/0, ticks=0/0, in_queue=0, util=0.00%
nonggia@nonggia-desktop:~/fio$
----------------------------

2. Reason for the problem:
It is so tiny a job that it may cost less than one second to finish.And
the runtime is rounded down to 0.Just like the io never happened.
We agree that the problem is really trifle, but for testing purpose, we
think it maybe while the fixing.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years ago[PATCH] non-stop thread
ljzhang,Yaxin Hu,Jianchao Tang [Thu, 26 Jul 2007 08:59:25 +0000 (10:59 +0200)]
[PATCH] non-stop thread

1. The job file causing the problem:
-------------------rw-------------------
[global]
directory=./temp
nrfiles=1
rw=randread:8
norandommap
size=32k
bs=2k
thread
[rw]
description="Offset over real file size."
-----------------------------------------

The job file can keep fio running with the eta increasing and the
progress pausing like this:
----------------------------------------
rw: (g=0): rw=randread, bs=2K-2K/2K-2K, ioengine=sync, iodepth=1
Starting 1 thread
Jobs: 1 (f=1): [r] [92.3% done] [     0/     0 kb/s] [eta 00m:01s]]

----------------------------------------

If we force it to stop, it prints like this:
--------------------------------------------
fio: terminating on signal 2

rw: (groupid=0, jobs=1): err= 0: pid=6124
  Description  : ["Offset over real file size."]
  read : io=28KiB, bw=0KiB/s, iops=0, runt= 61900msec
    clat (usec): min=    5, max=  436, avg=87.79, stdev=123.71
  cpu          : usr=2.01%, sys=93.48%, ctx=13644
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%,
>=64=0.0%
     issued r/w: total=14/0, short=0/0
     lat (usec): 10=42.86%, 100=35.71%, 250=7.14%, 500=14.29%

Run status group 0 (all jobs):
   READ: io=28KiB, aggrb=0KiB/s, minb=0KiB/s, maxb=0KiB/s,
mint=61900msec, maxt=61900msec

Disk stats (read/write):
  sda: ios=8/45, merge=0/40, ticks=4/368, in_queue=372, util=0.27%
--------------------------------------------
>From above we can see an uncompleted job with a io 28KiB less than what
is specified by 'size'.

2. Reason for problem:
After looking into the source codes,We guess the problem comes from the
function get_next_offset().If the io reaches the end of the file, the
function fails, and the file will be marked as DONE.We wonder if that is
the planned behavior.Isn't it very common to reach the file's end when
doing a random io?

3. Fix suggestion:
Here is the patch:
-----------------------------------------------------
diff -Nraup fio-7.25/io_u.c fio-7.25-rw/io_u.c
--- fio-7.25/io_u.c     2007-07-25 14:25:05.000000000 +0800
+++ fio-7.25-rw/io_u.c 2007-07-26 09:55:22.000000000 +0800
@@ -162,10 +162,12 @@ static int get_next_offset(struct thread
if (get_next_rand_offset(td, f, ddir, &b))
return 1;
} else {
- if (f->last_pos >= f->real_file_size)
- return 1;
-
- b = f->last_pos / td->o.min_bs[ddir];
+ if (f->last_pos >= f->real_file_size) {
+ if (!td_random(td) || get_next_rand_offset(td, f, ddir, &b))
+ return 1;
+ } else {
+ b = f->last_pos / td->o.min_bs[ddir];
+ }
}

io_u->offset = (b * td->o.min_bs[ddir]) + f->file_offset;
------------------------------------------------------

After applying that, we got the job file run to the end normally:
-------------------------------------------------------
nonggia@nonggia-desktop:~/fio$ ./rw_fio rw
rw: (g=0): rw=randread, bs=2K-2K/2K-2K, ioengine=sync, iodepth=1
Starting 1 thread

rw: (groupid=0, jobs=1): err= 0: pid=6519
  Description  : ["Offset over real file size."]
  read : io=32KiB, bw=1560KiB/s, iops=761, runt=    21msec
    clat (usec): min=    5, max=14251, avg=1293.50, stdev=3510.37
  cpu          : usr=0.00%, sys=19.05%, ctx=7
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%,
>=64=0.0%
     issued r/w: total=16/0, short=0/0
     lat (usec): 10=37.50%, 20=12.50%, 250=12.50%, 750=6.25%, 1000=6.25%
     lat (msec): 2=18.75%, 20=6.25%

Run status group 0 (all jobs):
   READ: io=32KiB, aggrb=1560KiB/s, minb=1560KiB/s, maxb=1560KiB/s,
mint=21msec, maxt=21msec

Disk stats (read/write):
  sda: ios=8/0, merge=0/0, ticks=20/0, in_queue=20, util=13.89%
-------------------------------------------------------

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years ago[PATCH] Random map block coverage
ljzhang,Yaxin Hu,Jianchao Tang [Thu, 26 Jul 2007 08:51:46 +0000 (10:51 +0200)]
[PATCH] Random map block coverage

1. The job file causing the problem:
----------cover-------------------
[global]
directory=./temp
nrfiles=1
rw=randread
size=256K
bsrange=4k-16k
thread
[cover]
description="Not covering every block."
-----------------------------------------

According to HOWTO,the job file will makes fio to cover every block of
the 256k file.But running that, we sometimes got a io gross more than
256k:
----------------------------------------
nonggia@nonggia-desktop:~$ fio --version
fio 1.16.9
nonggia@nonggia-desktop:~/fio$ fio cover
cover: (g=0): rw=randread, bs=4K-16K/4K-4K, ioengine=sync, iodepth=1
Starting 1 thread

cover: (groupid=0, jobs=1): err= 0: pid=6969
  Description  : ["Not covering every block."]
  read : io=264KiB, bw=90112KiB/s, iops=7666, runt=     3msec
    clat (usec): min=   66, max=  438, avg=151.00, stdev=88.90
  cpu          : usr=0.00%, sys=133.33%, ctx=0
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%,
>=64=0.0%
     issued r/w: total=23/0, short=0/0
     lat (usec): 100=34.78%, 250=56.52%, 500=8.70%

Run status group 0 (all jobs):
   READ: io=264KiB, aggrb=90112KiB/s, minb=90112KiB/s, maxb=90112KiB/s,
mint=3msec, maxt=3msec

Disk stats (read/write):
  sda: ios=49/0, merge=0/0, ticks=4/0, in_queue=4, util=2.86%
--------------------------------------------

It seems fio doesn't cover every block.And using gdb we can see it in
detail:
--------------------------------------------
(gdb) where
from /lib/tls/i686/cmov/libpthread.so.0
(gdb) p td->files[0].num_maps
$1 = 2
(gdb) x/2w td->files[0].file_map
0x8073ff0:      0x00000000      0x00000000
(gdb) finish
Run till exit from #0  do_io (td=0xb7bec000) at fio.c:423
thread_main (data=0xb7bec000) at fio.c:875    0 kb/s] [eta 00m:00s]
875                     clear_state = 1;
(gdb) x/2w td->files[0].file_map
0x8073ff0:      0xffffeffd      0x7ce2df47
(gdb) c
Continuing.
[Thread -1212236896 (LWP 7099) exited]

cover: (groupid=0, jobs=1): err= 0: pid=7098
  Description  : ["Not covering every block."]
  read : io=264KiB, bw=7KiB/s, iops=0, runt= 37522msec
    clat (usec): min=   67, max=  347, avg=143.28, stdev=67.59
    bw (KiB/s) : min=    0, max=    0, per=0.00%, avg= 0.00, stdev= 0.00
  cpu          : usr=0.00%, sys=0.01%, ctx=13
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%,
>=64=0.0%
     issued r/w: total=29/0, short=0/0
     lat (usec): 100=31.03%, 250=62.07%, 500=6.90%

Run status group 0 (all jobs):
   READ: io=264KiB, aggrb=7KiB/s, minb=7KiB/s, maxb=7KiB/s,
mint=37522msec, maxt=37522msec

Disk stats (read/write):
  sda: ios=50/23, merge=0/32, ticks=0/160, in_queue=160, util=0.13%

Program exited normally.
--------------------------------------------------

2. Reason for problem:
We think when there is no 'norandommap' in the job file, and no ':int'
appended with 'rw',just like the job file above, fio is meant to use
only the blocks not covered yet.
But it seems in the function mark_random_map(), the condition before
calling random_map_free() will never be satisfied.

3. Fix suggestion:
Here is the patch:
-----------------------------------------------------
diff -Nraup fio-7.25/io_u.c fio-7.25-cover/io_u.c
--- fio-7.25/io_u.c     2007-07-25 14:25:05.000000000 +0800
+++ fio-7.25-cover/io_u.c       2007-07-25 20:43:58.000000000 +0800
@@ -55,7 +55,7 @@ static void mark_random_map(struct threa
                 * If we have a mixed random workload, we may
                 * encounter blocks we already did IO to.
                 */
-               if (!td->o.ddir_nr && !random_map_free(td, f, block))
+               if (td->o.ddir_nr==1 && !random_map_free(td, f, block))
                        break;

                idx = RAND_MAP_IDX(td, f, block);
------------------------------------------------------

After that, we check it with gdb:
----------------------------------------------------
(gdb) where
from /lib/tls/i686/cmov/libpthread.so.0
(gdb) p td->files[0].num_maps
$2 = 2
(gdb) x/2w td->files[0].file_map
0x8073ff0:      0x00000000      0x00000000
(gdb) finish
Run till exit from #0  do_io (td=0xb7c48000) at fio.c:423
thread_main (data=0xb7c48000) at fio.c:875    0 kb/s] [eta 00m:00s]
875                     clear_state = 1;
(gdb) x/2w td->files[0].file_map
0x8073ff0:      0xffffffff      0xffffffff
(gdb) c
Continuing.
[Thread -1212073056 (LWP 7443) exited] 5/     0 kb/s] [eta 00m:00s]

cover: (groupid=0, jobs=1): err= 0: pid=7442
  Description  : ["Not covering every block."]
  read : io=256KiB, bw=5KiB/s, iops=0, runt= 46612msec
    clat (usec): min=   62, max=  522, avg=119.50, stdev=88.07
    bw (KiB/s) : min=    0, max=    0, per=0.00%, avg= 0.00, stdev= 0.00
  cpu          : usr=0.00%, sys=0.01%, ctx=11
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%,
>=64=0.0%
     issued r/w: total=38/0, short=0/0
     lat (usec): 100=55.26%, 250=39.47%, 500=2.63%, 750=2.63%

Run status group 0 (all jobs):
   READ: io=256KiB, aggrb=5KiB/s, minb=5KiB/s, maxb=5KiB/s,
mint=46612msec, maxt=46612msec

Disk stats (read/write):
  sda: ios=64/45, merge=0/62, ticks=8/476, in_queue=484, util=0.19%

Program exited normally.
(gdb)
---------------------------------------------------------
Now we can see the expected '0xffffffff 0xffffffff' and the 'io=256KiB'.
By the way, we tested this both on a 32bit machine and a 64bit one.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFix problem with io_u being beyond EOF
Jens Axboe [Thu, 26 Jul 2007 08:47:51 +0000 (10:47 +0200)]
Fix problem with io_u being beyond EOF

Bug report from "ljzhang,Yaxin Hu,Jianchao Tang" <nonggia@sjtu.edu.cn> :

1. The job file causing the problem:
----------ranmap-------------------
[global]
directory=./temp
nrfiles=1
rw=randread
size=64K
bsrange=1k-32k
thread
[ranmap]
description="Over-bounded in mark_random_map()."
-----------------------------------------

Running the job file, we have a high possibility to get a core dump like
this:
----------------------------------------
nonggia@nonggia-desktop:~/fio$ fio --version
fio 1.16.9
nonggia@nonggia-desktop:~/fio$ fio ranmap
ranmap: (g=0): rw=randread, bs=1K-32K/4K-4K, ioengine=sync, iodepth=1
Starting 1 thread
file:io_u.c:64, assert idx < f->num_maps failed
Segmentation fault (core dumped)
nonggia@nonggia-desktop:~/fio$ gdb fio core.6135
... ...
Core was generated by `fio ranmap'.
Program terminated with signal 11, Segmentation fault.
io_u.c:64
64                      fio_assert(td, idx < f->num_maps);
(gdb) bt
io_u.c:64
io_u.c:348
io_u.c:588
from /lib/tls/i686/cmov/libpthread.so.0
(gdb) p io_u->offset
$1 = 41984
(gdb) p io_u->buflen
$2 = 27648
(gdb) p io_u->file->real_file_size
$3 = 65536

2. Reason for the core dump:
The io_u->offset+io_u->buflen was too large to be map in the map file.
They just produced an idx out of the file_map's range.

The fix I produced made sure that get_next_buflen() doesn't go
beyond the real file size, by shrinking the buflen.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years ago[PATCH] Don't hide pthread_mutex_setpshared in os-linux.h
Shawn Lewis [Thu, 26 Jul 2007 05:36:14 +0000 (07:36 +0200)]
[PATCH] Don't hide pthread_mutex_setpshared in os-linux.h

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFix headers for building with some older libs
Shawn Lewis [Wed, 25 Jul 2007 05:51:58 +0000 (07:51 +0200)]
Fix headers for building with some older libs

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd ->done variable to force exit when we know we are done
Jens Axboe [Mon, 23 Jul 2007 12:36:16 +0000 (14:36 +0200)]
Add ->done variable to force exit when we know we are done

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoOnly do the root warning once per thread
Jens Axboe [Mon, 23 Jul 2007 12:36:00 +0000 (14:36 +0200)]
Only do the root warning once per thread

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