1. 23 Jun, 2022 1 commit
  2. 18 Jun, 2022 1 commit
  3. 17 Jun, 2022 2 commits
    • Rick Macklem's avatar
      nfscl: Clean up the code by removing unused arguments · 3c4266ed
      Rick Macklem authored
      The "void *stuff" (also called fstuff and dstuff) argument
      was used by the Mac OSX port.  For FreeBSD, this argument
      is always NULL, so remove it to clean up the code.
      
      This commit gets rid of "stuff" for assorted functions
      defined in nfs_clrpcops.c and called in nfs_clvnops.c and
      nfs_clstate.c.
      
      This commit should not result in a semantics change.
      3c4266ed
    • Rick Macklem's avatar
      nfscl: Clean up the code by removing unused arguments · 1e70163c
      Rick Macklem authored
      The "void *stuff" (also called fstuff and dstuff) argument
      was used by the Mac OSX port.  For FreeBSD, this argument
      is always NULL, so remove it to clean up the code.
      
      This commit gets rid of "stuff" for assorted functions
      defined in nfs_clrpcops.c and called in nfs_clvnops.c and
      nfs_clvfsops.c. Future commits will do the same for other functions.
      
      This commit should not result in a semantics change.
      1e70163c
  4. 16 Jun, 2022 2 commits
    • Rick Macklem's avatar
      nfscl: Clean up the code by removing unused arguments · c692ea40
      Rick Macklem authored
      The "void *stuff" (also called fstuff and dstuff) argument
      was used by the Mac OSX port.  For FreeBSD, this argument
      is always NULL, so remove it to clean up the code.
      
      This commit gets rid of "stuff" for assorted functions
      defined in nfs_clrpcops.c and called in nfs_clvnops.c.
      Future commits will do the same for other functions.
      
      This commit should not result in a semantics change.
      c692ea40
    • Rick Macklem's avatar
      nfscl: Clean up the code by removing unused arguments · af6665e0
      Rick Macklem authored
      The "void *stuff" (also called fstuff and dstuff) argument
      was used by the Mac OSX port.  For FreeBSD, this argument
      is always NULL, so remove it to clean up the code.
      
      This commit gets rid of "stuff" for assorted functions
      defined in nfs_clrpcops.c and called in nfs_clvnops.c.
      Future commits will do the same for other functions.
      
      This commit should not result in a semantics change.
      af6665e0
  5. 15 Jun, 2022 2 commits
    • Rick Macklem's avatar
      nfscl: Clean up the code by removing unused arguments · 8cb42d69
      Rick Macklem authored
      The "void *stuff" (also called fstuff and dstuff) argument
      was used by the Mac OSX port.  For FreeBSD, this argument
      is always NULL, so remove it to clean up the code.
      
      This commit gets rid of "stuff" for assorted functions
      defined in nfs_clrpcops.c and called in nfs_clvnops.c.
      Future commits will do the same for other functions.
      
      This commit should not result in a semantics change.
      8cb42d69
    • Rick Macklem's avatar
      nfscl: Clean up the code by removing unused arguments · da47c186
      Rick Macklem authored
      The "void *stuff" (also called fstuff and dstuff) argument
      was used by the Mac OSX port.  For FreeBSD, this argument
      is always NULL, so remove it to clean up the code.
      
      This commit gets rid of "stuff" for assorted functions
      defined in nfs_clrpcops.c and called in nfs_clvnops.c.
      Future commits will do the same for other functions.
      
      This commit should not result in a semantics change.
      da47c186
  6. 14 Jun, 2022 1 commit
    • Rick Macklem's avatar
      nfscl: Clean up the code by removing unused arguments · 1c665e95
      Rick Macklem authored
      The "void *stuff" (also called fstuff and dstuff) argument
      was used by the Mac OSX port.  For FreeBSD, this argument
      is always NULL, so remove it to clean up the code.
      
      This commit gets rid of "stuff" for assorted functions
      defined in nfs_clrpcops.c and called in nfs_clvnops.c.
      Future commits will do the same for other functions.
      
      This commit should not result in a semantics change.
      1c665e95
  7. 13 Jun, 2022 1 commit
    • Rick Macklem's avatar
      nfscl: Clean up the code by removing unused arguments · 41c029d5
      Rick Macklem authored
      The "void *stuff" (also called fstuff and dstuff) argument
      was used by the Mac OSX port.  For FreeBSD, this argument
      is always NULL, so remove it to clean up the code.
      
      This commit gets rid of "stuff" for assorted functions
      defined in nfs_clrpcops.c and called in nfs_clvnops.c.
      Future commits will do the same for other functions.
      
      This commit should not result in a semantics change.
      41c029d5
  8. 27 May, 2022 2 commits
    • Rick Macklem's avatar
      nfscl: Add a diagnostic printf() for a "should never happen" case · a7bb120f
      Rick Macklem authored
      When a NFSv4.1/4.2 session to the NFS server (not a pNFS DS) is
      replaced, the old session should always be marked defunct by
      nfsess_defunct being set non-zero.
      
      However, the hang reported by the PR suggests that this might
      be the case.
      
      This patch adds a printf() to indicate this has somehow happened.
      
      PR:	260011
      MFC after: 	2 weeks
      a7bb120f
    • Rick Macklem's avatar
      nfscl: Do not handle NFSERR_BADSESSION in operation code · 425e5c73
      Rick Macklem authored
      The NFSERR_BADSESSION reply from a NFSv4.1/4.2 server
      is handled by newnfs_request().  It should not be handled
      separately after newnfs_request() has returned.
      
      These two cases were spotted during code inspection.
      One of them should only redo what newnfs_request() already
      did by the same "nfscl" thread.  The other might have
      resulted in recovery being done twice, but the code is
      only used for "pnfs" mounts, so that would be rare.
      Also, since NFSERR_BADSESSION should only be replied by
      a server after the server reboots, this would be extremely
      rare.
      
      MFC after: 	2 weeks
      425e5c73
  9. 03 May, 2022 1 commit
    • Rick Macklem's avatar
      nfscl: Acquire a refcount on "cred" for mirrored pNFS RPCs · 70910e4b
      Rick Macklem authored
      When the NFSv4.1/4.2 client is doing a pnfs mount to
      mirrored DS(s), asynchronous threads are used to do the
      RPCs against the DS(s) concurrently.  If a DS is slow
      to reply, it is possible for the "cred" to be free'd
      before the asynchronous thread is done with it, causing
      a panic/crash.
      
      This patch fixes the problem by acquiring a refcount on
      the "cred" while it is being used by the asynchronous thread
      for a DS RPC.  This bug was found during a recent IETF
      NFSv4 testing event.
      
      This bug only affects "pnfs" mounts to mirrored pNFS
      servers.
      
      MFC after:	2 weeks
      70910e4b
  10. 30 Apr, 2022 1 commit
    • Rick Macklem's avatar
      nfscl: Add support for a NFSv4 AppendWrite RPC · 5218d82c
      Rick Macklem authored
      For IO_APPEND VOP_WRITE()s, the code first does a
      Getattr RPC to acquire the file's size, before it
      can do the Write RPC.
      
      Although NFS does not have an append write operation,
      an NFSv4 compound can use a Verify operation to check
      that the client's notion of the file's size is
      correct, followed by the Write operation.
      
      This patch modifies the NFSv4 client to use an Appendwrite
      RPC, which does a Verify to check the file's size before
      doing the Write.  This avoids the need for a Getattr RPC
      to preceed this RPC and reduces the RPC count by half for
      IO_APPEND writes, so long as the client knows the file's
      size.
      
      The nfsd structure was moved from the stack to be malloc()'d,
      since the kernel stack limit was being exceeded.
      
      While here, fix the types of a few variables, although
      there should not be any semantics change caused by these
      type changes.
      5218d82c
  11. 16 Apr, 2022 1 commit
    • Rick Macklem's avatar
      nfscl: Clean up the code by removing unused arguments · 32c3e0f0
      Rick Macklem authored
      The "void *stuff" (also called fstuff and dstuff) argument
      was used by the Mac OSX port.  For FreeBSD, this argument
      is always NULL, so remove it to clean up the code.
      
      This commit gets rid of "stuff" for assorted functions
      local to nfs_clrpcops.c.
      Future commits will do the same for other functions.
      32c3e0f0
  12. 14 Apr, 2022 1 commit
    • Rick Macklem's avatar
      nfscl: Clean up the code by removing unused arguments · 068fc057
      Rick Macklem authored
      The "void *stuff" (also called fstuff and dstuff) argument
      was used by the Mac OSX port.  For FreeBSD, this argument
      is always NULL, so remove it to clean up the code.
      
      This commit gets rid of "stuff" for nfscl_nget().
      Future commits will do the same for other functions.
      068fc057
  13. 13 Apr, 2022 1 commit
    • Rick Macklem's avatar
      nfscl: Clean up the code by removing unused arguments · 4ad3423b
      Rick Macklem authored
      The "void *stuff" (also called fstuff and dstuff) argument
      was used by the Mac OSX port.  For FreeBSD, this argument
      is always NULL, so remove it to clean up the code.
      
      This commit gets rid of "stuff" for nfscl_loadattrcache().
      Future commits will do the same for other functions.
      4ad3423b
  14. 10 Apr, 2022 2 commits
    • Rick Macklem's avatar
      nfscl: Clean up the code by removing unused arguments · 5580e5bd
      Rick Macklem authored
      The "void *stuff" (also called fstuff and dstuff) argument
      was used by the Mac OSX port.  For FreeBSD, this argument
      is always NULL, so remove it to clean up the code.
      
      This commit gets rid of "stuff" for nfscl_request().
      Future commits will do the same for other functions.
      5580e5bd
    • Rick Macklem's avatar
      nfscl: Clean up the code by removing unused arguments · 38c3cf6a
      Rick Macklem authored
      The "void *stuff" (also called fstuff and dstuff) argument
      was used by the Mac OSX port.  For FreeBSD, this argument
      is always NULL, so remove it to clean up the code.
      
      This commit gets rid of "stuff" for nfscl_postop_attr().
      Future commits will do the same for other functions.
      38c3cf6a
  15. 08 Apr, 2022 1 commit
    • Rick Macklem's avatar
      nfscl: Add support for a NFSv4 AppendWrite RPC · 21de450a
      Rick Macklem authored
      For IO_APPEND VOP_WRITE()s, the code first does a
      Getattr RPC to acquire the file's size, before it
      can do the Write RPC.
      
      Although NFS does not have an append write operation,
      an NFSv4 compound can use a Verify operation to check
      that the client's notion of the file's size is
      correct, followed by the Write operation.
      
      This patch modifies nfscl_wcc_data() to optionally
      acquire the file's size, for use with an AppendWrite.
      Although the "stuff" arguments are always NULL
      (these were used for the Mac OSX port and should be
      cleared out someday), make the argument to
      nfscl_wcc_data() explicitly NULL for clarity.
      
      This patch does not cause any semantics change until
      the AppendWrite is added in a future commit.
      21de450a
  16. 13 Mar, 2022 1 commit
    • Rick Macklem's avatar
      nfscl: Fix NFSv4.1/4.2 Lookup+Open RPC · 57014f21
      Rick Macklem authored
      Use of the Lookup+Open RPC is currently disabled,
      due to a problem detected during testing.  This
      patch fixes this problem.  The problem was that
      nfscl_postop_attr() does not parse the attributes
      if nd_repstat != 0.  It also would parse the
      return status for the operation, where the
      Lookup+Open code had already parsed it.
      
      The first change in the patch does not make any
      semantics change, but makes the code identical
      to what is done later in the function, so that
      it is apparent that the semantics should be the
      same in both places.
      
      Lookup+Open remains disabled while further
      testing is being done, so this patch has no
      effect at this time.
      57014f21
  17. 11 Jan, 2022 2 commits
    • Rick Macklem's avatar
      nfsd: Do not accept audit/alarm ACEs for the NFSv4 server · a91a5784
      Rick Macklem authored
      The UFS and ZFS file systems only support Allow/Deny ACEs
      in the NFSv4 ACLs.  This patch does not allow the server
      to parse Audit/Alarm ACEs.  The NFSv4 client is still
      allowed to pase Audit/Alarm ACEs, since non-FreeBSD NFSv4
      servers may use them.
      
      This patch should not have a significant effect, since the
      UFS and ZFS file systems will not handle these ACEs anyhow.
      It simply serves as an additional "safety belt" for the
      NFSv4 server.
      
      MFC after:	2 weeks
      a91a5784
    • Rick Macklem's avatar
      Revert "nfscommon: Add arguments for support of the dacl attribute" · 5da9b3b0
      Rick Macklem authored
      This reverts commit 0fa074b5.
      
      I now see that the implementation of the "dacl" operation
      requires that the NFSv4 server to "automatic inheritance"
      and I do not plan on doing this.  As such, this patch is
      harmless, but unneeded.
      5da9b3b0
  18. 27 Dec, 2021 1 commit
    • Rick Macklem's avatar
      nfscommon: Add arguments for support of the dacl attribute · 0fa074b5
      Rick Macklem authored
      NFSv4.1/4.2 has an alternative to the acl attribute, called
      dacl, that includes support for the ACL_ENTRY_INHERITED flag,
      called NFSV4ACE_INHERITED in NFSv4.
      
      This patch adds a dacl argument to nfsrv_buildacl(),
      nfsrv_dissectacl() and nfsrv_dissectace(), so that they
      will handle NFSV4ACE_INHERITED when dacl == true.
      
      Since these functions are always called with dacl == false
      for this patch, semantics should not have changed.
      A future patch will add support for dacl.
      
      MFC after:	2 weeks
      0fa074b5
  19. 12 Dec, 2021 1 commit
    • Rick Macklem's avatar
      nfscl: Fix must_commit handling for mirrored pNFS mounts · 24947b70
      Rick Macklem authored
      For pNFS mounts to mirrored Flexible File layout pNFS servers,
      the "must_commit" component in the nfsclwritedsdorpc
      structure must be checked and the "must_commit" argument passed
      into nfscl_doiods() must be updated.  Technically, only writes to
      the DS with a writeverf change must be redone, but since this
      occurrence will be rare, the must_commit argument to nfscl_doiosd()
      is set to 1, so all writes to all DSs will be redone.
      
      This bug would affect few, since use of mirrored pNFS servers
      is rare and "writeverf" rarely changes. Normally "writeverf"
      only changes when a NFS server reboots.
      
      MFC after:	2 weeks
      24947b70
  20. 11 Dec, 2021 1 commit
    • Rick Macklem's avatar
      nfscl: Fix must_commit/writeverf handling for Direct I/O · ead50c94
      Rick Macklem authored
      Without this patch, the KASSERT(must_commit == 0,..) can be
      triggered by the writeverf in the Direct I/O write reply changing.
      This is not a situation that should cause a panic(). Correct
      handling is to ignore the change in "writeverf" for Direct
      I/O, since it is done with NFSWRITE_FILESYNC.
      
      This patch modifies the semantics of the "must_commit"
      argument slightly, allowing an initial value of 2 to indicate
      that a change in "writeverf" should be ignored.
      It also fixes the KASSERT()s.
      
      This bug would affect few, since Direct I/O is not enabled
      by default and "writeverf" rarely changes. Normally "writeverf"
      only changes when a NFS server reboots, however I found the
      bug when testing against a Linux 5.15.1 kernel nfsd, which
      replied to a NFSWRITE_FILESYNC write with a "writeverf" of all
      0x0 bytes.
      
      MFC after:	2 weeks
      ead50c94
  21. 09 Dec, 2021 1 commit
    • Rick Macklem's avatar
      nfscl: Check for an error return from nfsrv_getattrbits() · ab639f23
      Rick Macklem authored
      There were two places where the client code did not check
      for a parse error return from nfsrv_getattrbits().
      
      This patch fixes both of these cases.
      
      Reported by:	rtm@lcs.mit.edu
      Tested by:	rtm@lcs.mit.edu
      PR:	260272
      MFC after:	2 weeks
      ab639f23
  22. 26 Nov, 2021 1 commit
  23. 11 Nov, 2021 1 commit
    • Rick Macklem's avatar
      nfscl: Add a LayoutError RPC for NFSv4.2 pNFS mounts · 44744f75
      Rick Macklem authored
      If a pNFS server's DS runs out of disk space, it replies
      NFSERR_NOSPC to the client doing writing.  For the Linux
      client, it then sends a LayoutError RPC to the MDS server to
      tell it about the error.  This patch adds the same to the
      FreeBSD NFSv4.2 pNFS client, to maintain Linux compatible
      behaviour, particlularily for non-FreeBSD pNFS servers.
      
      MFC after:	2 weeks
      44744f75
  24. 30 Oct, 2021 1 commit
    • Rick Macklem's avatar
      PR#259071 provides a test program that fails for the NFS client. · 2be41784
      Rick Macklem authored
      Testing with it, there appears to be a race between Lookup
      and VOPs like Setattr-of-size, where Lookup ends up loading
      stale attributes (including what might be the wrong file size)
      into the NFS vnode's attribute cache.
      
      The race occurs when the modifying VOP (which holds a lock
      on the vnode), blocks the acquisition of the vnode in Lookup,
      after the RPC (with now potentially stale attributes).
      
      Here's what seems to happen:
      Child                                Parent
      
      does stat(), which does
      VOP_LOOKUP(), doing the Lookup
      RPC with the directory vnode
      locked, acquiring file attributes
      valid at this point in time
      
      blocks waiting for locked file       does ftruncate(), which
      vnode                                does VOP_SETATTR() of Size,
                                           changing the file's size
                                           while holding an exclusive
                                           lock on the file's vnode
                                           releases the vnode lock
      acquires file vnode and fills in
      now stale attributes including
      the old wrong Size
                                           does a read() which returns
                                           wrong data size
      
      This patch fixes the problem by saving a timestamp in the NFS vnode
      in the VOPs that modify the file (Setattr-of-size, Allocate).
      Then lookup/readdirplus compares that timestamp with the time just
      before starting the RPC after it has acquired the file's vnode.
      If the modifying RPC occurred during the Lookup, the attributes
      in the RPC reply are discarded, since they might be stale.
      
      With this patch the test program works as expected.
      
      Note that the test program does not fail on a July stable/12,
      although this race is in the NFS client code.  I suspect a
      fairly recent change to the name caching code exposed this
      bug.
      
      PR:	259071
      Reviewed by:	asomers
      MFC after:	2 weeks
      Differential Revision:	https://reviews.freebsd.org/D32635
      2be41784
  25. 26 Oct, 2021 1 commit
    • Rick Macklem's avatar
      nfscl: Add a missing delegation lock release · 23024f00
      Rick Macklem authored
      There was a case in nfscl_doiods() where the function would return
      without releasing the delegation shared lock, if it was aquired by
      the call to nfscl_getstateid().  This patch adds that release.
      
      I have never observed a failure due to this missing release, so I
      do not know if it ever happens in practice.  However, since the pNFS
      client is not yet heavily used, it might be the case.
      
      Found by code inspection during a recent NFSv4 IETF working group
      testing event.
      
      MFC after:	2 week
      23024f00
  26. 20 Oct, 2021 1 commit
  27. 18 Oct, 2021 2 commits
    • Rick Macklem's avatar
      nfscl: Handle NFSv4.1/4.2 Close RPC NFSERR_DELAY replies better · 52dee2bc
      Rick Macklem authored
      Without this patch, if a NFSv4.1/4.2 server replies NFSERR_DELAY to
      a Close operation, the client loops retrying the Close while holding
      a shared lock on the clientID.  This shared lock blocks returns of
      delegations, even though the server has issued a CB_RECALL to request
      the delegation return.
      
      This patch delays doing a retry of a Close that received a reply of
      NFSERR_DELAY until after the shared lock on the clientID is released,
      for NFSv4.1/4.2.  To fix this for NFSv4.0 would be very difficult and
      since the only known NFSv4 server to reply NFSERR_DELAY to Close only
      does NFSv4.1/4.2, this fix is hoped to be sufficient.
      
      This problem was detected during a recent IETF working group NFSv4
      testing event.
      
      MFC after:	2 week
      52dee2bc
    • Rick Macklem's avatar
      nfscl: Modify Close RPC so that it does not use "owner" for NFSv4.1/4.2 · d95c0a12
      Rick Macklem authored
      This patch modifies the function that does the Close RPC (nfsrpc_closerpc)
      so that it does not use the open_owner (nfso_own) for NFSv4.1/4.2.
      Use of the seqid in the open_owner structure is only needed for NFSv4.0.
      Same applies to a NFSERR_STALESTATEID reply, which should only happen
      for NFSv4.0.  This allows nfsrpc_closerpc() to be called when nfso_own
      is no longer valid.  This, in turn, allows nfsrpc_closerpc() to be called
      after the shared lock on the clientID is released, for NFSv4.1/4.2.
      
      This is being done to prepare the code for a future patch that fixes
      the case where an NFSv4.1/4.2 server replies NFSERR_DELAY to a Close
      operation.
      
      MFC after:	2 week
      d95c0a12
  28. 16 Oct, 2021 1 commit
    • Rick Macklem's avatar
      nfscl: Move release of the clientID lock into nfscl_doclose() · e2aab5e2
      Rick Macklem authored
      This patch moves release of the shared clientID lock from nfsrpc_close()
      just after the nfscl_doclose() call to the end of nfscl_doclose() call.
      This does make the code cleaner, since the shared lock is acquired at
      the beginning of nfscl_doclose().  The only semantics change is that
      the code no longer drops and reaquires the NFSCLSTATELOCK() mutex,
      which I do not believe will have a negative effect on the NFSv4 client.
      
      This is being done to prepare the code for a future patch that fixes
      the case where an NFSv4.1/4.2 server replies NFSERR_DELAY to a Close
      operation.
      
      MFC after:	2 week
      e2aab5e2
  29. 15 Oct, 2021 2 commits
    • Rick Macklem's avatar
      nfscl: Add an argument to nfscl_tryclose() · 77c595ce
      Rick Macklem authored
      This patch adds a new argument to nfscl_tryclose() to indicate
      whether or not it should loop when a NFSERR_DELAY reply is received
      from the NFSv4 server.  Since this new argument is always passed in
      as "true" at this time, no semantics change should occur.
      
      This is being done to prepare the code for a future patch that fixes
      the case where an NFSv4.1/4.2 server replies NFSERR_DELAY to a Close
      operation.
      
      MFC after:	2 week
      77c595ce
    • Rick Macklem's avatar
      nfscl: Restructure nfscl_freeopen() slightly · 6495766a
      Rick Macklem authored
      This patch factors the unlinking of the nfsclopen structure out of
      nfscl_freeopen() into a separate function called nfscl_unlinkopen().
      It also adds a new argument to nfscl_freeopen() to conditionally do
      the unlink.  Since this new argument is always passed in as "true"
      at this time, no semantics change should occur.
      
      This is being done to prepare the code for a future patch that fixes
      the case where an NFSv4.1/4.2 server replies NFSERR_DELAY to a Close
      operation.
      
      MFC after:	2 week
      6495766a
  30. 13 Oct, 2021 1 commit
    • Rick Macklem's avatar
      nfscl: Make nfscl_getlayout() acquire the correct pNFS layout · 24af0fcd
      Rick Macklem authored
      Without this patch, if a pNFS read layout has already been acquired
      for a file, writes would be redirected to the Metadata Server (MDS),
      because nfscl_getlayout() would not acquire a read/write layout for
      the file.  This happened because there was no "mode" argument to
      nfscl_getlayout() to indicate whether reading or writing was being done.
      Since doing I/O through the Metadata Server is not encouraged for some
      pNFS servers, it is preferable to get a read/write layout for writes
      instead of redirecting the write to the MDS.
      
      This patch adds a access mode argument to nfscl_getlayout() and
      nfsrpc_getlayout(), so that nfscl_getlayout() knows to acquire a read/write
      layout for writing, even if a read layout has already been acquired.
      This patch only affects NFSv4.1/4.2 client behaviour when pNFS ("pnfs" mount
      option against a server that supports pNFS) is in use.
      
      This problem was detected during a recent NFSv4 interoperability
      testing event held by the IETF working group.
      
      MFC after:	2 week
      24af0fcd
  31. 12 Oct, 2021 1 commit
    • Rick Macklem's avatar
      nfscl: Fix a deadlock related to the NFSv4 clientID lock · 120b20bd
      Rick Macklem authored
      Without this patch, it is possible for a process doing an NFSv4
      Open/create of a file to block to allow another process
      to acquire the exclusive lock on the clientID when holding
      a shared lock on the clientID.  As such, both processes
      deadlock, with one wanting the exclusive lock, while the
      other holds the shared lock.  This deadlock is unlikely to occur
      unless delegations are in use on the NFSv4 mount.
      
      This patch fixes the problem by not deferring to the process
      waiting for the exclusive lock when a shared lock (reference cnt)
      is already held by the process.
      
      This problem was detected during a recent NFSv4 interoperability
      testing event held by the IETF working group.
      
      MFC after:	1 week
      120b20bd
  32. 11 Sep, 2021 1 commit
    • Rick Macklem's avatar
      nfscl: Make vfs.nfs.maxcopyrange larger by default · 55089ef4
      Rick Macklem authored
      As of commit 103b2075, the NFSv4.2 server will limit the size
      of a Copy operation based upon a 1 second timeout.  The Linux 5.2
      kernel server also limits Copy operation size to 4Mbytes.
      As such, the NFSv4.2 client can attempt a large Copy without
      resulting in a long RPC RTT for these servers.
      
      This patch changes vfs.nfs.maxcopyrange to 64bits and sets
      the default to the maximum possible size of SSIZE_MAX, since
      a larger size makes the Copy operation more efficient and
      allows for copying to complete with fewer RPCs.
      The sysctl may be need to be made smaller for other non-FreeBSD
      NFSv4.2 servers.
      
      MFC after:	2 weeks
      55089ef4