1. 30 9月, 2008 3 次提交
  2. 16 7月, 2008 3 次提交
  3. 26 4月, 2008 2 次提交
    • 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
  4. 20 4月, 2008 1 次提交
  5. 20 3月, 2008 3 次提交
  6. 02 2月, 2008 1 次提交
  7. 30 1月, 2008 3 次提交
    • C
      NLM: Introduce an arguments structure for nlmclnt_init() · 883bb163
      Chuck Lever 提交于
      Clean up: pass 5 arguments to nlmclnt_init() in a structure similar to the
      new nfs_client_initdata structure.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      883bb163
    • C
      NLM/NFS: Use cached nlm_host when calling nlmclnt_proc() · 1093a60e
      Chuck Lever 提交于
      Now that each NFS mount point caches its own nlm_host structure, it can be
      passed to nlmclnt_proc() for each lock request.  By pinning an nlm_host for
      each mount point, we trade the overhead of looking up or creating a fresh
      nlm_host struct during every NLM procedure call for a little extra memory.
      
      We also restrict the nlmclnt_proc symbol to limit the use of this call to
      in-tree modules.
      
      Note that nlm_lookup_host() (just removed from the client's per-request
      NLM processing) could also trigger an nlm_host garbage collection.  Now
      client-side nlm_host garbage collection occurs only during NFS mount
      processing.  Since the NFS client now holds a reference on these nlm_host
      structures, they wouldn't have been affected by garbage collection
      anyway.
      
      Given that nlm_lookup_host() reorders the global nlm_host chain after
      every successful lookup, and that a garbage collection could be triggered
      during the call, we've removed a significant amount of per-NLM-request
      CPU processing overhead.
      
      Sidebar: there are only a few remaining references to the internals of
      NFS inodes in the client-side NLM code.  The only references I found are
      related to extracting or comparing the inode's file handle via NFS_FH().
      One is in nlmclnt_grant(); the other is in nlmclnt_setlockargs().
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      1093a60e
    • C
      NLM: Introduce external nlm_host set-up and tear-down functions · 52c4044d
      Chuck Lever 提交于
      We would like to remove the per-lock-operation nlm_lookup_host() call from
      nlmclnt_proc().
      
      The new architecture pins an nlm_host structure to each NFS client
      superblock that has the "lock" mount option set.  The NFS client passes
      in the pinned nlm_host structure during each call to nlmclnt_proc().  NFS
      client unmount processing "puts" the nlm_host so it can be garbage-
      collected later.
      
      This patch introduces externally callable NLM functions that handle
      mount-time nlm_host set up and tear-down.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      52c4044d
  8. 18 7月, 2007 1 次提交
  9. 11 7月, 2007 1 次提交
  10. 15 5月, 2007 1 次提交
    • T
      NLM: Fix sparse warnings · d48c5f41
      Trond Myklebust 提交于
       - fs/lockd/xdr4.c:140:27: warning: incorrect type in argument 2 (different
         explicit signedness)
       - fs/lockd/xdr4.c:141:27: warning: incorrect type in argument 2 (different
         explicit signedness)
       - fs/lockd/xdr4.c:432:28: warning: incorrect type in argument 2 (different
         explicit signedness)
       - fs/lockd/xdr4.c:433:28: warning: incorrect type in argument 2 (different
         explicit signedness)
       - fs/lockd/xdr4.c:587:20: warning: symbol 'nlm_version4' was not declared.
         Should it be static?
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      d48c5f41
  11. 07 5月, 2007 2 次提交
  12. 01 5月, 2007 1 次提交
  13. 14 12月, 2006 1 次提交
  14. 09 12月, 2006 1 次提交
  15. 08 12月, 2006 1 次提交
  16. 21 10月, 2006 1 次提交
  17. 17 10月, 2006 1 次提交
    • N
      [PATCH] knfsd: Allow lockd to drop replies as appropriate · d343fce1
      NeilBrown 提交于
      It is possible for the ->fopen callback from lockd into nfsd to find that an
      answer cannot be given straight away (an upcall is needed) and so the request
      has to be 'dropped', to be retried later.  That error status is not currently
      propagated back.
      
      So:
        Change nlm_fopen to return nlm error codes (rather than a private
        protocol) and define a new nlm_drop_reply code.
        Cause nlm_drop_reply to cause the rpc request to get rpc_drop_reply
        when this error comes back.
        Cause svc_process to drop a request which returns a status of
        rpc_drop_reply.
      
      [akpm@osdl.org: fix warning storm]
      Cc: Marc Eshel <eshel@almaden.ibm.com>
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d343fce1
  18. 04 10月, 2006 13 次提交