Commit 99dc2ef
committed
NFSD: CREATE_SESSION must never cache NFS4ERR_DELAY replies
There are one or two cases where CREATE_SESSION returns
NFS4ERR_DELAY in order to force the client to wait a bit and try
CREATE_SESSION again. However, after commit e4469c6 ("NFSD: Fix
the NFSv4.1 CREATE_SESSION operation"), NFSD caches that response in
the CREATE_SESSION slot. Thus, when the client resends the
CREATE_SESSION, the server always returns the cached NFS4ERR_DELAY
response rather than actually executing the request and properly
recording its outcome. This blocks the client from making further
progress.
RFC 8881 Section 15.1.1.3 says:
> If NFS4ERR_DELAY is returned on an operation other than SEQUENCE
> that validly appears as the first operation of a request ... [t]he
> request can be retried in full without modification. In this case
> as well, the replier MUST avoid returning a response containing
> NFS4ERR_DELAY as the response to an initial operation of a request
> solely on the basis of its presence in the reply cache.
Neither the original NFSD code nor the discussion in section 18.36.4
refer explicitly to this important requirement, so I missed it.
Note also that not only must the server not cache NFS4ERR_DELAY, but
it has to not advance the CREATE_SESSION slot sequence number so
that it can properly recognize and accept the client's retry.
Reported-by: Dai Ngo <[email protected]>
Fixes: e4469c6 ("NFSD: Fix the NFSv4.1 CREATE_SESSION operation")
Tested-by: Dai Ngo <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>1 parent 6978bd6 commit 99dc2ef
1 file changed
+25
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3831 | 3831 | | |
3832 | 3832 | | |
3833 | 3833 | | |
3834 | | - | |
3835 | | - | |
3836 | | - | |
3837 | | - | |
3838 | | - | |
| 3834 | + | |
| 3835 | + | |
| 3836 | + | |
| 3837 | + | |
| 3838 | + | |
| 3839 | + | |
| 3840 | + | |
| 3841 | + | |
| 3842 | + | |
| 3843 | + | |
| 3844 | + | |
| 3845 | + | |
3839 | 3846 | | |
3840 | 3847 | | |
3841 | | - | |
3842 | | - | |
3843 | 3848 | | |
3844 | 3849 | | |
3845 | 3850 | | |
| |||
3859 | 3864 | | |
3860 | 3865 | | |
3861 | 3866 | | |
3862 | | - | |
3863 | | - | |
3864 | | - | |
3865 | | - | |
| 3867 | + | |
| 3868 | + | |
3866 | 3869 | | |
3867 | 3870 | | |
3868 | 3871 | | |
| |||
3894 | 3897 | | |
3895 | 3898 | | |
3896 | 3899 | | |
| 3900 | + | |
| 3901 | + | |
| 3902 | + | |
| 3903 | + | |
| 3904 | + | |
| 3905 | + | |
| 3906 | + | |
| 3907 | + | |
| 3908 | + | |
| 3909 | + | |
| 3910 | + | |
3897 | 3911 | | |
3898 | 3912 | | |
3899 | 3913 | | |
| |||
0 commit comments