aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-09-04 10:08:54 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-09-04 12:26:32 -0400
commitf6de7a39c181dfb8a2c534661a53c73afb3081cd (patch)
tree69a0d52d55f0a32e83bba6a0cd20df154a38f06a /fs/nfs/nfs4proc.c
parentef1820f9be27b6ad158f433ab38002ab8131db4d (diff)
NFSv4: Document the recover_lost_locks kernel parameter
Rename the new 'recover_locks' kernel parameter to 'recover_lost_locks' and change the default to 'false'. Document why in Documentation/kernel-parameters.txt Move the 'recover_lost_locks' kernel parameter to fs/nfs/super.c to make it easy to backport to kernels prior to 3.6.x, which don't have a separate NFSv4 module. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 1eb694e0f305..535011a27415 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5523,12 +5523,6 @@ static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *request
5523 return err; 5523 return err;
5524} 5524}
5525 5525
5526bool recover_locks = true;
5527module_param(recover_locks, bool, 0644);
5528MODULE_PARM_DESC(recover_locks,
5529 "If the server reports that a lock might be lost, "
5530 "try to recovery it risking corruption.");
5531
5532static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request) 5526static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request)
5533{ 5527{
5534 struct nfs_server *server = NFS_SERVER(state->inode); 5528 struct nfs_server *server = NFS_SERVER(state->inode);
@@ -5540,7 +5534,7 @@ static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request
5540 err = nfs4_set_lock_state(state, request); 5534 err = nfs4_set_lock_state(state, request);
5541 if (err != 0) 5535 if (err != 0)
5542 return err; 5536 return err;
5543 if (!recover_locks) { 5537 if (!recover_lost_locks) {
5544 set_bit(NFS_LOCK_LOST, &request->fl_u.nfs4_fl.owner->ls_flags); 5538 set_bit(NFS_LOCK_LOST, &request->fl_u.nfs4_fl.owner->ls_flags);
5545 return 0; 5539 return 0;
5546 } 5540 }