summaryrefslogtreecommitdiff
path: root/net/sunrpc/debugfs.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2022-03-31 22:30:10 +0300
committerChuck Lever <chuck.lever@oracle.com>2022-05-19 19:25:38 +0300
commit37324e6bb120bc3cb7cbaa87512ff3a93dbcf5c4 (patch)
tree34bacc7faeb7ad7e0eb5e7f960fe76b67c1f0c58 /net/sunrpc/debugfs.c
parent45cb7955c180a2a34d291e68938250c4f9bd294f (diff)
downloadlinux-37324e6bb120bc3cb7cbaa87512ff3a93dbcf5c4.tar.xz
SUNRPC: Cache deferral injection
Cache deferral injection stress-tests the cache deferral logic as well as upper layer protocol deferred request handlers. This facility is for developers and professional testers to ensure coverage of the rqst deferral code paths. To date, we haven't had an adequate way to ensure these code paths are covered during testing, short of temporary code changes to force their use. A file called /sys/kernel/debug/fail_sunrpc/ignore-cache-wait enables administrators to disable cache deferral injection while allowing other types of sunrpc errors to be injected. The default setting is that cache deferral injection is enabled (ignore=false). To enable support for cache deferral injection, CONFIG_FAULT_INJECTION, CONFIG_FAULT_INJECTION_DEBUG_FS, and CONFIG_SUNRPC_DEBUG must all be set to "Y". Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'net/sunrpc/debugfs.c')
-rw-r--r--net/sunrpc/debugfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sunrpc/debugfs.c b/net/sunrpc/debugfs.c
index 7dc9cc929bfd..a176d5a0b0ee 100644
--- a/net/sunrpc/debugfs.c
+++ b/net/sunrpc/debugfs.c
@@ -262,6 +262,9 @@ static void fail_sunrpc_init(void)
debugfs_create_bool("ignore-server-disconnect", S_IFREG | 0600, dir,
&fail_sunrpc.ignore_server_disconnect);
+
+ debugfs_create_bool("ignore-cache-wait", S_IFREG | 0600, dir,
+ &fail_sunrpc.ignore_cache_wait);
}
#else
static void fail_sunrpc_init(void)