• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2################################################################################
3##                                                                            ##
4## Copyright (c) International Business Machines  Corp., 2009                 ##
5##                                                                            ##
6## This program is free software;  you can redistribute it and/or modify      ##
7## it under the terms of the GNU General Public License as published by       ##
8## the Free Software Foundation; either version 2 of the License, or          ##
9## (at your option) any later version.                                        ##
10##                                                                            ##
11## This program is distributed in the hope that it will be useful, but        ##
12## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
13## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   ##
14## 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 to the Free Software               ##
18## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA    ##
19##                                                                            ##
20################################################################################
21#                                                                             ##
22# File :        restore_kernel_faults_default.sh			      ##
23#                                                                             ##
24# Usage:        restore_kernel_faults_default.sh	                      ##
25#                                                                             ##
26# Description:  This is a simple script that will restore the /debugfs/fail*  ##
27#		entries to their default values				      ##
28#                                                                             ##
29# Author:       Subrata Modak <subrata@linux.vnet.ibm.com>                    ##
30#                                                                             ##
31# History:      Aug 11 2009 - Created - Subrata Modak.                        ##
32#		Aug 17 2009 - Changed debugfs mount point - Subrata Modak.    ##
33################################################################################
34
35echo  0 > /sys/kernel/debug/fail_io_timeout/reject-end
36echo  0 > /sys/kernel/debug/fail_io_timeout/reject-start
37echo  4294967295 > /sys/kernel/debug/fail_io_timeout/require-end
38echo  0 > /sys/kernel/debug/fail_io_timeout/require-start
39echo  32 > /sys/kernel/debug/fail_io_timeout/stacktrace-depth
40echo  N > /sys/kernel/debug/fail_io_timeout/task-filter
41echo  2 > /sys/kernel/debug/fail_io_timeout/verbose
42echo  0 > /sys/kernel/debug/fail_io_timeout/space
43echo  1 > /sys/kernel/debug/fail_io_timeout/times
44echo  1 > /sys/kernel/debug/fail_io_timeout/interval
45echo  0 > /sys/kernel/debug/fail_io_timeout/probability
46
47echo  0 > /sys/kernel/debug/fail_make_request/reject-end
48echo  0 > /sys/kernel/debug/fail_make_request/reject-start
49echo  4294967295 > /sys/kernel/debug/fail_make_request/require-end
50echo  0 > /sys/kernel/debug/fail_make_request/require-start
51echo  32 > /sys/kernel/debug/fail_make_request/stacktrace-depth
52echo  N > /sys/kernel/debug/fail_make_request/task-filter
53echo  2 > /sys/kernel/debug/fail_make_request/verbose
54echo  0 > /sys/kernel/debug/fail_make_request/space
55echo  1 > /sys/kernel/debug/fail_make_request/times
56echo  1 > /sys/kernel/debug/fail_make_request/interval
57echo  0 > /sys/kernel/debug/fail_make_request/probability
58
59echo  1 > /sys/kernel/debug/fail_page_alloc/min-order
60echo  Y > /sys/kernel/debug/fail_page_alloc/ignore-gfp-highmem
61echo  Y > /sys/kernel/debug/fail_page_alloc/ignore-gfp-wait
62echo  0 > /sys/kernel/debug/fail_page_alloc/reject-end
63echo  0 > /sys/kernel/debug/fail_page_alloc/reject-start
64echo  4294967295 > /sys/kernel/debug/fail_page_alloc/require-end
65echo  0 > /sys/kernel/debug/fail_page_alloc/require-start
66echo  32 > /sys/kernel/debug/fail_page_alloc/stacktrace-depth
67echo  N > /sys/kernel/debug/fail_page_alloc/task-filter
68echo  2 > /sys/kernel/debug/fail_page_alloc/verbose
69echo  0 > /sys/kernel/debug/fail_page_alloc/space
70echo  1 > /sys/kernel/debug/fail_page_alloc/times
71echo  1 > /sys/kernel/debug/fail_page_alloc/interval
72echo  0 > /sys/kernel/debug/fail_page_alloc/probability
73
74echo  Y > /sys/kernel/debug/failslab/ignore-gfp-wait
75echo  0 > /sys/kernel/debug/failslab/reject-end
76echo  0 > /sys/kernel/debug/failslab/reject-start
77echo  4294967295 > /sys/kernel/debug/failslab/require-end
78echo  0 > /sys/kernel/debug/failslab/require-start
79echo  32 > /sys/kernel/debug/failslab/stacktrace-depth
80echo  N > /sys/kernel/debug/failslab/task-filter
81echo  2 > /sys/kernel/debug/failslab/verbose
82echo  0 > /sys/kernel/debug/failslab/space
83echo  1 > /sys/kernel/debug/failslab/times
84echo  1 > /sys/kernel/debug/failslab/interval
85echo  0 > /sys/kernel/debug/failslab/probability
86
87