dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/fs/nfs
Chuck Lever 05f4c350ee NFS: Discover NFSv4 server trunking when mounting
"Server trunking" is a fancy named for a multi-homed NFS server.
Trunking might occur if a client sends NFS requests for a single
workload to multiple network interfaces on the same server.  There
are some implications for NFSv4 state management that make it useful
for a client to know if a single NFSv4 server instance is
multi-homed.  (Note this is only a consideration for NFSv4, not for
legacy versions of NFS, which are stateless).

If a client cares about server trunking, no NFSv4 operations can
proceed until that client determines who it is talking to.  Thus
server IP trunking discovery must be done when the client first
encounters an unfamiliar server IP address.

The nfs_get_client() function walks the nfs_client_list and matches
on server IP address.  The outcome of that walk tells us immediately
if we have an unfamiliar server IP address.  It invokes
nfs_init_client() in this case.  Thus, nfs4_init_client() is a good
spot to perform trunking discovery.

Discovery requires a client to establish a fresh client ID, so our
client will now send SETCLIENTID or EXCHANGE_ID as the first NFS
operation after a successful ping, rather than waiting for an
application to perform an operation that requires NFSv4 state.

The exact process for detecting trunking is different for NFSv4.0 and
NFSv4.1, so a minorversion-specific init_client callout method is
introduced.

