diff options
Diffstat (limited to 'xlators/debug/error-gen/src/error-gen.h')
| -rw-r--r-- | xlators/debug/error-gen/src/error-gen.h | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/xlators/debug/error-gen/src/error-gen.h b/xlators/debug/error-gen/src/error-gen.h index d92c2306240..2478cd5b21c 100644 --- a/xlators/debug/error-gen/src/error-gen.h +++ b/xlators/debug/error-gen/src/error-gen.h @@ -10,11 +10,6 @@ #ifndef _ERROR_GEN_H #define _ERROR_GEN_H -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "error-gen-mem-types.h" #define GF_FAILURE_DEFAULT 10 @@ -27,22 +22,28 @@ * range. */ enum GF_PSEUDO_ERRORS { - GF_ERROR_SHORT_WRITE = 1000, /* short writev return value */ - GF_ERROR_MAX + GF_ERROR_SHORT_WRITE = 1000, /* short writev return value */ + GF_ERROR_MAX }; typedef struct { - int enable[GF_FOP_MAXVALUE]; - int op_count; - int failure_iter_no; - char *error_no; - gf_boolean_t random_failure; - gf_lock_t lock; + int enable[GF_FOP_MAXVALUE]; + int op_count; + /* + * This is only an iteration number in the random-failure case. For + * the normal controlled-probability case, it's actually a numerator + * for the failure probability (see FAILURE_GRANULARITY declaration). + * It's just not worth blowing up the diff by changing it. + */ + int failure_iter_no; + int error_no_int; + gf_boolean_t random_failure; + gf_lock_t lock; } eg_t; typedef struct { - int error_no_count; - int error_no[20]; + int error_no_count; + int error_no[20]; } sys_error_t; #endif |
