• Home
  • Raw
  • Download

Lines Matching refs:td

356 #define __td_verror(td, err, msg, func)					\  argument
359 if ((td)->error) \
361 (td)->error = ____e; \
362 if (!(td)->first_error) \
363 …snprintf(td->verror, sizeof(td->verror), "file:%s:%d, func=%s, error=%s", __FILE__, __LINE__, (fun…
367 #define td_clear_error(td) \ argument
368 (td)->error = 0;
369 #define td_verror(td, err, func) \ argument
370 __td_verror((td), (err), strerror((err)), (func))
371 #define td_vmsg(td, err, msg, func) \ argument
372 __td_verror((td), (err), (msg), (func))
411 static inline void fio_ro_check(const struct thread_data *td, struct io_u *io_u) in fio_ro_check() argument
413 assert(!(io_u->ddir == DDIR_WRITE && !td_write(td))); in fio_ro_check()
418 static inline int should_fsync(struct thread_data *td) in should_fsync() argument
420 if (td->last_was_sync) in should_fsync()
422 if (td_write(td) || td_rw(td) || td->o.override_sync) in should_fsync()
444 extern void fio_options_set_ioengine_opts(struct option *long_options, struct thread_data *td);
535 #define for_each_td(td, i) \ argument
536 for ((i) = 0, (td) = &threads[0]; (i) < (int) thread_number; (i)++, (td)++)
537 #define for_each_file(td, f, i) \ argument
538 if ((td)->files_index) \
539 for ((i) = 0, (f) = (td)->files[0]; \
540 (i) < (td)->o.nr_files && ((f) = (td)->files[i]) != NULL; \
543 #define fio_assert(td, cond) do { \ argument
547 td_set_runstate((td), TD_EXITED); \
548 (td)->error = EFAULT; \
553 static inline int fio_fill_issue_time(struct thread_data *td) in fio_fill_issue_time() argument
555 if (td->o.read_iolog_file || in fio_fill_issue_time()
556 !td->o.disable_clat || !td->o.disable_slat || !td->o.disable_bw) in fio_fill_issue_time()
562 static inline int __should_check_rate(struct thread_data *td, in __should_check_rate() argument
565 struct thread_options *o = &td->o; in __should_check_rate()
577 static inline int should_check_rate(struct thread_data *td, in should_check_rate() argument
583 ret |= __should_check_rate(td, DDIR_READ); in should_check_rate()
585 ret |= __should_check_rate(td, DDIR_WRITE); in should_check_rate()
587 ret |= __should_check_rate(td, DDIR_TRIM); in should_check_rate()
592 static inline unsigned int td_max_bs(struct thread_data *td) in td_max_bs() argument
596 max_bs = max(td->o.max_bs[DDIR_READ], td->o.max_bs[DDIR_WRITE]); in td_max_bs()
597 return max(td->o.max_bs[DDIR_TRIM], max_bs); in td_max_bs()
600 static inline unsigned int td_min_bs(struct thread_data *td) in td_min_bs() argument
604 min_bs = min(td->o.min_bs[DDIR_READ], td->o.min_bs[DDIR_WRITE]); in td_min_bs()
605 return min(td->o.min_bs[DDIR_TRIM], min_bs); in td_min_bs()
617 static inline void td_io_u_lock(struct thread_data *td) in td_io_u_lock() argument
619 if (td->o.verify_async) in td_io_u_lock()
620 pthread_mutex_lock(&td->io_u_lock); in td_io_u_lock()
623 static inline void td_io_u_unlock(struct thread_data *td) in td_io_u_unlock() argument
625 if (td->o.verify_async) in td_io_u_unlock()
626 pthread_mutex_unlock(&td->io_u_lock); in td_io_u_unlock()
629 static inline void td_io_u_free_notify(struct thread_data *td) in td_io_u_free_notify() argument
631 if (td->o.verify_async) in td_io_u_free_notify()
632 pthread_cond_signal(&td->free_cond); in td_io_u_free_notify()