1. 07 3月, 2010 1 次提交
  2. 05 3月, 2010 1 次提交
    • C
      dquot: move dquot initialization responsibility into the filesystem · 907f4554
      Christoph Hellwig 提交于
      Currently various places in the VFS call vfs_dq_init directly.  This means
      we tie the quota code into the VFS.  Get rid of that and make the
      filesystem responsible for the initialization.   For most metadata operations
      this is a straight forward move into the methods, but for truncate and
      open it's a bit more complicated.
      
      For truncate we currently only call vfs_dq_init for the sys_truncate case
      because open already takes care of it for ftruncate and open(O_TRUNC) - the
      new code causes an additional vfs_dq_init for those which is harmless.
      
      For open the initialization is moved from do_filp_open into the open method,
      which means it happens slightly earlier now, and only for regular files.
      The latter is fine because we don't need to initialize it for operations
      on special files, and we already do it as part of the namespace operations
      for directories.
      
      Add a dquot_file_open helper that filesystems that support generic quotas
      can use to fill in ->open.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      907f4554
  3. 04 3月, 2010 3 次提交
  4. 25 2月, 2010 1 次提交
  5. 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
  6. 20 2月, 2010 1 次提交
  7. 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
  8. 07 2月, 2010 3 次提交
  9. 30 1月, 2010 1 次提交
  10. 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
  11. 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
  12. 15 1月, 2010 1 次提交
  13. 13 1月, 2010 3 次提交
  14. 07 1月, 2010 1 次提交
  15. 21 12月, 2009 1 次提交
  16. 20 12月, 2009 1 次提交
  17. 17 12月, 2009 2 次提交
  18. 16 12月, 2009 9 次提交
  19. 15 12月, 2009 5 次提交
  20. 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
  21. 15 11月, 2009 1 次提交