nfsd: export upcalls must not return ESTALE when mountd is down
If the rpc.mountd daemon goes down, then that should not cause all exports to start failing with ESTALE errors. Let's explicitly distinguish between the cache upcall cases that need to time out, and those that do not. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
committed by
Chuck Lever
parent
6a30e47fa0
commit
65286b883c
@ -180,6 +180,11 @@ static struct cache_head *rsi_alloc(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int rsi_upcall(struct cache_detail *cd, struct cache_head *h)
|
||||
{
|
||||
return sunrpc_cache_pipe_upcall_timeout(cd, h);
|
||||
}
|
||||
|
||||
static void rsi_request(struct cache_detail *cd,
|
||||
struct cache_head *h,
|
||||
char **bpp, int *blen)
|
||||
@ -278,6 +283,7 @@ static const struct cache_detail rsi_cache_template = {
|
||||
.hash_size = RSI_HASHMAX,
|
||||
.name = "auth.rpcsec.init",
|
||||
.cache_put = rsi_put,
|
||||
.cache_upcall = rsi_upcall,
|
||||
.cache_request = rsi_request,
|
||||
.cache_parse = rsi_parse,
|
||||
.match = rsi_match,
|
||||
@ -424,6 +430,11 @@ rsc_alloc(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int rsc_upcall(struct cache_detail *cd, struct cache_head *h)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int rsc_parse(struct cache_detail *cd,
|
||||
char *mesg, int mlen)
|
||||
{
|
||||
@ -550,6 +561,7 @@ static const struct cache_detail rsc_cache_template = {
|
||||
.hash_size = RSC_HASHMAX,
|
||||
.name = "auth.rpcsec.context",
|
||||
.cache_put = rsc_put,
|
||||
.cache_upcall = rsc_upcall,
|
||||
.cache_parse = rsc_parse,
|
||||
.match = rsc_match,
|
||||
.init = rsc_init,
|
||||
|
Reference in New Issue
Block a user