Re: [patch 2/8] fault-injection capabilities infrastructure
From: Don Mullis
Date: Tue Sep 19 2006 - 01:57:11 EST
Replace individual structure element comments with reference
to Documentation/fault-injection/fault-injection.txt
Init "interval" to 1 (smallest useful value).
Init "times" to 1 rather than -1 (infinity), for fewer
accidental system lockups.
Signed-off-by: Don Mullis <dwm@xxxxxxxx>
---
include/linux/fault-inject.h | 20 +++++---------------
1 file changed, 5 insertions(+), 15 deletions(-)
Index: linux-2.6.17/include/linux/fault-inject.h
===================================================================
--- linux-2.6.17.orig/include/linux/fault-inject.h
+++ linux-2.6.17/include/linux/fault-inject.h
@@ -6,31 +6,21 @@
#include <linux/types.h>
#include <asm/atomic.h>
+/*
+ * For explanation of the elements of this struct, see
+ * Documentation/fault-injection/fault-injection.txt
+ */
struct fault_attr {
-
- /* how often it should fail in percent. */
unsigned long probability;
-
- /* the interval of failures. */
unsigned long interval;
-
- /*
- * how many times failures may happen at most.
- * A value of '-1' means infinity.
- */
atomic_t times;
-
- /*
- * the size of free space where memory can be allocated safely.
- * A value of '0' means infinity.
- */
atomic_t space;
unsigned long count;
};
#define DEFINE_FAULT_ATTR(name) \
- struct fault_attr name = { .times = ATOMIC_INIT(-1), }
+ struct fault_attr name = { .interval=1, .times = ATOMIC_INIT(1), }
int setup_fault_attr(struct fault_attr *attr, char *str);
void should_fail_srandom(unsigned long entropy);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/