Recent changes (master)
The following changes since commit 5cd4efe903798f2185a347911a9440324558c89f:
parse: improve detection of bad input string (2019-10-14 08:03:53 -0600)
are available in the Git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to 2e97fa1b0d76edc6517fa4a8a4f6e0792b458e8c:
Merge branch 'fix-fsync-on-close' of https://github.com/sitsofe/fio (2019-10-15 09:27:06 -0600)
----------------------------------------------------------------
Jens Axboe (1):
Merge branch 'fix-fsync-on-close' of https://github.com/sitsofe/fio
Sitsofe Wheeler (1):
backend: fix final fsync behaviour
Vincent Fu (3):
io_u: skip to the next zone when zoneskip is set to zero
filesetup: use zonerange for map and LFSR with zonemode=strided
testing: add test script for zonemode=strided
backend.c | 11 +- filesetup.c | 3 + io_u.c | 3 +- ioengines.c | 6 +- t/strided.py | 350 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 366 insertions(+), 7 deletions(-) create mode 100755 t/strided.py
---
Diff of recent changes:
backend.c +7 -4
@@ -281,6 +281,7 @@ static bool fio_io_sync(struct thread_data *td, struct fio_file *f) io_u->ddir =DDIR_SYNC ; io_u->file = f; +io_u_set (td, io_u,IO_U_F_NO_FILE_PUT );if (td_io_prep (td, io_u)) {put_io_u (td, io_u);
@@ -314,7 +315,7 @@ requeue:static int fio_file_fsync (struct thread_data *td,struct fio_file *f) { -int ret; +int ret, ret2;if (fio_file_open (f))return fio_io_sync (td, f);
@@ -323,8 +324,10 @@ static int fio_file_fsync(struct thread_data *td, struct fio_file *f)return 1 ; ret =fio_io_sync (td, f); -td_io_close_file (td, f); -return ret; + ret2 =0 ; +if (fio_file_open (f)) + ret2 =td_io_close_file (td, f); +return (ret || ret2); }static inline void __update_ts_cache (struct thread_data *td)
@@ -1124,7 +1127,7 @@ reap: td->error =0 ; } -if (should_fsync (td) && td->o.end_fsync) { +if (should_fsync (td) && (td->o.end_fsync || td->o.fsync_on_close)) {td_set_runstate (td,TD_FSYNCING );for_each_file (td, f, i) {
filesetup.c +3 -0
@@ -1338,6 +1338,9 @@ bool init_random_map(struct thread_data *td)for_each_file (td, f, i) {uint64_t fsize =min (f->real_file_size, f->io_size); +if (td->o.zone_mode ==ZONE_MODE_STRIDED ) + fsize = td->o.zone_range; + blocks = fsize / (unsigned long long ) td->o.rw_min_bs;if (check_rand_gen_limits (td, f, blocks))
io_u.c +2 -1
@@ -850,7 +850,8 @@ static void setup_strided_zone_mode(struct thread_data *td, struct io_u *io_u)/* * See if it's time to switch to a new zone */ -if (td->zone_bytes >= td->o.zone_size && td->o.zone_skip) { +if (td->zone_bytes >= td->o.zone_size && +fio_option_is_set (&td->o, zone_skip)) { td->zone_bytes =0 ; f->file_offset += td->o.zone_range + td->o.zone_skip;
ioengines.c +4 -2
@@ -376,14 +376,16 @@ enum fio_q_status td_io_queue(struct thread_data *td, struct io_u *io_u) }if (ret ==FIO_Q_COMPLETED ) { -if (ddir_rw (io_u->ddir) ||ddir_sync (io_u->ddir)) { +if (ddir_rw (io_u->ddir) || + (ddir_sync (io_u->ddir) && td->runstate !=TD_FSYNCING )) {io_u_mark_depth (td,1 ); td->ts.total_io_u[io_u->ddir]++; } }else if (ret ==FIO_Q_QUEUED ) { td->io_u_queued++; -if (ddir_rw (io_u->ddir) ||ddir_sync (io_u->ddir)) +if (ddir_rw (io_u->ddir) || + (ddir_sync (io_u->ddir) && td->runstate !=TD_FSYNCING )) td->ts.total_io_u[io_u->ddir]++;if (td->io_u_queued >= td->o.iodepth_batch)
t/strided.py new file +350 -0
350 lines not on this page · raw message