1. 11 12月, 2012 1 次提交
    • S
      nfsd: make NFSd service structure allocated per net · 9dd9845f
      Stanislav Kinsbursky 提交于
      This patch makes main step in NFSd containerisation.
      
      There could be different approaches to how to make NFSd able to handle
      incoming RPC request from different network namespaces.  The two main
      options are:
      
      1) Share NFSd kthreads betwween all network namespaces.
      2) Create separated pool of threads for each namespace.
      
      While first approach looks more flexible, second one is simpler and
      non-racy.  This patch implements the second option.
      
      To make it possible to allocate separate pools of threads, we have to
      make it possible to allocate separate NFSd service structures per net.
      Signed-off-by: NStanislav Kinsbursky <skinsbursky@parallels.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      9dd9845f
  2. 04 12月, 2012 1 次提交
  3. 03 12月, 2012 8 次提交
  4. 29 11月, 2012 1 次提交
  5. 28 11月, 2012 8 次提交
  6. 26 11月, 2012 1 次提交
    • J
      nfsd4: downgrade some fs/nfsd/nfs4state.c BUG's · 063b0fb9
      J. Bruce Fields 提交于
      Linus has pointed out that indiscriminate use of BUG's can make it
      harder to diagnose bugs because they can bring a machine down, often
      before we manage to get any useful debugging information to the logs.
      (Consider, for example, a BUG() that fires in a workqueue, or while
      holding a spinlock).
      
      Most of these BUG's won't do much more than kill an nfsd thread, but it
      would still probably be safer to get out the warning without dying.
      
      There's still more of this to do in nfsd/.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      063b0fb9
  7. 15 11月, 2012 16 次提交
  8. 13 11月, 2012 4 次提交
    • J
      nfsd: get rid of cl_recdir field · 2216d449
      Jeff Layton 提交于
      Remove the cl_recdir field from the nfs4_client struct. Instead, just
      compute it on the fly when and if it's needed, which is now only when
      the legacy client tracking code is in effect.
      
      The error handling in the legacy client tracker is also changed to
      handle the case where md5 is unavailable. In that case, we'll warn
      the admin with a KERN_ERR message and disable the client tracking.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      2216d449
    • J
      nfsd: move the confirmed and unconfirmed hlists to a rbtree · ac55fdc4
      Jeff Layton 提交于
      The current code requires that we md5 hash the name in order to store
      the client in the confirmed and unconfirmed trees. Change it instead
      to store the clients in a pair of rbtrees, and simply compare the
      cl_names directly instead of hashing them. This also necessitates that
      we add a new flag to the clp->cl_flags field to indicate which tree
      the client is currently in.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      ac55fdc4
    • J
      nfsd: don't search for client by hash on legacy reboot recovery gracedone · 0ce0c2b5
      Jeff Layton 提交于
      When nfsd starts, the legacy reboot recovery code creates a tracking
      struct for each directory in the v4recoverydir. When the grace period
      ends, it basically does a "readdir" on the directory again, and matches
      each dentry in there to an existing client id to see if it should be
      removed or not. If the matching client doesn't exist, or hasn't
      reclaimed its state then it will remove that dentry.
      
      This is pretty inefficient since it involves doing a lot of hash-bucket
      searching. It also means that we have to keep relying on being able to
      search for a nfs4_client by md5 hashed cl_recdir name.
      
      Instead, add a pointer to the nfs4_client that indicates the association
      between the nfs4_client_reclaim and nfs4_client. When a reclaim operation
      comes in, we set the pointer to make that association. On gracedone, the
      legacy client tracker will keep the recdir around iff:
      
      1/ there is a reclaim record for the directory
      
      ...and...
      
      2/ there's an association between the reclaim record and a client record
      -- that is, a create or check operation was performed on the client that
      matches that directory.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      0ce0c2b5
    • J
      nfsd: make nfs4_client_to_reclaim return a pointer to the reclaim record · 772a9bbb
      Jeff Layton 提交于
      Later callers will need to make changes to the record.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      772a9bbb