linux_dsm_epyc7002/include/linux/sunrpc
Kinglong Mee d6fc8821c2 SUNRPC/Cache: Always treat the invalid cache as unexpired
When the first time pynfs runs after rpc/nfsd startup, always get the warning,

"Got error: Connection closed"

I found the problem is caused by,
1. A new startup of nfsd, rpc.mountd, etc,
2. A rpc request from client (pynfs test, or normal mounting),
3. An ip_map cache is created but invalid, so upcall to rpc.mountd,
4. rpc.mountd process the ip_map upcall, before write the valid data to nfsd,
   do auth_reload(), and check_useipaddr(),
5. For the first time, old_use_ipaddr = -1, it causes rpc.mountd do write_flush    that doing cache_clean,
6. The ip_map cache will be treat as expired and clean,
7. When rpc.mountd write the valid data to nfsd, a new ip_map is created
   and updated, the cache_check of old ip_map(doing the upcall) will
   return -ETIMEDOUT.
8. RPC layer return SVC_CLOSE and close the xprt after commit 4d712ef1db
   "svcauth_gss: Close connection when dropping an incoming message"

NeilBrown suggest in another email,

"If CACHE_VALID is not set, then there is no data in the cache item,
 so there is nothing to expire. So it would be nice if cache items that
 don't have CACHE_VALID are never treated as expired."

v3, change the order of the two patches
v2, change the checking of CACHE_PENDING to CACHE_VALID

Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2017-02-08 16:49:53 -05:00
..
addr.h
auth_gss.h
auth.h sunrpc: add hash_cred() function to rpc_authops struct 2016-09-30 15:28:46 -04:00
bc_xprt.h
cache.h SUNRPC/Cache: Always treat the invalid cache as unexpired 2017-02-08 16:49:53 -05:00
clnt.h SUNRPC: cleanup ida information when removing sunrpc module 2017-01-24 15:29:24 -05:00
debug.h
gss_api.h xprtrdma: No direct data placement with krb5i and krb5p 2016-07-11 15:50:43 -04:00
gss_asn1.h
gss_err.h
gss_krb5_enctypes.h
gss_krb5.h sunrpc: Use skcipher and ahash/shash 2016-01-27 20:36:01 +08:00
metrics.h
msg_prot.h sunrpc: Update RPCBIND_MAXNETIDLEN 2016-05-17 15:47:56 -04:00
rpc_pipe_fs.h
rpc_rdma.h svcrdma: Another sendto chunk list parsing update 2017-02-08 14:41:24 -05:00
sched.h SUNRPC: Generalize the RPC buffer release API 2016-09-19 13:08:37 -04:00
stats.h
svc_rdma.h svcrdma: Combine list fields in struct svc_rdma_op_ctxt 2017-02-08 14:42:00 -05:00
svc_xprt.h sunrpc: don't call sleeping functions from the notifier block callbacks 2017-01-12 15:56:40 -05:00
svc.h SUNRPC: Add a server side per-connection limit 2016-07-13 15:53:48 -04:00
svcauth_gss.h
svcauth.h vfs: make the string hashes salt the hash 2016-06-10 20:21:46 -07:00
svcsock.h
timer.h
types.h
xdr.h SUNRPC: Refactor rpc_xdr_buf_init() 2016-09-19 13:08:37 -04:00
xprt.h SUNRPC: Add a transport-specific private field in rpc_rqst 2016-09-19 13:08:37 -04:00
xprtmultipath.h SUNRPC search xprt switch for sockaddr 2016-09-19 13:08:36 -04:00
xprtrdma.h xprtrdma: Support larger inline thresholds 2016-09-19 13:08:38 -04:00
xprtsock.h SUNRPC: Small optimisation of client receive 2016-06-13 12:35:51 -04:00