1. 27 Mar, 2024 1 commit
    • Chuck Lever's avatar
      NFSD: CREATE_SESSION must never cache NFS4ERR_DELAY replies · 99dc2ef0
      Chuck Lever authored
      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 e4469c6c ("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: default avatarDai Ngo <dai.ngo@oracle.com>
      Fixes: e4469c6c ("NFSD: Fix the NFSv4.1 CREATE_SESSION operation")
      Tested-by: default avatarDai Ngo <dai.ngo@oracle.com>
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      99dc2ef0
  2. 22 Mar, 2024 2 commits
  3. 09 Mar, 2024 1 commit
    • Chuck Lever's avatar
      NFSD: Clean up nfsd4_encode_replay() · 9b350d3e
      Chuck Lever authored
      Replace open-coded encoding logic with the use of conventional XDR
      utility functions. Add a tracepoint to make replays observable in
      field troubleshooting situations.
      
      The WARN_ON is removed. A stack trace is of little use, as there is
      only one call site for nfsd4_encode_replay(), and a buffer length
      shortage here is unlikely.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      9b350d3e
  4. 05 Mar, 2024 2 commits
  5. 01 Mar, 2024 34 commits