X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=fio.h;h=c1c71465b8789ada64ebf51a8c611358ca1e6fac;hp=c168fe708bcb3e49a9dda7762a94975881159dc7;hb=433afcb4fe81e775c15af9d39a6f4db8a53d693a;hpb=0c6e75175bcaf8d05bfa88aa8caa584fbb848b74 diff --git a/fio.h b/fio.h index c168fe70..c1c71465 100644 --- a/fio.h +++ b/fio.h @@ -428,8 +428,21 @@ struct thread_data { */ struct list_head io_hist_list; struct list_head io_log_list; + + /* + * timeout handling + */ + struct timeval timeout_end; + struct itimerval timer; }; +/* + * 30 second per-io_u timeout, with 5 second intervals to avoid resetting + * the timer on each queue operation. + */ +#define IO_U_TIMEOUT_INC 5 +#define IO_U_TIMEOUT 30 + #define __td_verror(td, err, msg) \ do { \ if ((td)->error) \ @@ -628,6 +641,8 @@ extern void requeue_io_u(struct thread_data *, struct io_u **); extern long __must_check io_u_sync_complete(struct thread_data *, struct io_u *, endio_handler *); extern long __must_check io_u_queued_complete(struct thread_data *, int, endio_handler *); extern void io_u_queued(struct thread_data *, struct io_u *); +extern void io_u_init_timeout(void); +extern void io_u_set_timeout(struct thread_data *); /* * io engine entry points