@@ -98,11 +98,14 @@ config NFSD_V4_SECURITY_LABEL
For now we recommend "Y" only for developers and testers.
config NFSD_FAULT_INJECTION
- bool "NFS server manual fault injection"
+ bool "NFS server manual fault injection (DEPRECATED)"
depends on NFSD_V4 && DEBUG_KERNEL
help
This option enables support for manually injecting faults
into the NFS server. This is intended to be used for
testing error recovery on the NFS client.
+ This feature should not be enabled on production systems
+ and will be removed in v3.19.
+
If unsure, say N.
@@ -24,6 +24,18 @@ struct nfsd_fault_inject_op {
static struct dentry *debug_dir;
+static void
+warn_deprecated(void)
+{
+ static bool warned = false;
+
+ if (!warned) {
+ pr_notice("nfsd: the NFSD fault injection framework is "
+ "scheduled for removal in v3.19.\n");
+ warned = true;
+ }
+}
+
static ssize_t fault_inject_read(struct file *file, char __user *buf,
size_t len, loff_t *ppos)
{
@@ -33,6 +45,8 @@ static ssize_t fault_inject_read(struct file *file, char __user *buf,
loff_t pos = *ppos;
struct nfsd_fault_inject_op *op = file_inode(file)->i_private;
+ warn_deprecated();
+
if (!pos)
val = op->get();
size = scnprintf(read_buf, sizeof(read_buf), "%llu\n", val);
@@ -51,6 +65,8 @@ static ssize_t fault_inject_write(struct file *file, const char __user *buf,
u64 val;
char *nl;
+ warn_deprecated();
+
if (copy_from_user(write_buf, buf, size))
return -EFAULT;
write_buf[size] = '\0';