1. 17 Jun, 2024 1 commit
  2. 03 Jun, 2024 1 commit
  3. 09 May, 2024 2 commits
    • Chuck Lever's avatar
      NFSD: Force all NFSv4.2 COPY requests to be synchronous · 8d915bbf
      Chuck Lever authored
      We've discovered that delivering a CB_OFFLOAD operation can be
      unreliable in some pretty unremarkable situations. Examples
      include:
      
       - The server dropped the connection because it lost a forechannel
         NFSv4 request and wishes to force the client to retransmit
       - The GSS sequence number window under-flowed
       - A network partition occurred
      
      When that happens, all pending callback operations, including
      CB_OFFLOAD, are lost. NFSD does not retransmit them.
      
      Moreover, the Linux NFS client does not yet support sending an
      OFFLOAD_STATUS operation to probe whether an asynchronous COPY
      operation has finished. Thus, on Linux NFS clients, when a
      CB_OFFLOAD is lost, asynchronous COPY can hang until manually
      interrupted.
      
      I've tried a couple of remedies, but so far the side-effects are
      worse than the disease and they have had to be reverted. So
      temporarily force COPY operations to be synchronous so that the use
      of CB_OFFLOAD is avoided entirely. This is a fix that can easily be
      backported to LTS kernels. I am working on client patches that
      introduce an implementation of OFFLOAD_STATUS.
      
      Note that NFSD arbitrarily limits the size of a copy_file_range
      to 4MB to avoid indefinitely blocking an nfsd thread. A short
      COPY result is returned in that case, and the client can present
      a fresh COPY request for the remainder.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      8d915bbf
    • Chuck Lever's avatar
      SUNRPC: Fix gss_free_in_token_pages() · bafa6b4d
      Chuck Lever authored
      Dan Carpenter says:
      > Commit 5866efa8 ("SUNRPC: Fix svcauth_gss_proxy_init()") from Oct
      > 24, 2019 (linux-next), leads to the following Smatch static checker
      > warning:
      >
      > 	net/sunrpc/auth_gss/svcauth_gss.c:1039 gss_free_in_token_pages()
      > 	warn: iterator 'i' not incremented
      >
      > net/sunrpc/auth_gss/svcauth_gss.c
      >     1034 static void gss_free_in_token_pages(struct gssp_in_token *in_token)
      >     1035 {
      >     1036         u32 inlen;
      >     1037         int i;
      >     1038
      > --> 1039         i = 0;
      >     1040         inlen = in_token->page_len;
      >     1041         while (inlen) {
      >     1042                 if (in_token->pages[i])
      >     1043                         put_page(in_token->pages[i]);
      >                                                          ^
      > This puts page zero over and over.
      >
      >     1044                 inlen -= inlen > PAGE_SIZE ? PAGE_SIZE : inlen;
      >     1045         }
      >     1046
      >     1047         kfree(in_token->pages);
      >     1048         in_token->pages = NULL;
      >     1049 }
      
      Based on the way that the ->pages[] array is constructed in
      gss_read_proxy_verf(), we know that once the loop encounters a NULL
      page pointer, the remaining array elements must also be NULL.
      Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
      Suggested-by: default avatarTrond Myklebust <trondmy@hammerspace.com>
      Fixes: 5866efa8 ("SUNRPC: Fix svcauth_gss_proxy_init()")
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      bafa6b4d
  4. 06 May, 2024 27 commits
  5. 05 May, 2024 9 commits