summaryrefslogtreecommitdiffstats
path: root/xlators/debug/error-gen/src/error-gen.h
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2012-11-01 10:53:43 -0400
committerVijay Bellur <vbellur@redhat.com>2012-11-19 23:12:28 -0800
commit18851652c9e3d566fd82fac91d67792d7c221f6b (patch)
tree11844305d6c68a6709964f543be4ed3d79ec5d6c /xlators/debug/error-gen/src/error-gen.h
parentc0885f7dbbbf8fb9d9f813617e13c7ba59a6acef (diff)
debug/error-gen: add the short write pseudo-error
Add a separate enum for pseudo-errors in the debug/error-gen translator and include a short write error. The short write error causes writev requests to return with some non-error value less than the size of the write request. BUG: 853690 Change-Id: I50b7d328386a8b78d03ce91b4c2ec83e0d32c9aa Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: http://review.gluster.org/4148 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/debug/error-gen/src/error-gen.h')
-rw-r--r--xlators/debug/error-gen/src/error-gen.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/xlators/debug/error-gen/src/error-gen.h b/xlators/debug/error-gen/src/error-gen.h
index 9eaec804f..d92c23062 100644
--- a/xlators/debug/error-gen/src/error-gen.h
+++ b/xlators/debug/error-gen/src/error-gen.h
@@ -19,6 +19,18 @@
#define GF_FAILURE_DEFAULT 10
+/*
+ * Pseudo-errors refer to errors beyond the scope of traditional <-1, op_errno>
+ * returns. This facilitates the ability to return unexpected, but not -1 values
+ * and/or to inject operations that lead to implicit error conditions. The range
+ * for pseudo errors resides at a high value to avoid conflicts with the errno
+ * range.
+ */
+enum GF_PSEUDO_ERRORS {
+ GF_ERROR_SHORT_WRITE = 1000, /* short writev return value */
+ GF_ERROR_MAX
+};
+
typedef struct {
int enable[GF_FOP_MAXVALUE];
int op_count;