From: Jens Axboe Date: Sat, 16 Jan 2021 20:36:27 +0000 (-0700) Subject: Merge branch 'fix_filename_overrun' of https://github.com/sitsofe/fio X-Git-Tag: fio-3.26~60 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=548b363c08875165a018788195e8fd2304c2ce24;hp=465767437da1bcf99a375295799d33948d9fc5f0 Merge branch 'fix_filename_overrun' of https://github.com/sitsofe/fio * 'fix_filename_overrun' of https://github.com/sitsofe/fio: options: fix buffer overrun --- diff --git a/backend.c b/backend.c index 2e6a377c..e20a2e07 100644 --- a/backend.c +++ b/backend.c @@ -439,7 +439,7 @@ static int wait_for_completions(struct thread_data *td, struct timespec *time) if ((full && !min_evts) || !td->o.iodepth_batch_complete_min) min_evts = 1; - if (time && __should_check_rate(td)) + if (time && should_check_rate(td)) fio_gettime(time, NULL); do { @@ -494,7 +494,7 @@ int io_queue_event(struct thread_data *td, struct io_u *io_u, int *ret, requeue_io_u(td, &io_u); } else { sync_done: - if (comp_time && __should_check_rate(td)) + if (comp_time && should_check_rate(td)) fio_gettime(comp_time, NULL); *ret = io_u_sync_complete(td, io_u); diff --git a/fio.h b/fio.h index 4d439d98..ee582a72 100644 --- a/fio.h +++ b/fio.h @@ -757,17 +757,9 @@ 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) -{ - return (td->flags & TD_F_CHECK_RATE) != 0; -} - static inline bool should_check_rate(struct thread_data *td) { - if (!__should_check_rate(td)) - return false; - - return ddir_rw_sum(td->bytes_done) != 0; + return (td->flags & TD_F_CHECK_RATE) != 0; } static inline unsigned long long td_max_bs(struct thread_data *td)