summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/fail.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2021-08-03 21:45:18 +0200
committerChuck Lever <chuck.lever@oracle.com>2021-08-20 19:50:32 +0200
commitc782af250083f69ba810e79b60a552252e777416 (patch)
tree3bfbcc4a3d9662303c157e38c868944f5e41581e /net/sunrpc/fail.h
parentsvcrdma: xpt_bc_xprt is already clear in __svc_rdma_free() (diff)
downloadlinux-c782af250083f69ba810e79b60a552252e777416.tar.xz
linux-c782af250083f69ba810e79b60a552252e777416.zip
SUNRPC: Add a /sys/kernel/debug/fail_sunrpc/ directory
This directory will contain a set of administrative controls for enabling error injection for kernel RPC consumers. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'net/sunrpc/fail.h')
-rw-r--r--net/sunrpc/fail.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/net/sunrpc/fail.h b/net/sunrpc/fail.h
new file mode 100644
index 000000000000..1d402b0d3453
--- /dev/null
+++ b/net/sunrpc/fail.h
@@ -0,0 +1,21 @@
+/* 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;
+};
+
+extern struct fail_sunrpc_attr fail_sunrpc;
+
+#endif /* CONFIG_FAULT_INJECTION */
+
+#endif /* _NET_SUNRPC_FAIL_H_ */