1. 07 3月, 2010 2 次提交
    • J
      nfsd4: simplify lease/grace interaction · e46b498c
      J. Bruce Fields 提交于
      The original code here assumed we'd allow the user to change the lease
      any time, but only allow the change to take effect on restart.  Since
      then we modified the code to allow setting the lease on when the server
      is down.  Update the rest of the code to reflect that fact, clarify
      variable names, and add document.
      
      Also, the code insisted that the grace period always be the longer of
      the old and new lease periods, but that's overly conservative--as long
      as it lasts at least the old lease period, old clients should still know
      to recover in time.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      e46b498c
    • J
      nfsd4: simplify references to nfsd4 lease time · cf07d2ea
      J. Bruce Fields 提交于
      Instead of accessing the lease time directly, some users call
      nfs4_lease_time(), and some a macro, NFSD_LEASE_TIME, defined as
      nfs4_lease_time().  Neither layer of indirection serves any purpose.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      cf07d2ea
  2. 04 3月, 2010 1 次提交
  3. 25 2月, 2010 1 次提交
  4. 21 2月, 2010 1 次提交
    • B
      commit_metadata export operation replacing nfsd_sync_dir · f501912a
      Ben Myers 提交于
      - Add commit_metadata export_operation to allow the underlying filesystem to
      decide how to commit an inode most efficiently.
      
      - Usage of nfsd_sync_dir and write_inode_now has been replaced with the
      commit_metadata function that takes a svc_fh.
      
      - The commit_metadata function calls the commit_metadata export_op if it's
      there, or else falls back to sync_inode instead of fsync and write_inode_now
      because only metadata need be synced here.
      
      - nfsd4_sync_rec_dir now uses vfs_fsync so that commit_metadata can be static
      Signed-off-by: NBen Myers <bpm@sgi.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      f501912a
  5. 20 2月, 2010 1 次提交
  6. 09 2月, 2010 1 次提交
    • J
      Revert "nfsd4: fix error return when pseudoroot missing" · 260c64d2
      J. Bruce Fields 提交于
      Commit f39bde24 fixed the error return from PUTROOTFH in the
      case where there is no pseudofilesystem.
      
      This is really a case we shouldn't hit on a correctly configured server:
      in the absence of a root filehandle, there's no point accepting version
      4 NFS rpc calls at all.
      
      But the shared responsibility between kernel and userspace here means
      the kernel on its own can't eliminate the possiblity of this happening.
      And we have indeed gotten this wrong in distro's, so new client-side
      mount code that attempts to negotiate v4 by default first has to work
      around this case.
      
      Therefore when commit f39bde24 arrived at roughly the same
      time as the new v4-default mount code, which explicitly checked only for
      the previous error, the result was previously fine mounts suddenly
      failing.
      
      We'll fix both sides for now: revert the error change, and make the
      client-side mount workaround more robust.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      260c64d2
  7. 07 2月, 2010 3 次提交
  8. 30 1月, 2010 1 次提交
  9. 28 1月, 2010 1 次提交
    • C
      NFSD: Create PF_INET6 listener in write_ports · 37498292
      Chuck Lever 提交于
      Try to create a PF_INET6 listener for NFSD, if IPv6 is enabled in the
      kernel.
      
      Make sure nfsd_serv's reference count is decreased if
      __write_ports_addxprt() failed to create a listener.  See
      __write_ports_addfd().
      
      Our current plan is to rely on rpc.nfsd to create appropriate IPv6
      listeners when server-side NFS/IPv6 support is desired.  Legacy
      behavior, via the write_threads or write_svc kernel APIs, will remain
      the same -- only IPv4 listeners are created.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      [bfields@citi.umich.edu: Move error-handling code to end]
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      37498292
  10. 27 1月, 2010 1 次提交
    • C
      SUNRPC: NFS kernel APIs shouldn't return ENOENT for "transport not found" · 68717908
      Chuck Lever 提交于
      write_ports() converts svc_create_xprt()'s ENOENT error return to
      EPROTONOSUPPORT so that rpc.nfsd (in user space) can report an error
      message that makes sense.
      
      It turns out that several of the other kernel APIs rpc.nfsd use can
      also return ENOENT from svc_create_xprt(), by way of lockd_up().
      
      On the client side, an NFSv2 or NFSv3 mount request can also return
      the result of lockd_up().  This error may also be returned during an
      NFSv4 mount request, since the NFSv4 callback service uses
      svc_create_xprt() to create the callback listener.  An ENOENT error
      return results in a confusing error message from the mount command.
      
      Let's have svc_create_xprt() return EPROTONOSUPPORT instead of ENOENT.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      68717908
  11. 15 1月, 2010 1 次提交
  12. 13 1月, 2010 3 次提交
  13. 07 1月, 2010 1 次提交
  14. 21 12月, 2009 1 次提交
  15. 20 12月, 2009 1 次提交
  16. 17 12月, 2009 2 次提交
  17. 16 12月, 2009 9 次提交
  18. 15 12月, 2009 5 次提交
  19. 26 11月, 2009 1 次提交
    • J
      nfsd: simplify fh_verify access checks · 864f0f61
      J. Bruce Fields 提交于
      All nfsd security depends on the security checks in fh_verify, and
      especially on nfsd_setuser().
      
      It therefore bothers me that the nfsd_setuser call may be made from
      three different places, depending on whether the filehandle has already
      been mapped to a dentry, and on whether subtreechecking is in force.
      
      Instead, make an unconditional call in fh_verify(), so it's trivial to
      verify that the call always occurs.
      
      That leaves us with a redundant nfsd_setuser() call in the subtreecheck
      case--it needs the correct user set earlier in order to check execute
      permissions on the path to this filehandle--but I'm willing to accept
      that minor inefficiency in the subtreecheck case in return for more
      straightforward permission checking.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      864f0f61
  20. 15 11月, 2009 1 次提交
  21. 14 11月, 2009 1 次提交
  22. 06 11月, 2009 1 次提交