]>
Commit | Line | Data |
---|---|---|
56d3fc2b DW |
1 | /* |
2 | * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. | |
3 | * Copyright (C) 2017 Oracle. | |
4 | * All Rights Reserved. | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or | |
7 | * modify it under the terms of the GNU General Public License | |
8 | * as published by the Free Software Foundation; either version 2 | |
9 | * of the License, or (at your option) any later version. | |
10 | * | |
11 | * This program is distributed in the hope that it would be useful, | |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | * GNU General Public License for more details. | |
15 | * | |
16 | * You should have received a copy of the GNU General Public License | |
17 | * along with this program; if not, write the Free Software Foundation, | |
18 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. | |
19 | */ | |
20 | #ifndef __XFS_ERRORTAG_H_ | |
21 | #define __XFS_ERRORTAG_H_ | |
22 | ||
23 | /* | |
24 | * error injection tags - the labels can be anything you want | |
25 | * but each tag should have its own unique number | |
26 | */ | |
27 | ||
28 | #define XFS_ERRTAG_NOERROR 0 | |
29 | #define XFS_ERRTAG_IFLUSH_1 1 | |
30 | #define XFS_ERRTAG_IFLUSH_2 2 | |
31 | #define XFS_ERRTAG_IFLUSH_3 3 | |
32 | #define XFS_ERRTAG_IFLUSH_4 4 | |
33 | #define XFS_ERRTAG_IFLUSH_5 5 | |
34 | #define XFS_ERRTAG_IFLUSH_6 6 | |
35 | #define XFS_ERRTAG_DA_READ_BUF 7 | |
36 | #define XFS_ERRTAG_BTREE_CHECK_LBLOCK 8 | |
37 | #define XFS_ERRTAG_BTREE_CHECK_SBLOCK 9 | |
38 | #define XFS_ERRTAG_ALLOC_READ_AGF 10 | |
39 | #define XFS_ERRTAG_IALLOC_READ_AGI 11 | |
40 | #define XFS_ERRTAG_ITOBP_INOTOBP 12 | |
41 | #define XFS_ERRTAG_IUNLINK 13 | |
42 | #define XFS_ERRTAG_IUNLINK_REMOVE 14 | |
43 | #define XFS_ERRTAG_DIR_INO_VALIDATE 15 | |
44 | #define XFS_ERRTAG_BULKSTAT_READ_CHUNK 16 | |
45 | #define XFS_ERRTAG_IODONE_IOERR 17 | |
46 | #define XFS_ERRTAG_STRATREAD_IOERR 18 | |
47 | #define XFS_ERRTAG_STRATCMPL_IOERR 19 | |
48 | #define XFS_ERRTAG_DIOWRITE_IOERR 20 | |
49 | #define XFS_ERRTAG_BMAPIFORMAT 21 | |
50 | #define XFS_ERRTAG_FREE_EXTENT 22 | |
51 | #define XFS_ERRTAG_RMAP_FINISH_ONE 23 | |
52 | #define XFS_ERRTAG_REFCOUNT_CONTINUE_UPDATE 24 | |
53 | #define XFS_ERRTAG_REFCOUNT_FINISH_ONE 25 | |
54 | #define XFS_ERRTAG_BMAP_FINISH_ONE 26 | |
55 | #define XFS_ERRTAG_AG_RESV_CRITICAL 27 | |
56 | /* | |
57 | * DEBUG mode instrumentation to test and/or trigger delayed allocation | |
58 | * block killing in the event of failed writes. When enabled, all | |
59 | * buffered writes are silenty dropped and handled as if they failed. | |
60 | * All delalloc blocks in the range of the write (including pre-existing | |
61 | * delalloc blocks!) are tossed as part of the write failure error | |
62 | * handling sequence. | |
63 | */ | |
64 | #define XFS_ERRTAG_DROP_WRITES 28 | |
65 | #define XFS_ERRTAG_LOG_BAD_CRC 29 | |
66 | #define XFS_ERRTAG_LOG_ITEM_PIN 30 | |
67 | #define XFS_ERRTAG_BUF_LRU_REF 31 | |
68 | #define XFS_ERRTAG_MAX 32 | |
69 | ||
70 | /* | |
71 | * Random factors for above tags, 1 means always, 2 means 1/2 time, etc. | |
72 | */ | |
73 | #define XFS_RANDOM_DEFAULT 100 | |
74 | #define XFS_RANDOM_IFLUSH_1 XFS_RANDOM_DEFAULT | |
75 | #define XFS_RANDOM_IFLUSH_2 XFS_RANDOM_DEFAULT | |
76 | #define XFS_RANDOM_IFLUSH_3 XFS_RANDOM_DEFAULT | |
77 | #define XFS_RANDOM_IFLUSH_4 XFS_RANDOM_DEFAULT | |
78 | #define XFS_RANDOM_IFLUSH_5 XFS_RANDOM_DEFAULT | |
79 | #define XFS_RANDOM_IFLUSH_6 XFS_RANDOM_DEFAULT | |
80 | #define XFS_RANDOM_DA_READ_BUF XFS_RANDOM_DEFAULT | |
81 | #define XFS_RANDOM_BTREE_CHECK_LBLOCK (XFS_RANDOM_DEFAULT/4) | |
82 | #define XFS_RANDOM_BTREE_CHECK_SBLOCK XFS_RANDOM_DEFAULT | |
83 | #define XFS_RANDOM_ALLOC_READ_AGF XFS_RANDOM_DEFAULT | |
84 | #define XFS_RANDOM_IALLOC_READ_AGI XFS_RANDOM_DEFAULT | |
85 | #define XFS_RANDOM_ITOBP_INOTOBP XFS_RANDOM_DEFAULT | |
86 | #define XFS_RANDOM_IUNLINK XFS_RANDOM_DEFAULT | |
87 | #define XFS_RANDOM_IUNLINK_REMOVE XFS_RANDOM_DEFAULT | |
88 | #define XFS_RANDOM_DIR_INO_VALIDATE XFS_RANDOM_DEFAULT | |
89 | #define XFS_RANDOM_BULKSTAT_READ_CHUNK XFS_RANDOM_DEFAULT | |
90 | #define XFS_RANDOM_IODONE_IOERR (XFS_RANDOM_DEFAULT/10) | |
91 | #define XFS_RANDOM_STRATREAD_IOERR (XFS_RANDOM_DEFAULT/10) | |
92 | #define XFS_RANDOM_STRATCMPL_IOERR (XFS_RANDOM_DEFAULT/10) | |
93 | #define XFS_RANDOM_DIOWRITE_IOERR (XFS_RANDOM_DEFAULT/10) | |
94 | #define XFS_RANDOM_BMAPIFORMAT XFS_RANDOM_DEFAULT | |
95 | #define XFS_RANDOM_FREE_EXTENT 1 | |
96 | #define XFS_RANDOM_RMAP_FINISH_ONE 1 | |
97 | #define XFS_RANDOM_REFCOUNT_CONTINUE_UPDATE 1 | |
98 | #define XFS_RANDOM_REFCOUNT_FINISH_ONE 1 | |
99 | #define XFS_RANDOM_BMAP_FINISH_ONE 1 | |
100 | #define XFS_RANDOM_AG_RESV_CRITICAL 4 | |
101 | #define XFS_RANDOM_DROP_WRITES 1 | |
102 | #define XFS_RANDOM_LOG_BAD_CRC 1 | |
103 | #define XFS_RANDOM_LOG_ITEM_PIN 1 | |
104 | #define XFS_RANDOM_BUF_LRU_REF 2 | |
105 | ||
106 | #endif /* __XFS_ERRORTAG_H_ */ |