[PATCH RFC 24/24] nfs: add a module parameter to disable directory delegations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


For testing purposes, add a module parameter that will prevent the
client from requesting further directory delegations.

Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
 fs/nfs/nfs4proc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 3dbe9a18c9be..a85a594cad88 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4318,8 +4318,14 @@ static int nfs4_get_referral(struct rpc_clnt *client, struct inode *dir,
 	return status;
+static bool nfs_dir_delegation_enabled = true;
+module_param(nfs_dir_delegation_enabled, bool, 0644);
+MODULE_PARM_DESC(nfs_dir_delegation_enabled, "Enable directory delegations?");
 static bool should_request_dir_deleg(struct inode *inode)
+	if (!nfs_dir_delegation_enabled)
+		return false;
 	if (!inode)
 		return false;
 	if (!S_ISDIR(inode->i_mode))


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux