1. 10 Feb, 2008 5 commits
    • J. Bruce Fields's avatar
      nfsd: clean up svc_reserve_auth() · fbb7878c
      J. Bruce Fields authored
      This is a void function attempting to return the return value from
      another void function, which seems harmless but extremely weird, and
      apparently makes some compilers complain.
      
      While we're there, clean up a little (e.g. the switch statement had a
      minor style problem and seemed overkill as long as there's only one
      case).
      
      Thanks to Trond for noticing this.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      fbb7878c
    • Jeff Layton's avatar
      NLM: don't requeue block if it was invalidated while GRANT_MSG was in flight · c64e80d5
      Jeff Layton authored
      It's possible for lockd to catch a SIGKILL while a GRANT_MSG callback
      is in flight. If this happens we don't want lockd to insert the block
      back into the nlm_blocked list.
      
      This helps that situation, but there's still a possible race. Fixing
      that will mean adding real locking for nlm_blocked.
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      c64e80d5
    • Jeff Layton's avatar
      NLM: don't reattempt GRANT_MSG when there is already an RPC in flight · 9706501e
      Jeff Layton authored
      With the current scheme in nlmsvc_grant_blocked, we can end up with more
      than one GRANT_MSG callback for a block in flight. Right now, we requeue
      the block unconditionally so that a GRANT_MSG callback is done again in
      30s. If the client is unresponsive, it can take more than 30s for the
      call already in flight to time out.
      
      There's no benefit to having more than one GRANT_MSG RPC queued up at a
      time, so put it on the list with a timeout of NLM_NEVER before doing the
      RPC call. If the RPC call submission fails, we requeue it with a short
      timeout. If it works, then nlmsvc_grant_callback will end up requeueing
      it with a shorter timeout after it completes.
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      9706501e
    • Jeff Layton's avatar
      NLM: have server-side RPC clients default to soft RPC tasks · 90bd17c8
      Jeff Layton authored
      Now that it no longer does an RPC ping, lockd always ends up queueing
      an RPC task for the GRANT_MSG callback. But, it also requeues the block
      for later attempts. Since these are hard RPC tasks, if the client we're
      calling back goes unresponsive the GRANT_MSG callbacks can stack up in
      the RPC queue.
      
      Fix this by making server-side RPC clients default to soft RPC tasks.
      lockd requeues the block anyway, so this should be OK.
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      90bd17c8
    • Jeff Layton's avatar
      NLM: set RPC_CLNT_CREATE_NOPING for NLM RPC clients · 031fd3aa
      Jeff Layton authored
      It's currently possible for an unresponsive NLM client to completely
      lock up a server's lockd. The scenario is something like this:
      
      1) client1 (or a process on the server) takes a lock on a file
      2) client2 tries to take a blocking lock on the same file and
         awaits the callback
      3) client2 goes unresponsive (plug pulled, network partition, etc)
      4) client1 releases the lock
      
      ...at that point the server's lockd will try to queue up a GRANT_MSG
      callback for client2, but first it requeues the block with a timeout of
      30s. nlm_async_call will attempt to bind the RPC client to client2 and
      will call rpc_ping. rpc_ping entails a sync RPC call and if client2 is
      unresponsive it will take around 60s for that to time out. Once it times
      out, it's already time to retry the block and the whole process repeats.
      
      Once in this situation, nlmsvc_retry_blocked will never return until
      the host starts responding again. lockd won't service new calls.
      
      Fix this by skipping the RPC ping on NLM RPC clients. This makes
      nlm_async_call return quickly when called.
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      031fd3aa
  2. 06 Feb, 2008 31 commits
  3. 05 Feb, 2008 4 commits