Skip to content

Commit

Permalink
[PATCH] fault-injection: defaults likely to please a new user
Browse files Browse the repository at this point in the history
Assign defaults most likely to please a new user:
 1) generate some logging output
    (verbose=2)
 2) avoid injecting failures likely to lock up UI
    (ignore_gfp_wait=1, ignore_gfp_highmem=1)

Signed-off-by: Don Mullis <[email protected]>
Cc: Akinobu Mita <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Don Mullis authored and Linus Torvalds committed Dec 8, 2006
1 parent f1729c2 commit 6b1b60f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/linux/fault-inject.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ struct fault_attr {
.times = ATOMIC_INIT(1), \
.require_end = ULONG_MAX, \
.stacktrace_depth = 32, \
.verbose = 2, \
}

#define DECLARE_FAULT_ATTR(name) struct fault_attr name = FAULT_ATTR_INITIALIZER
Expand Down
2 changes: 2 additions & 0 deletions mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,8 @@ static struct fail_page_alloc_attr {

} fail_page_alloc = {
.attr = FAULT_ATTR_INITIALIZER,
.ignore_gfp_wait = 1,
.ignore_gfp_highmem = 1,
};

static int __init setup_fail_page_alloc(char *str)
Expand Down
1 change: 1 addition & 0 deletions mm/slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -3102,6 +3102,7 @@ static struct failslab_attr {

} failslab = {
.attr = FAULT_ATTR_INITIALIZER,
.ignore_gfp_wait = 1,
};

static int __init setup_failslab(char *str)
Expand Down

0 comments on commit 6b1b60f

Please sign in to comment.