summaryrefslogtreecommitdiffstats
path: root/src/spdk/ocf/inc/ocf_err.h
blob: e4f71f2a335b063b3f86fd3a6a4c2195f4ecd373 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
/*
 * Copyright(c) 2012-2018 Intel Corporation
 * SPDX-License-Identifier: BSD-3-Clause-Clear
 */

#ifndef __OCF_ERR_H__
#define __OCF_ERR_H__

/**
 * @file
 * @brief OCF error codes definitions
 */

/**
 * @brief OCF error enumerator
 */
typedef enum {
	/** Invalid input parameter value */
	OCF_ERR_INVAL = 1000000,

	/** Try again */
	OCF_ERR_AGAIN,

	/** Operation interrupted */
	OCF_ERR_INTR,

	/** Operation not supported */
	OCF_ERR_NOT_SUPP,

	/** Out of memory */
	OCF_ERR_NO_MEM,

	/** Lock not acquired */
	OCF_ERR_NO_LOCK,

	/** Metadata version mismatch */
	OCF_ERR_METADATA_VER,

	/** No metadata found on device */
	OCF_ERR_NO_METADATA,

	/** Cache metadata found on device */
	OCF_ERR_METADATA_FOUND,

	/** Invalid volume type */
	OCF_ERR_INVAL_VOLUME_TYPE,

	/** Unknown error occurred */
	OCF_ERR_UNKNOWN,

	/** To many caches */
	OCF_ERR_TOO_MANY_CACHES,

	/** Not enough RAM to start cache */
	OCF_ERR_NO_FREE_RAM,

	/** Start cache failure */
	OCF_ERR_START_CACHE_FAIL,

	/** Cache ID/name does not exist */
	OCF_ERR_CACHE_NOT_EXIST,

	/** Core ID/name does not exist */
	OCF_ERR_CORE_NOT_EXIST,

	/** Cache ID/name already exists */
	OCF_ERR_CACHE_EXIST,

	/** Core ID/name already exists */
	OCF_ERR_CORE_EXIST,

	/** Too many core devices in cache */
	OCF_ERR_TOO_MANY_CORES,

	/** Core device not available */
	OCF_ERR_CORE_NOT_AVAIL,

	/** Cannot open device exclusively*/
	OCF_ERR_NOT_OPEN_EXC,

	/** Cache device not available */
	OCF_ERR_CACHE_NOT_AVAIL,

	/** IO Class does not exist */
	OCF_ERR_IO_CLASS_NOT_EXIST,

	/** IO Error */
	OCF_ERR_IO,

	/** Error while writing to cache device */
	OCF_ERR_WRITE_CACHE,

	/** Error while writing to core device */
	OCF_ERR_WRITE_CORE,

	/*!< Dirty shutdown */
	OCF_ERR_DIRTY_SHUTDOWN,

	/** Cache contains dirty data */
	OCF_ERR_DIRTY_EXISTS,

	/** Flushing of core interrupted */
	OCF_ERR_FLUSHING_INTERRUPTED,

	/** Another flushing operation in progress */
	OCF_ERR_FLUSH_IN_PROGRESS,

	/** Adding core to core pool failed */
	OCF_ERR_CANNOT_ADD_CORE_TO_POOL,

	/** Cache is in incomplete state */
	OCF_ERR_CACHE_IN_INCOMPLETE_STATE,

	/** Core device is in inactive state */
	OCF_ERR_CORE_IN_INACTIVE_STATE,

	/** Invalid cache mode */
	OCF_ERR_INVALID_CACHE_MODE,

	/** Invalid cache line size */
	OCF_ERR_INVALID_CACHE_LINE_SIZE,

	/** Invalid cache name loaded */
	OCF_ERR_CACHE_NAME_MISMATCH,

	/** Device does not meet requirements */
	OCF_ERR_INVAL_CACHE_DEV,
} ocf_error_t;

#endif /* __OCF_ERR_H__ */