summaryrefslogtreecommitdiff
path: root/td_error.h
blob: 1cc3a75390af333d48e5aa094f0c2d5f32ae51c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef FIO_TD_ERROR_H
#define FIO_TD_ERROR_H

#include "io_ddir.h"

/*
 * What type of errors to continue on when continue_on_error is used,
 * and what type of errors to ignore when ignore_error is used.
 */
enum error_type_bit {
	ERROR_TYPE_READ_BIT = 0,
	ERROR_TYPE_WRITE_BIT = 1,
	ERROR_TYPE_VERIFY_BIT = 2,
	ERROR_TYPE_CNT = 3,
};

enum error_type {
        ERROR_TYPE_NONE = 0,
        ERROR_TYPE_READ = 1 << ERROR_TYPE_READ_BIT,
        ERROR_TYPE_WRITE = 1 << ERROR_TYPE_WRITE_BIT,
        ERROR_TYPE_VERIFY = 1 << ERROR_TYPE_VERIFY_BIT,
        ERROR_TYPE_ANY = 0xffff,
};

enum error_type_bit td_error_type(enum fio_ddir ddir, int err);
int td_non_fatal_error(struct thread_data *td, enum error_type_bit etype,
		       int err);
void update_error_count(struct thread_data *td, int err);

#endif