alistair23-linux/fs/nfs
NeilBrown ef1820f9be NFSv4: Don't try to recover NFSv4 locks when they are lost.
When an NFSv4 client loses contact with the server it can lose any
locks that it holds.

Currently when it reconnects to the server it simply tries to reclaim
those locks.  This might succeed even though some other client has
held and released a lock in the mean time.  So the first client might
think the file is unchanged, but it isn't.  This isn't good.

If, when recovery happens, the locks cannot be claimed because some
other client still holds the lock, then we get a message in the kernel
logs, but the client can still write.  So two clients can both think
they have a lock and can both write at the same time.  This is equally
not good.

There was a patch a while ago
  http://comments.gmane.org/gmane.linux.nfs/41917

which tried to address some of this, but it didn't seem to go
anywhere.  That patch would also send a signal to the process.  That
might be useful but for now this patch just causes writes to fail.

For NFSv4 (unlike v2/v3) there is a strong link between the lock and
the write request so we can fairly easily fail any IO of the lock is
gone.  While some applications might not expect this, it is still
safer than allowing the write to succeed.

Because this is a fairly big change in behaviour a module parameter,
"recover_locks", is introduced which defaults to true (the current
behaviour) but can be set to "false" to tell the client not to try to
recover things that were lost.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2013-09-04 12:26:32 -04:00
..
blocklayout NFSv4.1 use pnfs_device maxcount for the blocklayout gdia_maxcount 2013-06-28 15:34:44 -04:00
objlayout NFSv4.1 use pnfs_device maxcount for the objectlayout gdia_maxcount 2013-06-28 15:34:45 -04:00
cache_lib.c
cache_lib.h
callback.c NFS client updates for Linux 3.11 2013-07-09 12:09:43 -07:00
callback.h NFS: Add in v4.2 callback operation 2013-06-08 16:20:18 -04:00
callback_proc.c NFS: When displaying session slot numbers, use "%u" consistently 2013-09-03 15:26:30 -04:00
callback_xdr.c Merge branch 'labeled-nfs' into linux-next 2013-06-28 16:29:51 -04:00
client.c NFS Remove unused authflavour parameter from init_client 2013-08-07 13:09:30 -04:00
delegation.c NFSv4: Add tracepoints for debugging delegations 2013-08-22 08:58:24 -04:00
delegation.h
dir.c NFS: Ensure that rmdir() waits for sillyrenames to complete 2013-09-03 15:26:29 -04:00
direct.c
dns_resolve.c NFSv4: Move the DNS resolver into the NFSv4 module 2013-06-18 13:47:18 -04:00
dns_resolve.h
file.c NFS avoid expired credential keys for buffered writes 2013-09-03 15:25:09 -04:00
fscache-index.c
fscache.c
fscache.h
getroot.c NFS:Add labels to client function prototypes 2013-06-08 16:20:15 -04:00
idmap.c NFSv4: Convert idmapper to use the new framework for pipefs dentries 2013-09-01 11:12:42 -04:00
inode.c NFS: Add event tracing for generic NFS events 2013-08-22 08:58:17 -04:00
internal.h NFS avoid expired credential keys for buffered writes 2013-09-03 15:25:09 -04:00
iostat.h
Kconfig Kconfig: Add Kconfig entry for Labeled NFS V4 client 2013-06-08 16:20:17 -04:00
Makefile NFS: Enable slot table helpers for NFSv4.0 2013-09-03 15:26:33 -04:00
mount_clnt.c nfs: have nfs_mount fake up a auth_flavs list when the server didn't provide it 2013-06-28 15:51:51 -04:00
namespace.c NFS:Add labels to client function prototypes 2013-06-08 16:20:15 -04:00
netns.h
nfs.h
nfs2super.c
nfs2xdr.c
nfs3acl.c
nfs3client.c
nfs3proc.c NFSv4: Don't try to recover NFSv4 locks when they are lost. 2013-09-04 12:26:32 -04:00
nfs3super.c
nfs3xdr.c
nfs4_fs.h NFSv4: Don't try to recover NFSv4 locks when they are lost. 2013-09-04 12:26:32 -04:00
nfs4client.c NFS: Add a slot table to struct nfs_client for NFSv4.0 transport blocking 2013-09-03 15:26:35 -04:00
nfs4file.c
nfs4filelayout.c NFSv4: Add tracepoints for debugging reads and writes 2013-08-22 08:58:26 -04:00
nfs4filelayout.h
nfs4filelayoutdev.c NFSv4.1 Fix gdia_maxcount calculation to fit in ca_maxresponsesize 2013-06-28 15:34:43 -04:00
nfs4getroot.c
nfs4namespace.c
nfs4proc.c NFSv4: Don't try to recover NFSv4 locks when they are lost. 2013-09-04 12:26:32 -04:00
nfs4renewd.c
nfs4session.c When CONFIG_NFS_V4_1 is not enabled, "make C=2" emits this warning: 2013-09-04 12:26:30 -04:00
nfs4session.h When CONFIG_NFS_V4_1 is not enabled, "make C=2" emits this warning: 2013-09-04 12:26:30 -04:00
nfs4state.c NFSv4: Don't try to recover NFSv4 locks when they are lost. 2013-09-04 12:26:32 -04:00
nfs4super.c NFSv4: Move the DNS resolver into the NFSv4 module 2013-06-18 13:47:18 -04:00
nfs4sysctl.c
nfs4trace.c NFSv4.1: Add tracepoints for debugging slot table operations 2013-08-22 08:58:27 -04:00
nfs4trace.h NFSv4.1: Add tracepoints for debugging test_stateid events 2013-08-22 08:58:27 -04:00
nfs4xdr.c NFS: NFSv4.0 transport blocking 2013-09-03 15:26:35 -04:00
nfsroot.c
nfstrace.c NFS: Add event tracing for generic NFS lookups 2013-08-22 08:58:18 -04:00
nfstrace.h NFS: Add tracepoints for debugging NFS hard links 2013-08-22 08:58:20 -04:00
pagelist.c
pnfs.c NFSv4: Add tracepoints for debugging reads and writes 2013-08-22 08:58:26 -04:00
pnfs.h NFSv4.1 Fix gdia_maxcount calculation to fit in ca_maxresponsesize 2013-06-28 15:34:43 -04:00
pnfs_dev.c
proc.c NFSv4: Don't try to recover NFSv4 locks when they are lost. 2013-09-04 12:26:32 -04:00
read.c NFSv4: Don't try to recover NFSv4 locks when they are lost. 2013-09-04 12:26:32 -04:00
super.c NFSv4: Refuse mount attempts with proto=udp 2013-08-07 12:37:04 -04:00
symlink.c
sysctl.c
unlink.c NFS: Ensure that rmdir() waits for sillyrenames to complete 2013-09-03 15:26:29 -04:00
write.c NFSv4: Don't try to recover NFSv4 locks when they are lost. 2013-09-04 12:26:32 -04:00