• Home
  • Raw
  • Download

Lines Matching refs:td

438 #define __td_verror(td, err, msg, func)					\  argument
441 if ((td)->error) \
443 (td)->error = ____e; \
444 if (!(td)->first_error) \
445 …snprintf(td->verror, sizeof(td->verror), "file:%s:%d, func=%s, error=%s", __FILE__, __LINE__, (fun…
449 #define td_clear_error(td) do { \ argument
450 (td)->error = 0; \
451 if ((td)->parent) \
452 (td)->parent->error = 0; \
455 #define td_verror(td, err, func) do { \ argument
456 __td_verror((td), (err), strerror((err)), (func)); \
457 if ((td)->parent) \
458 __td_verror((td)->parent, (err), strerror((err)), (func)); \
461 #define td_vmsg(td, err, msg, func) do { \ argument
462 __td_verror((td), (err), (msg), (func)); \
463 if ((td)->parent) \
464 __td_verror((td)->parent, (err), (msg), (func)); \
502 static inline void fio_ro_check(const struct thread_data *td, struct io_u *io_u) in fio_ro_check() argument
504 assert(!(io_u->ddir == DDIR_WRITE && !td_write(td))); in fio_ro_check()
509 static inline int should_fsync(struct thread_data *td) in should_fsync() argument
511 if (td->last_was_sync) in should_fsync()
513 if (td_write(td) || td->o.override_sync) in should_fsync()
536 extern void fio_options_set_ioengine_opts(struct option *long_options, struct thread_data *td);
591 static inline enum fio_ioengine_flags td_ioengine_flags(struct thread_data *td) in td_ioengine_flags() argument
594 ((td->flags >> TD_ENG_FLAG_SHIFT) & TD_ENG_FLAG_MASK); in td_ioengine_flags()
597 static inline void td_set_ioengine_flags(struct thread_data *td) in td_set_ioengine_flags() argument
599 td->flags = (~(TD_ENG_FLAG_MASK << TD_ENG_FLAG_SHIFT) & td->flags) | in td_set_ioengine_flags()
600 (td->io_ops->flags << TD_ENG_FLAG_SHIFT); in td_set_ioengine_flags()
603 static inline bool td_ioengine_flagged(struct thread_data *td, in td_ioengine_flagged() argument
606 return ((td->flags >> TD_ENG_FLAG_SHIFT) & flags) != 0; in td_ioengine_flagged()
651 extern int io_queue_event(struct thread_data *td, struct io_u *io_u, int *ret,
665 #define for_each_td(td, i) \ argument
666 for ((i) = 0, (td) = &threads[0]; (i) < (int) thread_number; (i)++, (td)++)
667 #define for_each_file(td, f, i) \ argument
668 if ((td)->files_index) \
669 for ((i) = 0, (f) = (td)->files[0]; \
670 (i) < (td)->o.nr_files && ((f) = (td)->files[i]) != NULL; \
673 #define fio_assert(td, cond) do { \ argument
677 td_set_runstate((td), TD_EXITED); \
678 (td)->error = EFAULT; \
683 static inline bool fio_fill_issue_time(struct thread_data *td) in fio_fill_issue_time() argument
685 if (td->o.read_iolog_file || in fio_fill_issue_time()
686 !td->o.disable_clat || !td->o.disable_slat || !td->o.disable_bw) in fio_fill_issue_time()
692 static inline bool __should_check_rate(struct thread_data *td, in __should_check_rate() argument
695 struct thread_options *o = &td->o; in __should_check_rate()
707 static inline bool should_check_rate(struct thread_data *td) in should_check_rate() argument
709 if (td->bytes_done[DDIR_READ] && __should_check_rate(td, DDIR_READ)) in should_check_rate()
711 if (td->bytes_done[DDIR_WRITE] && __should_check_rate(td, DDIR_WRITE)) in should_check_rate()
713 if (td->bytes_done[DDIR_TRIM] && __should_check_rate(td, DDIR_TRIM)) in should_check_rate()
719 static inline unsigned int td_max_bs(struct thread_data *td) in td_max_bs() argument
723 max_bs = max(td->o.max_bs[DDIR_READ], td->o.max_bs[DDIR_WRITE]); in td_max_bs()
724 return max(td->o.max_bs[DDIR_TRIM], max_bs); in td_max_bs()
727 static inline unsigned int td_min_bs(struct thread_data *td) in td_min_bs() argument
731 min_bs = min(td->o.min_bs[DDIR_READ], td->o.min_bs[DDIR_WRITE]); in td_min_bs()
732 return min(td->o.min_bs[DDIR_TRIM], min_bs); in td_min_bs()
735 static inline bool td_async_processing(struct thread_data *td) in td_async_processing() argument
737 return (td->flags & TD_F_NEED_LOCK) != 0; in td_async_processing()
744 static inline void td_io_u_lock(struct thread_data *td) in td_io_u_lock() argument
746 if (td_async_processing(td)) in td_io_u_lock()
747 pthread_mutex_lock(&td->io_u_lock); in td_io_u_lock()
750 static inline void td_io_u_unlock(struct thread_data *td) in td_io_u_unlock() argument
752 if (td_async_processing(td)) in td_io_u_unlock()
753 pthread_mutex_unlock(&td->io_u_lock); in td_io_u_unlock()
756 static inline void td_io_u_free_notify(struct thread_data *td) in td_io_u_free_notify() argument
758 if (td_async_processing(td)) in td_io_u_free_notify()
759 pthread_cond_signal(&td->free_cond); in td_io_u_free_notify()
762 static inline void td_flags_clear(struct thread_data *td, unsigned int *flags, in td_flags_clear() argument
765 if (!td_async_processing(td)) in td_flags_clear()
771 static inline void td_flags_set(struct thread_data *td, unsigned int *flags, in td_flags_set() argument
774 if (!td_async_processing(td)) in td_flags_set()