Allow newnfs_request() to retry all callback RPCs with an NFSERR_DELAY reply.
The code in newnfs_request() retries RPCs that get a reply of NFSERR_DELAY, but exempts certain NFSv4 operations. However, for callback RPCs, there should not be any exemptions at this time. The code would have erroneously exempted the CBRECALL callback, since it has the same operation number as the CLOSE operation. This patch fixes this by checking for a callback RPC (indicated by clp != NULL) and not checking for exempt operations for callbacks. This would have only affected the NFSv4 server when delegations are enabled (they are not enabled by default) and the client replies to CBRECALL with NFSERR_DELAY. This may never actually happen. Spotted during code inspection. MFC after: 2 weeks
This commit is contained in:
parent
2d7cd4e947
commit
616b289c91
@ -1052,10 +1052,14 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
|
||||
NFSCL_DEBUG(1, "Got err=%d\n", reterr);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* When clp != NULL, it is a callback and all
|
||||
* callback operations can be retried for NFSERR_DELAY.
|
||||
*/
|
||||
if (((nd->nd_repstat == NFSERR_DELAY ||
|
||||
nd->nd_repstat == NFSERR_GRACE) &&
|
||||
(nd->nd_flag & ND_NFSV4) &&
|
||||
nd->nd_procnum != NFSPROC_DELEGRETURN &&
|
||||
(nd->nd_flag & ND_NFSV4) && (clp != NULL ||
|
||||
(nd->nd_procnum != NFSPROC_DELEGRETURN &&
|
||||
nd->nd_procnum != NFSPROC_SETATTR &&
|
||||
nd->nd_procnum != NFSPROC_READ &&
|
||||
nd->nd_procnum != NFSPROC_READDS &&
|
||||
@ -1067,7 +1071,7 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
|
||||
nd->nd_procnum != NFSPROC_OPENDOWNGRADE &&
|
||||
nd->nd_procnum != NFSPROC_CLOSE &&
|
||||
nd->nd_procnum != NFSPROC_LOCK &&
|
||||
nd->nd_procnum != NFSPROC_LOCKU) ||
|
||||
nd->nd_procnum != NFSPROC_LOCKU))) ||
|
||||
(nd->nd_repstat == NFSERR_DELAY &&
|
||||
(nd->nd_flag & ND_NFSV4) == 0) ||
|
||||
nd->nd_repstat == NFSERR_RESOURCE) {
|
||||
|
Loading…
Reference in New Issue
Block a user