Jens Axboe | 3c97812 | 2013-04-17 19:27:46 +0200 | [diff] [blame] | 1 | #ifndef FIO_TD_ERROR_H |
| 2 | #define FIO_TD_ERROR_H |
| 3 | |
| 4 | /* |
| 5 | * What type of errors to continue on when continue_on_error is used |
| 6 | */ |
| 7 | enum error_type_bit { |
| 8 | ERROR_TYPE_READ_BIT = 0, |
| 9 | ERROR_TYPE_WRITE_BIT = 1, |
| 10 | ERROR_TYPE_VERIFY_BIT = 2, |
| 11 | ERROR_TYPE_CNT = 3, |
| 12 | }; |
| 13 | |
| 14 | enum error_type { |
| 15 | ERROR_TYPE_NONE = 0, |
| 16 | ERROR_TYPE_READ = 1 << ERROR_TYPE_READ_BIT, |
| 17 | ERROR_TYPE_WRITE = 1 << ERROR_TYPE_WRITE_BIT, |
| 18 | ERROR_TYPE_VERIFY = 1 << ERROR_TYPE_VERIFY_BIT, |
| 19 | ERROR_TYPE_ANY = 0xffff, |
| 20 | }; |
| 21 | |
| 22 | enum error_type_bit td_error_type(enum fio_ddir ddir, int err); |
| 23 | int td_non_fatal_error(struct thread_data *td, enum error_type_bit etype, |
| 24 | int err); |
| 25 | void update_error_count(struct thread_data *td, int err); |
| 26 | |
| 27 | #endif |