Recent changes (master)
The following changes since commit 3bb85e8443d626ee71a4126dbe6ebcaf751527f1:
Add a note of what is the default value for random_generator (2016-01-30 22:03:39 -0700)
are available in the git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to d96d3bb34689d0290174134e5a4770056dd4f980:
stat: cleanup average logging (2016-02-03 21:10:33 -0700)
----------------------------------------------------------------
Eric Whitney (1):
fio: fix ignore_error regression
Jens Axboe (1):
stat: cleanup average logging
Robin H. Johnson (2):
Makefile: false positive on _FORTIFY_SOURCE
libmtd: compile fix for linux header changes.
Makefile | 2 +- backend.c | 8 ++++++++ oslib/libmtd.h | 3 +++ stat.c | 31 +++++++++++++------------------ 4 files changed, 25 insertions(+), 19 deletions(-)
---
Diff of recent changes:
Makefile +1 -1
@@ -20,7 +20,7 @@ all: include config-host.mak endif -DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG +DEBUGFLAGS = -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFIO_INTERNAL $(DEBUGFLAGS) OPTFLAGS= -g -ffast-math CFLAGS = -std=gnu99 -Wwrite-strings -Wall -Wdeclaration-after-statement $(OPTFLAGS) $(EXTFLAGS) $(BUILD_CFLAGS) -I. -I$(SRCDIR)
backend.c +8 -0
@@ -520,6 +520,14 @@ sync_done:if (*ret <0 )break ; } + +/* +* when doing I/O (not when verifying), +* check for any errors that are to be ignored +*/ +if (!from_verify) +break ; +return 0 ;case FIO_Q_QUEUED :/*
oslib/libmtd.h +3 -0
@@ -29,6 +29,9 @@extern "C" {#endif +// Needed for uint8_t, uint64_t +#include <stdint.h> +/* Maximum MTD device name length */ #define MTD_NAME_MAX 127/* Maximum MTD device type string length */
stat.c +13 -18
@@ -1942,35 +1942,30 @@ void reset_io_stats(struct thread_data *td) } } -static void _add_stat_to_log (struct io_log *iolog,unsigned long elapsed) +static void __add_stat_to_log (struct io_log *iolog,enum fio_ddir ddir, +unsigned long elapsed) {/* * Note an entry in the log. Use the mean from the logged samples, * making sure to properly round up. Only write a log entry if we * had actual samples done. */ -if (iolog->avg_window[DDIR_READ ].samples) { -unsigned long mr; +if (iolog->avg_window[ddir].samples) { +unsigned long val; - mr = iolog->avg_window[DDIR_READ ].mean.u.f +0.50 ; -__add_log_sample (iolog, mr,DDIR_READ ,0 , elapsed,0 ); + val = iolog->avg_window[ddir].mean.u.f +0.50 ; +__add_log_sample (iolog, val, ddir,0 , elapsed,0 ); } -if (iolog->avg_window[DDIR_WRITE ].samples) { -unsigned long mw; - mw = iolog->avg_window[DDIR_WRITE ].mean.u.f +0.50 ; -__add_log_sample (iolog, mw,DDIR_WRITE ,0 , elapsed,0 ); - } -if (iolog->avg_window[DDIR_TRIM ].samples) { -unsigned long mw; +reset_io_stat (&iolog->avg_window[ddir]); +} - mw = iolog->avg_window[DDIR_TRIM ].mean.u.f +0.50 ; -__add_log_sample (iolog, mw,DDIR_TRIM ,0 , elapsed,0 ); - } +static void _add_stat_to_log (struct io_log *iolog,unsigned long elapsed) +{ +int ddir; -reset_io_stat (&iolog->avg_window[DDIR_READ ]); -reset_io_stat (&iolog->avg_window[DDIR_WRITE ]); -reset_io_stat (&iolog->avg_window[DDIR_TRIM ]); +for (ddir =0 ; ddir <DDIR_RWDIR_CNT ; ddir++) +__add_stat_to_log (iolog, ddir, elapsed); } static void add_log_sample(struct thread_data *td, struct io_log *iolog,