File: td_error.h

package info (click to toggle)
fio 3.12-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 4,488 kB
  • sloc: ansic: 65,165; sh: 3,284; python: 1,978; makefile: 657; yacc: 204; lex: 184
file content (30 lines) | stat: -rw-r--r-- 807 bytes parent folder | download
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