X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=fio.h;h=9727f6c65556c4f937adad573cc2429a02ce6aa2;hp=2bfcac457c217693f1bce4aa6c855a2a67f6e014;hb=b4f5e72f1383;hpb=dfd3fe1adfe3b018c837f95ad4c4bb8e28d3d42c diff --git a/fio.h b/fio.h index 2bfcac45..9727f6c6 100644 --- a/fio.h +++ b/fio.h @@ -44,6 +44,7 @@ #include "io_u_queue.h" #include "workqueue.h" #include "steadystate.h" +#include "lib/nowarn_snprintf.h" #ifdef CONFIG_SOLARISAIO #include @@ -405,8 +406,6 @@ struct thread_data { struct flist_head trim_list; unsigned long trim_entries; - struct flist_head next_rand_list; - /* * for fileservice, how often to switch to a new file */ @@ -470,7 +469,9 @@ enum { break; \ (td)->error = ____e; \ if (!(td)->first_error) \ - snprintf(td->verror, sizeof(td->verror), "file:%s:%d, func=%s, error=%s", __FILE__, __LINE__, (func), (msg)); \ + nowarn_snprintf(td->verror, sizeof(td->verror), \ + "file:%s:%d, func=%s, error=%s", \ + __FILE__, __LINE__, (func), (msg)); \ } while (0) @@ -566,6 +567,7 @@ extern void fio_fill_default_options(struct thread_data *); extern int fio_show_option_help(const char *); extern void fio_options_set_ioengine_opts(struct option *long_options, struct thread_data *td); extern void fio_options_dup_and_init(struct option *); +extern char *fio_option_dup_subs(const char *); extern void fio_options_mem_dupe(struct thread_data *); extern void td_fill_rand_seeds(struct thread_data *); extern void td_fill_verify_state_seed(struct thread_data *); @@ -720,22 +722,17 @@ static inline bool option_check_rate(struct thread_data *td, enum fio_ddir ddir) return false; } -static inline bool __should_check_rate(struct thread_data *td, - enum fio_ddir ddir) +static inline bool __should_check_rate(struct thread_data *td) { return (td->flags & TD_F_CHECK_RATE) != 0; } static inline bool should_check_rate(struct thread_data *td) { - if (__should_check_rate(td, DDIR_READ) && td->bytes_done[DDIR_READ]) - return true; - if (__should_check_rate(td, DDIR_WRITE) && td->bytes_done[DDIR_WRITE]) - return true; - if (__should_check_rate(td, DDIR_TRIM) && td->bytes_done[DDIR_TRIM]) - return true; + if (!__should_check_rate(td)) + return false; - return false; + return ddir_rw_sum(td->bytes_done) != 0; } static inline unsigned int td_max_bs(struct thread_data *td)