1. 03 3月, 2012 1 次提交
  2. 02 3月, 2012 1 次提交
  3. 15 2月, 2012 2 次提交
  4. 07 2月, 2012 1 次提交
  5. 01 2月, 2012 3 次提交
  6. 06 1月, 2012 1 次提交
    • C
      NFS: Cache state owners after files are closed · 0aaaf5c4
      Chuck Lever 提交于
      Servers have a finite amount of memory to store NFSv4 open and lock
      owners.  Moreover, servers may have a difficult time determining when
      they can reap their state owner table, thanks to gray areas in the
      NFSv4 protocol specification.  Thus clients should be careful to reuse
      state owners when possible.
      
      Currently Linux is not too careful.  When a user has closed all her
      files on one mount point, the state owner's reference count goes to
      zero, and it is released.  The next OPEN allocates a new one.  A
      workload that serially opens and closes files can run through a large
      number of open owners this way.
      
      When a state owner's reference count goes to zero, slap it onto a free
      list for that nfs_server, with an expiry time.  Garbage collect before
      looking for a state owner.  This makes state owners for active users
      available for re-use.
      
      Now that there can be unused state owners remaining at umount time,
      purge the state owner free list when a server is destroyed.  Also be
      sure not to reclaim unused state owners during state recovery.
      
      This change has benefits for the client as well.  For some workloads,
      this approach drops the number of OPEN_CONFIRM calls from the same as
      the number of OPEN calls, down to just one.  This reduces wire traffic
      and thus open(2) latency.  Before this patch, untarring a kernel
      source tarball shows the OPEN_CONFIRM call counter steadily increasing
      through the test.  With the patch, the OPEN_CONFIRM count remains at 1
      throughout the entire untar.
      
      As long as the expiry time is kept short, I don't think garbage
      collection should be terribly expensive, although it does bounce the
      clp->cl_lock around a bit.
      
      [ At some point we should rationalize the use of the nfs_server
      ->destroy method. ]
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      [Trond: Fixed a garbage collection race and a few efficiency issues]
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      0aaaf5c4
  7. 01 8月, 2011 3 次提交
  8. 27 7月, 2011 1 次提交
  9. 13 7月, 2011 2 次提交
  10. 25 4月, 2011 1 次提交
  11. 12 3月, 2011 5 次提交
  12. 11 3月, 2011 1 次提交
  13. 07 1月, 2011 5 次提交
  14. 25 10月, 2010 4 次提交
  15. 23 6月, 2010 1 次提交
  16. 15 5月, 2010 1 次提交
  17. 12 4月, 2010 1 次提交
    • T
      NFSv4: fix delegated locking · 0df5dd4a
      Trond Myklebust 提交于
      Arnaud Giersch reports that NFSv4 locking is broken when we hold a
      delegation since commit 8e469ebd (NFSv4:
      Don't allow posix locking against servers that don't support it).
      
      According to Arnaud, the lock succeeds the first time he opens the file
      (since we cannot do a delegated open) but then fails after we start using
      delegated opens.
      
      The following patch fixes it by ensuring that locking behaviour is
      governed by a per-filesystem capability flag that is initially set, but
      gets cleared if the server ever returns an OPEN without the
      NFS4_OPEN_RESULT_LOCKTYPE_POSIX flag being set.
      Reported-by: NArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Cc: stable@kernel.org
      0df5dd4a
  18. 17 2月, 2010 1 次提交
    • T
      percpu: add __percpu sparse annotations to fs · 003cb608
      Tejun Heo 提交于
      Add __percpu sparse annotations to fs.
      
      These annotations are to make sparse consider percpu variables to be
      in a different address space and warn if accessed without going
      through percpu accessors.  This patch doesn't affect normal builds.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      Cc: Alex Elder <aelder@sgi.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      003cb608
  19. 10 2月, 2010 1 次提交
  20. 05 12月, 2009 1 次提交
  21. 10 8月, 2009 1 次提交
    • T
      NFSv4: Add 'server capability' flags for NFSv4 recommended attributes · 62ab460c
      Trond Myklebust 提交于
      If the NFSv4 server doesn't support a POSIX attribute, the generic NFS code
      needs to know that, so that it don't keep trying to poll for it.
      
      However, by the same count, if the NFSv4 server does support that
      attribute, then we should ensure that the inode metadata is appropriately
      labelled as being untrusted. For instance, if we don't know the correct
      value of the file's uid, we should certainly not be caching ACLs or ACCESS
      results.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      62ab460c
  22. 18 6月, 2009 2 次提交
    • R
      nfs41: Backchannel: Add a backchannel slot table to the session · f8625a6a
      Ricardo Labiaga 提交于
      Defines a new 'struct nfs4_slot_table' in the 'struct nfs4_session'
      for use by the backchannel.  Initializes, resets, and destroys the backchannel
      slot table in the same manner the forechannel slot table is initialized,
      reset, and destroyed.
      
      The sequenceid for each slot in the backchannel slot table is initialized
      to 0, whereas the forechannel slotid's sequenceid is set to 1.
      Signed-off-by: NRicardo Labiaga <Ricardo.Labiaga@netapp.com>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      f8625a6a
    • A
      nfs41: add session setup to the state manager · 76db6d95
      Andy Adamson 提交于
      At mount, nfs_alloc_client sets the cl_state NFS4CLNT_LEASE_EXPIRED bit
      and nfs4_alloc_session sets the NFS4CLNT_SESSION_SETUP bit, so both bits are
      set when nfs4_lookup_root calls nfs4_recover_expired_lease which schedules
      the nfs4_state_manager and waits for it to complete.
      
      Place the session setup after the clientid establishment in nfs4_state_manager
      so that the session is setup right after the clientid has been established
      without rescheduling the state manager.
      
      Unlike nfsv4.0, the nfs_client struct is not ready to use until the session
      has been established.  Postpone marking the nfs_client struct to NFS_CS_READY
      until after a successful CREATE_SESSION call so that other threads cannot use
      the client until the session is established.
      
      If the EXCHANGE_ID call fails and the session has not been setup (the
      NFS4CLNT_SESSION_SETUP bit is set), mark the client with the error and return.
      
      If the session setup CREATE_SESSION call fails with NFS4ERR_STALE_CLIENTID
      which could occur due to server reboot or network partition inbetween the
      EXCHANGE_ID and CREATE_SESSION call, reset the NFS4CLNT_LEASE_EXPIRED and
      NFS4CLNT_SESSION_SETUP bits and try again.
      
      If the CREATE_SESSION call fails with other errors, mark the client with
      the error and return.
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      
      [nfs41: NFS_CS_SESSION_SETUP cl_cons_state for back channel setup]
        On session setup, the CREATE_SESSION reply races with the server back channel
        probe which needs to succeed to setup the back channel. Set a new
        cl_cons_state NFS_CS_SESSION_SETUP just prior to the CREATE_SESSION call
        and add it as a valid state to nfs_find_client so that the client back channel
        can find the nfs_client struct and won't drop the server backchannel probe.
        Use a new cl_cons_state so that NFSv4.0 back channel behaviour which only
        sets NFS_CS_READY is unchanged.
        Adjust waiting on the nfs_client_active_wq accordingly.
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      
      [nfs41: rename NFS_CS_SESSION_SETUP to NFS_CS_SESSION_INITING]
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      [nfs41: set NFS_CL_SESSION_INITING in alloc_session]
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      [nfs41: move session setup into a function]
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      [moved nfs4_proc_create_session declaration here]
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      76db6d95