890b665611751661aac1030603175bb7bbde34bc |
|
07-May-2014 |
Jens Axboe <axboe@fb.com> |
verify: fix verification of uncompleted or errored ios Stoo Davies reports: ------ I'm doing some powerfail recovery testing on a storage array over iSCSI. Host is RHEL 6.4 kernel 2.6.32-358.el6.x86_64. With fio 2.1.2 -> 2.1.4 the job file below rides through the disks going away, and continues I/O after they come back, without reporting any errors. With fio 2.1.5 -> 2.1.8 when the disks come back fio immediately reports a meta verification error. I captured a trace with an finisar analyzer, and can see that after the disks come back and the host logs back in, a read is issued for an lba which was never written to. Since I don't see verification errors outside of the powerfail testing, I suspect fio isn't correctly handling failed writes during the time the disks are unavailable. ------ The issue is caused by a change between 2.1.4 and 2.1.5 that started logging IO for verification at issue time, instead of at completion time. If the IO only partially completes or completes in error, then we need to adjust the verification unit so that we verify only what fio actually wrote. Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/iolog.c
|
30b18672f5318b7f6de70da6fdc9577737e7a6e6 |
|
11-Apr-2014 |
Jens Axboe <axboe@fb.com> |
iolog: check for thread termination in long delays If we are doing a long delay now, fio won't be able to kill the thread when you ctrl-c the job. Split the delay into .5s intervals, and check for signal in between. Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/iolog.c
|
42793d9467cc45d08ced5211c3797bf68a3d24cc |
|
09-Apr-2014 |
Jens Axboe <axboe@fb.com> |
iolog: skip max_bs[rw] increment for rw == DDIR_INVAL Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/iolog.c
|
2e80228232afc9cf90ad06b360a33a05637978f3 |
|
03-Apr-2014 |
Jens Axboe <axboe@fb.com> |
Use setvbuf() for log writing Check if we have it - if we do, add a 1MB buffer for the file output. This further speeds up the log writing. Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/iolog.c
|
ea5409f9347303aeb8478544662184ac4af49d20 |
|
03-Apr-2014 |
Jens Axboe <axboe@fb.com> |
iolog: invert log_mask bits Get rid of the all-log-mask. Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/iolog.c
|
905e3d4ff8d01a4402186e1ad1f5f1fbbb6b7ef4 |
|
03-Apr-2014 |
Jens Axboe <axboe@fb.com> |
Cleanup the parallellized log writing And move it all to iolog.c, this means we can un-export some of the log functions, too. Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/iolog.c
|
243bfe190245a10e9d0981bf2a7c722edc4c43d4 |
|
02-Apr-2014 |
Jens Axboe <axboe@fb.com> |
iolog: don't serialize the writing of all logs Serialize based on filename, so that independent logs can be written at the same time. If the logs are big, this can take a while to flush to disk. It's silly to have all jobs waiting on each other, when they could write their own logs independently. Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/iolog.c
|
e53cf97beb6c07ea1dedc218058675cc291e9f2a |
|
02-Apr-2014 |
Erwan Velu <erwan.velu@enovance.com> |
iolog: Keep full path for logs files The default behavior of fio was to basename() the log filename preventing relocating it into another directory. This patch simply removes the basename() that doesn't provides any real feature but only limit the usage. Patch tested with genfio with success while relocating to /tmp.
/external/fio/iolog.c
|
5903e7b7907854014478b6febfc5645a203ff59e |
|
26-Feb-2014 |
Jens Axboe <axboe@fb.com> |
blktrace: load improvements - Set the state explicitly to SETTING_UP when loading the traces. This could take a while, so tell the status thread that we are setting up so it knows how to display us correctly. - Fix a bug with multiple devices where we didn't cache the major/minor properly. This made blktrace spend tons of CPU cycles looking up /sys. - Handle multiple devices correctly when adding files. Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/iolog.c
|
bcbfeefa7bce8383cf85fe59ced91f54821dfbd2 |
|
20-Feb-2014 |
Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com> |
fio: add multi directory support This patch adds support for ':' seperated multiple directories at the directory config statement in order to achieve an automatic distribution of job clones (numjob) across directories. That way people can distribute a load across these directories (usually mount points of disks) automatically - changing numjob will be sufficient to get all job clones evenly (optimal if dirs % numjobs = 0, otherwise as good as possible) distributed at all times. To avoid confused users old config Files will behave like they always did, old fio binaries using new config files won't abort but just use the first specified dir. If one specifies an explcit (non generated) filename the distribution to many directories is also deactivated. It also fixes an issue of events seeming out of order like when running with --debug=file seeing the "..." message meaning "I created the clones" prior to the last clone activities. Now the clones are called with index N-1 .. 1, zero being the base thread as before. Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com> Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/iolog.c
|
f940128526dbe468a1951cce10c2fe5dbd23875f |
|
06-Feb-2014 |
Jens Axboe <axboe@fb.com> |
verify: always log IO in the order they are issued We currently log verify_backlog verifies when they complete, which means the sequence of verify and issue might be different. Change this to log in one spot, prior to issue, and track the completion state of the logged unit instead. This unifies the handling of verifies. Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/iolog.c
|
c4b6117b236370b174f3e3d2e299bf8b3733be97 |
|
05-Feb-2014 |
Puthikorn Voravootivat <puthik@chromium.org> |
Fix rand_seed mismatches in verify phase In verify phase, the rand_seed generated on replay does not match the written rand_seed. Multiple problems are causing this: 1. In verify phase fio does not set io_u->rand_seed to compare with hdr->rand_seed 2. In randrw scenario, fio log is stored in red-black tree in "sorted by LBA" order. Thus, it is imposible to replay the written order, or rather generate the seeds again in the same order. 3. In write phase, the code currently will generate rand_seed, write data and log rand_seed. When queuedepth > 1, it's possible the writes complete in a different order than rand_seed was generated. Thus when replaying the log, the generated rand_seed might not match what was written. 4. verify_backlog option will start verification before all the data has been written and it make rand_seed replay code broken with current design. Proposed fixes: 1. Use of existing verify_state to generate verify header. (and assumes this was the original intention of verify_state). And also adds code to replay rand_seed in verify phase. 2. If verifysort option is not enabled, store the write log in a list instead of the red-black tree. Otherwise, don't attempt to verify the rand_seed in the header. 3. In write phase, generate rand_seed, log rand_seed, write data. I.e. log IO transactions in the order generated, not completed. 4. Don't verify rand_seed when verify_backlog is enabled. Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/iolog.c
|
da0a7bd224bb9331f27bb4b20394dd5c8fa3acb0 |
|
17-Sep-2013 |
Juan Casse <jcasse@chromium.org> |
Adds check for numberio during verify phase. Currently, fio checks the block offset number in a block's header during the verify phase. We add a check for the io number (numberio) to detect stale blocks. This check is performed only on workloads that write data, as those workloads know what numberio was written to each block. td->io_issues[ddir] = 0; was removed so that numberio does not get reset at each iteration; we want numberio to keep incrementing to reflect how many times the same data was written. Signed-off-by: Juan Casse <jcasse@chromium.org> Reviewed-by: Grant Grundler <grundler@chromium.org> Fixed typo. Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/iolog.c
|
f01b34ae759afccf39c1bf47972e45d91448e7bb |
|
21-Nov-2013 |
Jens Axboe <axboe@kernel.dk> |
Error out gracefully if we don't find the replay device for log replay It would segfault before because no files got added to replay against. Handle this more gracefully and ensure that fio exits with a non-zero exit status. Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/iolog.c
|
d95b34a61ec3fc305fe53c0132bfe82e2e5fcc04 |
|
21-Nov-2013 |
Jens Axboe <axboe@kernel.dk> |
blktrace: add support for non-native endian format The blktrace format is stored in the native endianness of the machine it is run on. So to reply traces on a machine with a different endianness, we need to swap the trace fields. Detect and do this automatically. Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/iolog.c
|
6a5c4d92ce70a05d2fee981b6f133373c0ef62f8 |
|
20-Feb-2013 |
Jens Axboe <axboe@kernel.dk> |
Merge branch 'master' into gfio Conflicts: configure fio.c init.c Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
033ace1e7965ebf215f6fba2102de5b716ebfede |
|
18-Feb-2013 |
Nikolaus Jeremic <jeremic@informatik.uni-rostock.de> |
Fix replay of IO pattern with multiple open files Nikolaus writes: I've tried to replay I/Os from a textual iolog file to a couple of files using fio 2.0.13 on Linux. However, all I/Os were performed to the last opened file, which is '/mnt/ssd5/rand-write.1.0_1_2' in this example . My jobfile and iolog files contain the following: [global] name=replay_filetraces description=Replay file traces ioengine=libaio iodepth=6 direct=1 continue_on_error=1 [replay] numjobs=1 read_iolog=file_io_patterns unlink=0 fio version 2 iolog /mnt/ssd0/rand-write.1.0_0_0 add /mnt/ssd1/rand-write.1.0_0_1 add /mnt/ssd2/rand-write.1.0_0_2 add /mnt/ssd3/rand-write.1.0_1_0 add /mnt/ssd4/rand-write.1.0_1_1 add /mnt/ssd5/rand-write.1.0_1_2 add /mnt/ssd0/rand-write.1.0_0_0 open /mnt/ssd1/rand-write.1.0_0_1 open /mnt/ssd2/rand-write.1.0_0_2 open /mnt/ssd3/rand-write.1.0_1_0 open /mnt/ssd4/rand-write.1.0_1_1 open /mnt/ssd5/rand-write.1.0_1_2 open /mnt/ssd0/rand-write.1.0_0_0 write 0 65536 /mnt/ssd1/rand-write.1.0_0_1 write 0 65536 /mnt/ssd2/rand-write.1.0_0_2 write 0 65536 /mnt/ssd3/rand-write.1.0_1_0 write 0 65536 /mnt/ssd4/rand-write.1.0_1_1 write 0 65536 /mnt/ssd5/rand-write.1.0_1_2 write 0 65536 /mnt/ssd0/rand-write.1.0_0_0 write 65536 65536 /mnt/ssd1/rand-write.1.0_0_1 write 65536 65536 /mnt/ssd2/rand-write.1.0_0_2 write 65536 65536 /mnt/ssd3/rand-write.1.0_1_0 write 65536 65536 /mnt/ssd4/rand-write.1.0_1_1 write 65536 65536 /mnt/ssd5/rand-write.1.0_1_2 write 65536 65536 /mnt/ssd0/rand-write.1.0_0_0 close /mnt/ssd1/rand-write.1.0_0_1 close /mnt/ssd2/rand-write.1.0_0_2 close /mnt/ssd3/rand-write.1.0_1_0 close /mnt/ssd4/rand-write.1.0_1_1 close /mnt/ssd5/rand-write.1.0_1_2 close I've turned on debugging and added some extra printf in read_iolog2() within iolog.c. file 24594 add file /mnt/ssd0/rand-write.1.0_0_0 file 24594 resize file array to 2 files file 24594 file 0x7fbe03f53090 "/mnt/ssd0/rand-write.1.0_0_0" added at 0 file 24594 add file /mnt/ssd1/rand-write.1.0_0_1 file 24594 file 0x7fbe03f53230 "/mnt/ssd1/rand-write.1.0_0_1" added at 1 file 24594 add file /mnt/ssd2/rand-write.1.0_0_2 file 24594 resize file array to 4 files file 24594 file 0x7fbe03f533d0 "/mnt/ssd2/rand-write.1.0_0_2" added at 2 file 24594 add file /mnt/ssd3/rand-write.1.0_1_0 file 24594 file 0x7fbe03f53570 "/mnt/ssd3/rand-write.1.0_1_0" added at 3 file 24594 add file /mnt/ssd4/rand-write.1.0_1_1 file 24594 resize file array to 6 files file 24594 file 0x7fbe03f53710 "/mnt/ssd4/rand-write.1.0_1_1" added at 4 file 24594 add file /mnt/ssd5/rand-write.1.0_1_2 file 24594 file 0x7fbe03f538b0 "/mnt/ssd5/rand-write.1.0_1_2" added at 5 io 24594 read_iolog2: Making note of file. offset=7310584035475809390 bytes=811544671 fileno=0 file_action=1 fname=/mnt/ssd0/rand-write.1.0_0_0 act=open io 24594 read_iolog2: Making note of file. offset=7310584035475809390 bytes=811544671 fileno=1 file_action=1 fname=/mnt/ssd1/rand-write.1.0_0_1 act=open io 24594 read_iolog2: Making note of file. offset=7310584035475809390 bytes=811544671 fileno=2 file_action=1 fname=/mnt/ssd2/rand-write.1.0_0_2 act=open io 24594 read_iolog2: Making note of file. offset=7310584035475809390 bytes=811544671 fileno=3 file_action=1 fname=/mnt/ssd3/rand-write.1.0_1_0 act=open io 24594 read_iolog2: Making note of file. offset=7310584035475809390 bytes=811544671 fileno=4 file_action=1 fname=/mnt/ssd4/rand-write.1.0_1_1 act=open io 24594 read_iolog2: Making note of file. offset=7310584035475809390 bytes=811544671 fileno=5 file_action=1 fname=/mnt/ssd5/rand-write.1.0_1_2 act=open io 24594 read_iolog2: Making note of file. offset=0 bytes=65536 fileno=5 file_action=1 fname=/mnt/ssd0/rand-write.1.0_0_0 act=write io 24594 read_iolog2: Making note of file. offset=0 bytes=65536 fileno=5 file_action=1 fname=/mnt/ssd1/rand-write.1.0_0_1 act=write io 24594 read_iolog2: Making note of file. offset=0 bytes=65536 fileno=5 file_action=1 fname=/mnt/ssd2/rand-write.1.0_0_2 act=write io 24594 read_iolog2: Making note of file. offset=0 bytes=65536 fileno=5 file_action=1 fname=/mnt/ssd3/rand-write.1.0_1_0 act=write io 24594 read_iolog2: Making note of file. offset=0 bytes=65536 fileno=5 file_action=1 fname=/mnt/ssd4/rand-write.1.0_1_1 act=write io 24594 read_iolog2: Making note of file. offset=0 bytes=65536 fileno=5 file_action=1 fname=/mnt/ssd5/rand-write.1.0_1_2 act=write io 24594 read_iolog2: Making note of file. offset=65536 bytes=65536 fileno=5 file_action=1 fname=/mnt/ssd0/rand-write.1.0_0_0 act=write io 24594 read_iolog2: Making note of file. offset=65536 bytes=65536 fileno=5 file_action=1 fname=/mnt/ssd1/rand-write.1.0_0_1 act=write io 24594 read_iolog2: Making note of file. offset=65536 bytes=65536 fileno=5 file_action=1 fname=/mnt/ssd2/rand-write.1.0_0_2 act=write io 24594 read_iolog2: Making note of file. offset=65536 bytes=65536 fileno=5 file_action=1 fname=/mnt/ssd3/rand-write.1.0_1_0 act=write io 24594 read_iolog2: Making note of file. offset=65536 bytes=65536 fileno=5 file_action=1 fname=/mnt/ssd4/rand-write.1.0_1_1 act=write io 24594 read_iolog2: Making note of file. offset=65536 bytes=65536 fileno=5 file_action=1 fname=/mnt/ssd5/rand-write.1.0_1_2 act=write io 24594 read_iolog2: Making note of file. offset=65536 bytes=65536 fileno=0 file_action=2 fname=/mnt/ssd0/rand-write.1.0_0_0 act=close io 24594 read_iolog2: Making note of file. offset=65536 bytes=65536 fileno=1 file_action=2 fname=/mnt/ssd1/rand-write.1.0_0_1 act=close io 24594 read_iolog2: Making note of file. offset=65536 bytes=65536 fileno=2 file_action=2 fname=/mnt/ssd2/rand-write.1.0_0_2 act=close io 24594 read_iolog2: Making note of file. offset=65536 bytes=65536 fileno=3 file_action=2 fname=/mnt/ssd3/rand-write.1.0_1_0 act=close io 24594 read_iolog2: Making note of file. offset=65536 bytes=65536 fileno=4 file_action=2 fname=/mnt/ssd4/rand-write.1.0_1_1 act=close io 24594 read_iolog2: Making note of file. offset=65536 bytes=65536 fileno=5 file_action=2 fname=/mnt/ssd5/rand-write.1.0_1_2 act=close Taking a look to the debugging output shows that on write action the 'fileno' variable is always set to 5 regardless of the file that should be written. However, for open and close we have a different fileno value for each file. Taking a look into the source code of read_iolog2() reveals why: In case of actions 'open' or 'close', 'fileno' is looked up through 'get_fileno(td, fname)', but for 'write', 'read' and the other 4 argument actions 'fileno' is not looked up. When I add a 'fileno = get_fileno(td, fname);' at the end of the '(r == 4)' branch, I/Os are replayed to the designated files. if (r == 4) { /* * Check action first */ if (!strcmp(act, "wait")) rw = DDIR_WAIT; else if (!strcmp(act, "read")) rw = DDIR_READ; else if (!strcmp(act, "write")) rw = DDIR_WRITE; else if (!strcmp(act, "sync")) rw = DDIR_SYNC; else if (!strcmp(act, "datasync")) rw = DDIR_DATASYNC; else if (!strcmp(act, "trim")) rw = DDIR_TRIM; else { log_err("fio: bad iolog file action: %s\n", act); continue; } } else if (r == 2) { rw = DDIR_INVAL; if (!strcmp(act, "add")) { td->o.nr_files++; fileno = add_file(td, fname); file_action = FIO_LOG_ADD_FILE; continue; } else if (!strcmp(act, "open")) { fileno = get_fileno(td, fname); file_action = FIO_LOG_OPEN_FILE; } else if (!strcmp(act, "close")) { fileno = get_fileno(td, fname); file_action = FIO_LOG_CLOSE_FILE; } else { log_err("fio: bad iolog file action: %s\n", act); continue; } } else { log_err("bad iolog2: %s", p); continue; } Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/iolog.c
|
95820b6e6c92025df8d89c0bf39b174e53137c41 |
|
31-Jan-2013 |
Jens Axboe <axboe@kernel.dk> |
Merge branch 'master' into gfio Conflicts: Makefile client.c configure fio.c fio.h server.c server.h Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
98ffb8f3ecebed9984d1744f142eb8be10c14dbd |
|
30-Jan-2013 |
Ken Raeburn <raeburn@permabit.com> |
Fix bugs in [v]snprintf usage When calling snprintf, supply the full buffer size instead of one byte less. When using the returned length from vsnprintf for logging, don't write more than the actual buffer size (minus one for the trailing \0), in case the formatted string was truncated. Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/iolog.c
|
61b29c20eb4b1d374636d5325fb56c0fa9a574ad |
|
05-Apr-2012 |
Jens Axboe <axboe@kernel.dk> |
Merge branch 'master' into gfio Conflicts: fio.c fio.h Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
885ac623a4f154007efa49266bb381bcbc60f1e6 |
|
04-Apr-2012 |
Jens Axboe <axboe@kernel.dk> |
iolog: remove assert in io_u overlap This can happen very rarely for time based jobs. Before we had this as an assert since it was an impossible to hit condition, but now it can be expected very rarely with verify and time based jobs. Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/iolog.c
|
3c3ed070502bbfec387ded2c43d5e4559ca24a63 |
|
27-Mar-2012 |
Jens Axboe <axboe@kernel.dk> |
White space spring cleaning Lets squash them all, with a bit of tooling help. Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/iolog.c
|
1fae4855d30ae19ef6b681a33821b36c298ab7e1 |
|
22-Mar-2012 |
Jens Axboe <axboe@kernel.dk> |
Fixes for 32-bit compile - uint32/64 casting - Real bug fix in types[] index beyond length. Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/iolog.c
|
f5ed765adadc5dca61efb5fc103fa5cd0310bcec |
|
14-Mar-2012 |
Jens Axboe <axboe@kernel.dk> |
server: convert iolog in place instead of copy allocating it Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/iolog.c
|
1b42725f06f8906b9b99381da3490484f59df28a |
|
14-Mar-2012 |
Jens Axboe <axboe@kernel.dk> |
gfio: Add support for sending logs over the network This is for things like bw log, latency logs, etc. We add a new depedency, zlib, for this. The logs can be quite big and the network is not necessarily super fast, so we compress them using zlib. Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/iolog.c
|
ea51b956a15dd4aee047233be892bb3607f3adbd |
|
14-Mar-2012 |
Jens Axboe <axboe@kernel.dk> |
iolog: note type of log Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/iolog.c
|
d401b24d00244223f04ddeee0c563909ad7f4f31 |
|
11-Feb-2012 |
Jens Axboe <axboe@kernel.dk> |
Revert "Change iolog overlap assert to a debug dump" Issued has been fixed, restore assert. This reverts commit 86f40280e27474c666fea75cc705caeaf94f6346. Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/iolog.c
|
86f40280e27474c666fea75cc705caeaf94f6346 |
|
10-Feb-2012 |
Jens Axboe <axboe@kernel.dk> |
Change iolog overlap assert to a debug dump Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/iolog.c
|
b8bc8cba9512c6dce4891fda86de675053605ca2 |
|
01-Dec-2011 |
Jens Axboe <axboe@kernel.dk> |
Add log_avg_msec option By default, fio will note an entry in the bw/iops/lat logs for every IO that is completed. This quickly eats up a lot of disk space for long running jobs. By setting this option to eg 1000, fio will average the results logged over 1 second instead. This reduces the resolution of the log, but makes it more manageable. Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/iolog.c
|
ac9b9101f1ef57965d6ffd51f143274a1eb665ef |
|
01-Oct-2011 |
Jens Axboe <axboe@kernel.dk> |
Fixup some bad file naming log.c does not match log.h. Rename the iolog stuff to iolog.c and infolog.c to log.c (so it matches the include). Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/iolog.c
|