Recent changes (master)
The following changes since commit 70c6807675291c2c5ccb38cc9c81b45bcaed0ce1:
backend: count iterative bytes for progress (2015-12-18 22:33:35 -0700)
are available in the git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to 72f397487788fc0b542870de5cc29ea8e8134346:
Make options mask a 64-bit type (2015-12-21 16:03:01 -0700)
----------------------------------------------------------------
Jens Axboe (2):
backend: only terminate multiple loops if we did no IO Make options mask a 64-bit type
backend.c | 23 +++++++++----- options.c | 15 ++++----- options.h | 105 ++++++++++++++++++++++++++++++-------------------------------- 3 files changed, 74 insertions(+), 69 deletions(-)
---
Diff of recent changes:
backend.c +15 -8
@@ -808,15 +808,14 @@ static long long usec_for_io(struct thread_data *td, enum fio_ddir ddir)* * Returns number of bytes written and trimmed. */ -static uint64_t do_io (struct thread_data *td) +static void do_io (struct thread_data *td,uint64_t *bytes_done) {unsigned int i;int ret =0 ;uint64_t total_bytes, bytes_issued =0 ; -uint64_t this_bytes[2 ]; - this_bytes[0 ] = td->bytes_done[DDIR_WRITE ]; - this_bytes[1 ] = td->bytes_done[DDIR_TRIM ]; +for (i =0 ; i <DDIR_RWDIR_CNT ; i++) + bytes_done[i] = td->bytes_done[i];if (in_ramp_time (td))td_set_runstate (td,TD_RAMP );
@@ -1050,8 +1049,8 @@ reap:if (!ddir_rw_sum (td->this_io_bytes)) td->done =1 ; -return (td->bytes_done[DDIR_WRITE ] - this_bytes[0 ]) + - (td->bytes_done[DDIR_TRIM ] - this_bytes[1 ]); +for (i =0 ; i <DDIR_RWDIR_CNT ; i++) + bytes_done[i] = td->bytes_done[i] - bytes_done[i]; }static void cleanup_io_u (struct thread_data *td)
@@ -1603,9 +1602,17 @@ static void *thread_main(void *data)if (td->o.verify_only && (td_write (td) ||td_rw (td))) verify_bytes =do_dry_run (td);else { - verify_bytes =do_io (td); -if (!verify_bytes) +uint64_t bytes_done[DDIR_RWDIR_CNT ]; + +do_io (td, bytes_done); + +if (!ddir_rw_sum (bytes_done)) {fio_mark_td_terminate (td); + verify_bytes =0 ; + }else { + verify_bytes = bytes_done[DDIR_WRITE ] + + bytes_done[DDIR_TRIM ]; + } } clear_state =1 ;
options.c +8 -7
@@ -1075,8 +1075,9 @@ static struct opt_group fio_opt_groups[] = { }, }; -static struct opt_group *__opt_group_from_mask (struct opt_group *ogs,unsigned int *mask, -unsigned int inv_mask) +static struct opt_group *__opt_group_from_mask (struct opt_group *ogs, +uint64_t *mask, +uint64_t inv_mask) {struct opt_group *og;int i;
@@ -1096,7 +1097,7 @@ static struct opt_group *__opt_group_from_mask(struct opt_group *ogs, unsigned ireturn NULL ; } -struct opt_group *opt_group_from_mask (unsigned int *mask) +struct opt_group *opt_group_from_mask (uint64_t *mask) {return __opt_group_from_mask (fio_opt_groups, mask,FIO_OPT_C_INVALID ); }
@@ -1200,7 +1201,7 @@ static struct opt_group fio_opt_cat_groups[] = { } }; -struct opt_group *opt_group_cat_from_mask (unsigned int *mask) +struct opt_group *opt_group_cat_from_mask (uint64_t *mask) {return __opt_group_from_mask (fio_opt_cat_groups, mask,FIO_OPT_G_INVALID ); }
@@ -4350,19 +4351,19 @@ static int opt_is_set(struct thread_options *o, struct fio_option *opt)return (o->set_options[index] & ((uint64_t )1 << offset)) !=0 ; } -int __fio_option_is_set (struct thread_options *o,unsigned int off1) +bool __fio_option_is_set (struct thread_options *o,unsigned int off1) {struct fio_option *opt, *next; next =NULL ;while ((opt =find_next_opt (o, next, off1)) !=NULL ) {if (opt_is_set (o, opt)) -return 1 ; +return true; next = opt; } -return 0 ; +return false; }void fio_option_mark_set (struct thread_options *o,struct fio_option *opt)
options.h +51 -54
152 lines not on this page · raw message