mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:46:16 +00:00
37324e6bb1
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>
26 lines
495 B
C
26 lines
495 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (C) 2021, Oracle. All rights reserved.
|
|
*/
|
|
|
|
#ifndef _NET_SUNRPC_FAIL_H_
|
|
#define _NET_SUNRPC_FAIL_H_
|
|
|
|
#include <linux/fault-inject.h>
|
|
|
|
#if IS_ENABLED(CONFIG_FAULT_INJECTION)
|
|
|
|
struct fail_sunrpc_attr {
|
|
struct fault_attr attr;
|
|
|
|
bool ignore_client_disconnect;
|
|
bool ignore_server_disconnect;
|
|
bool ignore_cache_wait;
|
|
};
|
|
|
|
extern struct fail_sunrpc_attr fail_sunrpc;
|
|
|
|
#endif /* CONFIG_FAULT_INJECTION */
|
|
|
|
#endif /* _NET_SUNRPC_FAIL_H_ */
|