1. 22 Apr, 2010 5 commits
    • J. Bruce Fields's avatar
      nfsd4: complete enforcement of 4.1 op ordering · 57716355
      J. Bruce Fields authored
      Enforce the rules about compound op ordering.
      
      Motivated by implementing RECLAIM_COMPLETE, for which the client is
      implicit in the current session, so it is important to ensure a
      succesful SEQUENCE proceeds the RECLAIM_COMPLETE.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      57716355
    • J. Bruce Fields's avatar
      nfsd4: allow 4.0 clients to change callback path · 4b21d0de
      J. Bruce Fields authored
      The rfc allows a client to change the callback parameters, but we didn't
      previously implement it.
      
      Teach the callbacks to rerun themselves (by placing themselves on a
      workqueue) when they recognize that their rpc task has been killed and
      that the callback connection has changed.
      
      Then we can change the callback connection by setting up a new rpc
      client, modifying the nfs4 client to point at it, waiting for any work
      in progress to complete, and then shutting down the old client.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      4b21d0de
    • J. Bruce Fields's avatar
      nfsd4: rearrange cb data structures · 2bf23875
      J. Bruce Fields authored
      Mainly I just want to separate the arguments used for setting up the tcp
      client from the rest.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      2bf23875
    • J. Bruce Fields's avatar
      nfsd4: cl_count is unused · b12a05cb
      J. Bruce Fields authored
      Now that the shutdown sequence guarantees callbacks are shut down before
      the client is destroyed, we no longer have a use for cl_count.
      
      We'll probably reinstate a reference count on the client some day, but
      it will be held by users other than callbacks.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      b12a05cb
    • J. Bruce Fields's avatar
      nfsd4: don't sleep in lease-break callback · b5a1a81e
      J. Bruce Fields authored
      The NFSv4 server's fl_break callback can sleep (dropping the BKL), in
      order to allocate a new rpc task to send a recall to the client.
      
      As far as I can tell this doesn't cause any races in the current code,
      but the analysis is difficult.  Also, the sleep here may complicate the
      move away from the BKL.
      
      So, just schedule some work to do the job for us instead.  The work will
      later also prove useful for restarting a call after the callback
      information is changed.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      b5a1a81e
  2. 19 Apr, 2010 1 commit
  3. 17 Apr, 2010 1 commit
  4. 02 Apr, 2010 4 commits
  5. 30 Mar, 2010 1 commit
  6. 24 Mar, 2010 1 commit
  7. 22 Mar, 2010 1 commit
    • Jeff Layton's avatar
      nfsd: don't break lease while servicing a COMMIT · 91885258
      Jeff Layton authored
      This is the second attempt to fix the problem whereby a COMMIT call
      causes a lease break and triggers a possible deadlock.
      
      The problem is that nfsd attempts to break a lease on a COMMIT call.
      This triggers a delegation recall if the lease is held for a delegation.
      If the client is the one holding the delegation and it's the same one on
      which it's issuing the COMMIT, then it can't return that delegation
      until the COMMIT is complete. But, nfsd won't complete the COMMIT until
      the delegation is returned. The client and server are essentially
      deadlocked until the state is marked bad (due to the client not
      responding on the callback channel).
      
      The first patch attempted to deal with this by eliminating the open of
      the file altogether and simply had nfsd_commit pass a NULL file pointer
      to the vfs_fsync_range. That would conflict with some work in progress
      by Christoph Hellwig to clean up the fsync interface, so this patch
      takes a different approach.
      
      This declares a new NFSD_MAY_NOT_BREAK_LEASE access flag that indicates
      to nfsd_open that it should not break any leases when opening the file,
      and has nfsd_commit set that flag on the nfsd_open call.
      
      For now, this patch leaves nfsd_commit opening the file with write
      access since I'm not clear on what sort of access would be more
      appropriate.
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      91885258
  8. 16 Mar, 2010 1 commit
  9. 15 Mar, 2010 1 commit
    • NeilBrown's avatar
      sunrpc: never return expired entries in sunrpc_cache_lookup · d202cce8
      NeilBrown authored
      If sunrpc_cache_lookup finds an expired entry, remove it from
      the cache and return a freshly created non-VALID entry instead.
      This ensures that we only ever get a usable entry, or an
      entry that will become usable once an update arrives.
      i.e. we will never need to repeat the lookup.
      
      This allows us to remove the 'is_expired' test from cache_check
      (i.e. from cache_is_valid).  cache_check should never get an expired
      entry as 'lookup' will never return one.  If it does happen - due to
      inconvenient timing - then just accept it as still valid, it won't be
      very much past it's use-by date.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      d202cce8
  10. 14 Mar, 2010 2 commits
  11. 09 Mar, 2010 1 commit
  12. 08 Mar, 2010 21 commits