CLID_INUSE recovery is important for the trunking discovery process.
CLID_INUSE is a sign the server recognizes the client's nfs_client_id4
id string, but the client is using the wrong principal this time for
the SETCLIENTID operation.  The SETCLIENTID must be retried with a
series of different principals until one works, and then the rest of
trunking discovery can proceed.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-10-01 15:33:33 -07:00
..
blocklayout NFSv4.1: Replace get_device_info() with filelayout_get_device_info() 2012-09-28 16:03:08 -04:00
objlayout pnfs-obj: Better IO pattern in case of unaligned offset 2012-08-02 17:42:51 -04:00
Kconfig Merge branch 'akpm' (Andrew's patch-bomb) 2012-07-31 19:25:39 -07:00
Makefile NFS: Fix a regression when loading the NFS v4 module 2012-08-16 16:15:49 -04:00
cache_lib.c NFS: remove RPC PipeFS mount point references from NFS cache routines 2012-01-31 18:20:26 -05:00
cache_lib.h NFS: DNS resolver PipeFS notifier introduced 2012-01-31 18:20:26 -05:00
callback.c NFS: add debug messages to callback down function 2012-10-01 15:26:06 -07:00
callback.h NFS: make nfs_callback_tcpport6 per network context 2012-10-01 15:25:51 -07:00
callback_proc.c NFSv4.1: Clean up the removal of pnfs_layout_hdr from the server list 2012-09-28 16:03:14 -04:00
callback_xdr.c SUNRPC: service request network namespace helper introduced 2012-07-27 16:49:21 -04:00
client.c NFS: Discover NFSv4 server trunking when mounting 2012-10-01 15:33:33 -07:00
delegation.c NFS: Create a return_delegation rpc op 2012-06-29 11:46:45 -04:00
delegation.h NFS: Convert v4 into a module 2012-07-30 19:06:52 -04:00
dir.c NFSv4: Add ACCESS operation to OPEN compound 2012-10-01 15:20:11 -07:00
direct.c NFS: Convert nfs_get_lock_context to return an ERR_PTR on failure 2012-09-28 16:03:03 -04:00
dns_resolve.c NFS: Convert v4 into a module 2012-07-30 19:06:52 -04:00
dns_resolve.h NFS: DNS resolver cache per network namespace context introduced 2012-01-31 18:20:26 -05:00
file.c NFS: Write the entire file if a server reboot occurs during fsync() 2012-09-28 16:03:05 -04:00
fscache-index.c NFS: Use the inode->i_version to cache NFSv4 change attribute information 2011-10-18 09:14:34 -07:00
fscache.c NFS: Don't pass mount data to nfs_fscache_get_super_cookie() 2012-05-14 17:30:26 -07:00
fscache.h NFS: Fix a compile issue when CONFIG_NFS_FSCACHE was undefined 2012-05-16 10:24:20 -07:00
getroot.c NFS: Move the v4 getroot code to nfs4getroot.c 2012-07-17 13:33:51 -04:00
idmap.c NFS: Use kzalloc() instead of kmalloc() in the idmapper 2012-10-01 15:18:44 -07:00
inode.c NFS: Clean up helper function nfs4_select_rw_stateid() 2012-09-28 16:03:04 -04:00
internal.h NFS: Discover NFSv4 server trunking when mounting 2012-10-01 15:33:33 -07:00
iostat.h NFS: Squelch compiler warning in nfs_add_server_stats() 2010-05-14 15:09:31 -04:00
mount_clnt.c SUNRPC/NFS: Add Kbuild dependencies for NFS_DEBUG/RPC_DEBUG 2012-03-20 13:08:26 -04:00
namespace.c NFS: Convert v4 into a module 2012-07-30 19:06:52 -04:00
netns.h NFS: callback per-net usage counting introduced 2012-10-01 15:25:57 -07:00
nfs.h NFS: Convert v4 into a module 2012-07-30 19:06:52 -04:00
nfs2super.c NFS: Convert v2 into a module 2012-07-30 19:06:41 -04:00
nfs2xdr.c NFS: Let xdr_read_pages() check for buffer overflows 2012-06-28 17:20:43 -04:00
nfs3acl.c NFS: Fix a number of sparse warnings 2012-03-11 15:14:16 -04:00
nfs3client.c NFS: Only initialize the ACL client in the v3 case 2012-07-30 19:05:54 -04:00
nfs3proc.c NFS: Fix the initialisation of the readdir 'cookieverf' array 2012-09-04 14:52:42 -04:00
nfs3super.c NFS: Convert v3 into a module 2012-07-30 19:06:46 -04:00
nfs3xdr.c NFS: Cleanup - only store the write verifier in struct nfs_page 2012-06-28 17:20:50 -04:00
nfs4_fs.h NFS: Discover NFSv4 server trunking when mounting 2012-10-01 15:33:33 -07:00
nfs4client.c NFS: Discover NFSv4 server trunking when mounting 2012-10-01 15:33:33 -07:00
nfs4file.c NFS: Write the entire file if a server reboot occurs during fsync() 2012-09-28 16:03:05 -04:00
nfs4filelayout.c NFSv4.1: Get rid of the NFS_LAYOUT_DESTROYED state 2012-09-28 16:03:16 -04:00
nfs4filelayout.h NFSv4.1: Get rid of pNFS layout state "NFS_LAYOUT_INVALID" 2012-09-28 16:03:12 -04:00
nfs4filelayoutdev.c NFSv4.1: pNFS data servers may be temporarily offline 2012-09-28 16:03:09 -04:00
nfs4getroot.c NFS: Move the v4 getroot code to nfs4getroot.c 2012-07-17 13:33:51 -04:00
nfs4namespace.c SUNRPC: Introduce rpc_clone_client_set_auth() 2012-10-01 15:33:33 -07:00
nfs4proc.c NFS: Discover NFSv4 server trunking when mounting 2012-10-01 15:33:33 -07:00
nfs4renewd.c NFS: Add NFSDBG_STATE 2012-05-22 16:45:42 -04:00
nfs4state.c NFS: Discover NFSv4 server trunking when mounting 2012-10-01 15:33:33 -07:00
nfs4super.c NFS: Fix a regression when loading the NFS v4 module 2012-08-16 16:15:49 -04:00
nfs4sysctl.c NFS: Initialize v4 sysctls from nfs_init_v4() 2012-07-17 13:33:18 -04:00
nfs4xdr.c NFSv4: Add ACCESS operation to OPEN compound 2012-10-01 15:20:11 -07:00
nfsroot.c SUNRPC/NFS: Add Kbuild dependencies for NFS_DEBUG/RPC_DEBUG 2012-03-20 13:08:26 -04:00
pagelist.c NFS: Clean up helper function nfs4_select_rw_stateid() 2012-09-28 16:03:04 -04:00
pnfs.c NFSv4.1: _pnfs_return_layout() shouldn't invalidate the layout on failure 2012-09-28 16:03:18 -04:00
pnfs.h NFSv4.1: Remove the NFS_LAYOUT_RETURNED state 2012-09-28 16:03:17 -04:00
pnfs_dev.c NFSv4.1: pNFS data servers may be temporarily offline 2012-09-28 16:03:09 -04:00
proc.c NFS: Only initialize the ACL client in the v3 case 2012-07-30 19:05:54 -04:00
read.c Merge branch 'akpm' (Andrew's patch-bomb) 2012-07-31 19:25:39 -07:00
super.c NFS: Introduce "migration" mount option 2012-10-01 15:33:33 -07:00
symlink.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sysctl.c NFS: Initialize v4 sysctls from nfs_init_v4() 2012-07-17 13:33:18 -04:00
unlink.c NFS: Create a return_delegation rpc op 2012-06-29 11:46:45 -04:00
write.c NFS: Fix fdatasync/fsync() when confronted with a server reboot 2012-09-28 16:03:05 -04:00