1. 03 7月, 2008 5 次提交
  2. 02 7月, 2008 1 次提交
  3. 01 7月, 2008 2 次提交
    • J
      nfsd: treat all shutdown signals as equivalent · 100766f8
      Jeff Layton 提交于
      knfsd currently uses 2 signal masks when processing requests. A "loose"
      mask (SHUTDOWN_SIGS) that it uses when receiving network requests, and
      then a more "strict" mask (ALLOWED_SIGS, which is just SIGKILL) that it
      allows when doing the actual operation on the local storage.
      
      This is apparently unnecessarily complicated. The underlying filesystem
      should be able to sanely handle a signal in the middle of an operation.
      This patch removes the signal mask handling from knfsd altogether. When
      knfsd is started as a kthread, all signals are ignored. It then allows
      all of the signals in SHUTDOWN_SIGS. There's no need to set the mask
      as well.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      100766f8
    • N
      nfsd: fix spurious EACCESS in reconnect_path() · 496d6c32
      Neil Brown 提交于
      Thanks to Frank Van Maarseveen for the original problem report: "A
      privileged process on an NFS client which drops privileges after using
      them to change the current working directory, will experience incorrect
      EACCES after an NFS server reboot. This problem can also occur after
      memory pressure on the server, particularly when the client side is
      quiet for some time."
      
      This occurs because the filehandle points to a directory whose parents
      are no longer in the dentry cache, and we're attempting to reconnect the
      directory to its parents without adequate permissions to perform lookups
      in the parent directories.
      
      We can therefore fix the problem by acquiring the necessary capabilities
      before attempting the reconnection.  We do this only in the
      no_subtree_check case, since the documented behavior of the
      subtree_check export option requires the server to check that the user
      has lookup permissions on all parents.
      
      The subtree_check case still has a problem, since reconnect_path()
      unnecessarily requires both read and lookup permissions on all parent
      directories.  However, a fix in that case would be more delicate, and
      use of subtree_check is already discouraged for other reasons.
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Cc: Frank van Maarseveen <frankvm@frankvm.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      496d6c32
  4. 24 6月, 2008 10 次提交
  5. 19 5月, 2008 2 次提交
  6. 30 4月, 2008 1 次提交
  7. 29 4月, 2008 1 次提交
  8. 26 4月, 2008 4 次提交
    • J
      nfsd: don't allow setting ctime over v4 · e36cd4a2
      J. Bruce Fields 提交于
      Presumably this is left over from earlier drafts of v4, which listed
      TIME_METADATA as writeable.  It's read-only in rfc 3530, and shouldn't
      be modifiable anyway.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      e36cd4a2
    • J
      locks: don't call ->copy_lock methods on return of conflicting locks · 1a747ee0
      J. Bruce Fields 提交于
      The file_lock structure is used both as a heavy-weight representation of
      an active lock, with pointers to reference-counted structures, etc., and
      as a simple container for parameters that describe a file lock.
      
      The conflicting lock returned from __posix_lock_file is an example of
      the latter; so don't call the filesystem or lock manager callbacks when
      copying to it.  This also saves the need for an unnecessary
      locks_init_lock in the nfsv4 server.
      
      Thanks to Trond for pointing out the error.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      1a747ee0
    • W
      lockd: unlock lockd locks held for a certain filesystem · 17efa372
      Wendy Cheng 提交于
      Add /proc/fs/nfsd/unlock_filesystem, which allows e.g.:
      
      shell> echo /mnt/sfs1 > /proc/fs/nfsd/unlock_filesystem
      
      so that a filesystem can be unmounted before allowing a peer nfsd to
      take over nfs service for the filesystem.
      Signed-off-by: NS. Wendy Cheng <wcheng@redhat.com>
      Cc: Lon Hohberger  <lhh@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      
       fs/lockd/svcsubs.c          |   66 +++++++++++++++++++++++++++++++++++++++-----
       fs/nfsd/nfsctl.c            |   65 +++++++++++++++++++++++++++++++++++++++++++
       include/linux/lockd/lockd.h |    7 ++++
       3 files changed, 131 insertions(+), 7 deletions(-)
      17efa372
    • W
      lockd: unlock lockd locks associated with a given server ip · 4373ea84
      Wendy Cheng 提交于
      For high-availability NFS service, we generally need to be able to drop
      file locks held on the exported filesystem before moving clients to a
      new server.  Currently the only way to do that is by shutting down lockd
      entirely, which is often undesireable (for example, if you want to
      continue exporting other filesystems).
      
      This patch allows the administrator to release all locks held by clients
      accessing the client through a given server ip address, by echoing that
      address to a new file, /proc/fs/nfsd/unlock_ip, as in:
      
      shell> echo 10.1.1.2 > /proc/fs/nfsd/unlock_ip
      
      The expected sequence of events can be:
      1. Tear down the IP address
      2. Unexport the path
      3. Write IP to /proc/fs/nfsd/unlock_ip to unlock files
      4. Signal peer to begin take-over.
      
      For now we only support IPv4 addresses and NFSv2/v3 (NFSv4 locks are not
      affected).
      
      Also, if unmounting the filesystem is required, we assume at step 3 that
      clients using the given server ip are the only clients holding locks on
      the given filesystem; otherwise, an additional patch is required to
      allow revoking all locks held by lockd on a given filesystem.
      Signed-off-by: NS. Wendy Cheng <wcheng@redhat.com>
      Cc: Lon Hohberger  <lhh@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      
       fs/lockd/svcsubs.c          |   66 +++++++++++++++++++++++++++++++++++++++-----
       fs/nfsd/nfsctl.c            |   65 +++++++++++++++++++++++++++++++++++++++++++
       include/linux/lockd/lockd.h |    7 ++++
       3 files changed, 131 insertions(+), 7 deletions(-)
      4373ea84
  9. 24 4月, 2008 14 次提交