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
@@ -122,6 +122,12 @@ idtoname_hash(struct ent *ent)
|
||||
return hash;
|
||||
}
|
||||
|
||||
static int
|
||||
idtoname_upcall(struct cache_detail *cd, struct cache_head *h)
|
||||
{
|
||||
return sunrpc_cache_pipe_upcall_timeout(cd, h);
|
||||
}
|
||||
|
||||
static void
|
||||
idtoname_request(struct cache_detail *cd, struct cache_head *ch, char **bpp,
|
||||
int *blen)
|
||||
@@ -184,6 +190,7 @@ static const struct cache_detail idtoname_cache_template = {
|
||||
.hash_size = ENT_HASHMAX,
|
||||
.name = "nfs4.idtoname",
|
||||
.cache_put = ent_put,
|
||||
.cache_upcall = idtoname_upcall,
|
||||
.cache_request = idtoname_request,
|
||||
.cache_parse = idtoname_parse,
|
||||
.cache_show = idtoname_show,
|
||||
@@ -295,6 +302,12 @@ nametoid_hash(struct ent *ent)
|
||||
return hash_str(ent->name, ENT_HASHBITS);
|
||||
}
|
||||
|
||||
static int
|
||||
nametoid_upcall(struct cache_detail *cd, struct cache_head *h)
|
||||
{
|
||||
return sunrpc_cache_pipe_upcall_timeout(cd, h);
|
||||
}
|
||||
|
||||
static void
|
||||
nametoid_request(struct cache_detail *cd, struct cache_head *ch, char **bpp,
|
||||
int *blen)
|
||||
@@ -347,6 +360,7 @@ static const struct cache_detail nametoid_cache_template = {
|
||||
.hash_size = ENT_HASHMAX,
|
||||
.name = "nfs4.nametoid",
|
||||
.cache_put = ent_put,
|
||||
.cache_upcall = nametoid_upcall,
|
||||
.cache_request = nametoid_request,
|
||||
.cache_parse = nametoid_parse,
|
||||
.cache_show = nametoid_show,
|
||||
|
Reference in New Issue
Block a user