1. May 19, 2010
    • J. Bruce Fields's avatar
      Revert "nfsd4: distinguish expired from stale stateids" · e4e83ea4
      J. Bruce Fields authored
      This reverts commit 78155ed7
      
      .
      
      We're depending here on the boot time that we use to generate the
      stateid being monotonic, but get_seconds() is not necessarily.
      
      We still depend at least on boot_time being different every time, but
      that is a safer bet.
      
      We have a few reports of errors that might be explained by this problem,
      though we haven't been able to confirm any of them.
      
      But the minor gain of distinguishing expired from stale errors seems not
      worth the risk.
      
      Conflicts:
      
      	fs/nfsd/nfs4state.c
      
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      e4e83ea4
    • Pavel Emelyanov's avatar
      nfsd: safer initialization order in find_file() · 47cee541
      Pavel Emelyanov authored
      
      
      The alloc_init_file() first adds a file to the hash and then
      initializes its fi_inode, fi_id and fi_had_conflict.
      
      The uninitialized fi_inode could thus be erroneously checked by
      the find_file(), so move the hash insertion lower.
      
      The client_mutex should prevent this race in practice; however, we
      eventually hope to make less use of the client_mutex, so the ordering
      here is an accident waiting to happen.
      
      I didn't find whether the same can be true for two other fields,
      but the common sense tells me it's better to initialize an object
      before putting it into a global hash table :)
      
      Signed-off-by: default avatarPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      47cee541
  2. May 18, 2010
  3. May 15, 2010
  4. May 14, 2010
  5. May 13, 2010
  6. May 12, 2010
  7. May 08, 2010
  8. May 04, 2010
  9. May 03, 2010
    • J. Bruce Fields's avatar
      nfsd: further comment typos · fb4b698f
      J. Bruce Fields authored
      
      
      Whoops, missed some more.
      
      "Reviewed-by, I guess": Chuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      fb4b698f
    • Neil Brown's avatar
      sunrpc: centralise most calls to svc_xprt_received · b48fa6b9
      Neil Brown authored
      
      
      svc_xprt_received must be called when ->xpo_recvfrom has finished
      receiving a message, so that the XPT_BUSY flag will be cleared and
      if necessary, requeued for further work.
      
      This call is currently made in each ->xpo_recvfrom function, often
      from multiple different points.  In each case it is the earliest point
      on a particular path where it is known that the protection provided by
      XPT_BUSY is no longer needed.
      
      However there are (still) some error paths which do not call
      svc_xprt_received, and requiring each ->xpo_recvfrom to make the call
      does not encourage robustness.
      
      So: move the svc_xprt_received call to be made just after the
      call to ->xpo_recvfrom(), and move it of the various ->xpo_recvfrom
      methods.
      
      This means that it may not be called at the earliest possible instant,
      but this is unlikely to be a measurable performance issue.
      
      Note that there are still other calls to svc_xprt_received as it is
      also needed when an xprt is newly created.
      
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      b48fa6b9
    • J. Bruce Fields's avatar
      nfsd4: fix unlikely race in session replay case · 26c0c75e
      J. Bruce Fields authored
      
      
      In the replay case, the
      
      	renew_client(session->se_client);
      
      happens after we've droppped the sessionid_lock, and without holding a
      reference on the session; so there's nothing preventing the session
      being freed before we get here.
      
      Thanks to Benny Halevy for catching a bug in an earlier version of this
      patch.
      
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      Acked-by: default avatarBenny Halevy <bhalevy@panasas.com>
      26c0c75e
  10. Apr 30, 2010
  11. Apr 29, 2010