linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH 08/11] lockd: Rename nlm_hosts
Date: Thu, 09 Dec 2010 11:49:52 -0500	[thread overview]
Message-ID: <20101209164952.4513.13794.stgit@matisse.1015granger.net> (raw)
In-Reply-To: <20101209163555.4513.94435.stgit@matisse.1015granger.net>

Clean up.

Rename nlm_hosts to match convention of client side cache.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 fs/lockd/host.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/fs/lockd/host.c b/fs/lockd/host.c
index 09286e2..2b515e2 100644
--- a/fs/lockd/host.c
+++ b/fs/lockd/host.c
@@ -25,7 +25,7 @@
 #define NLM_HOST_EXPIRE		(300 * HZ)
 #define NLM_HOST_COLLECT	(120 * HZ)
 
-static struct hlist_head	nlm_hosts[NLM_HOST_NRHASH];
+static struct hlist_head	nlm_server_hosts[NLM_HOST_NRHASH];
 static struct hlist_head	nlm_client_hosts[NLM_HOST_NRHASH];
 
 #define for_each_host(host, pos, chain, table) \
@@ -180,7 +180,7 @@ static struct nlm_host *nlm_lookup_host(struct nlm_lookup_host_info *ni)
 	 * different NLM rpc_clients into one single nlm_host object.
 	 * This would allow us to have one nlm_host per address.
 	 */
-	chain = &nlm_hosts[nlm_hash_address(ni->sap)];
+	chain = &nlm_server_hosts[nlm_hash_address(ni->sap)];
 	hlist_for_each_entry(host, pos, chain, h_hash) {
 		if (!rpc_cmp_addr(nlm_addr(host), ni->sap))
 			continue;
@@ -424,7 +424,7 @@ struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp,
 	if (time_after_eq(jiffies, next_gc))
 		nlm_gc_hosts();
 
-	chain = &nlm_hosts[nlm_hash_address(ni.sap)];
+	chain = &nlm_server_hosts[nlm_hash_address(ni.sap)];
 	hlist_for_each_entry(host, pos, chain, h_hash) {
 		if (!rpc_cmp_addr(nlm_addr(host), ni.sap))
 			continue;
@@ -628,7 +628,7 @@ void nlm_host_rebooted(const struct nlm_reboot *info)
 	 * lock for this.
 	 * To avoid processing a host several times, we match the nsmstate.
 	 */
-	while ((host = next_host_state(nlm_hosts, nsm, info)) != NULL) {
+	while ((host = next_host_state(nlm_server_hosts, nsm, info)) != NULL) {
 		nlmsvc_free_host_resources(host);
 		nlmsvc_release_host(host);
 	}
@@ -656,7 +656,7 @@ nlm_shutdown_hosts(void)
 
 	/* First, make all hosts eligible for gc */
 	dprintk("lockd: nuking all hosts...\n");
-	for_each_host(host, pos, chain, nlm_hosts) {
+	for_each_host(host, pos, chain, nlm_server_hosts) {
 		host->h_expires = jiffies - 1;
 		if (host->h_rpcclnt) {
 			rpc_shutdown_client(host->h_rpcclnt);
@@ -672,7 +672,7 @@ nlm_shutdown_hosts(void)
 	if (nrhosts) {
 		printk(KERN_WARNING "lockd: couldn't shutdown host module!\n");
 		dprintk("lockd: %d hosts left:\n", nrhosts);
-		for_each_host(host, pos, chain, nlm_hosts) {
+		for_each_host(host, pos, chain, nlm_server_hosts) {
 			dprintk("       %s (cnt %d use %d exp %ld)\n",
 				host->h_name, atomic_read(&host->h_count),
 				host->h_inuse, host->h_expires);
@@ -693,13 +693,13 @@ nlm_gc_hosts(void)
 	struct nlm_host	*host;
 
 	dprintk("lockd: host garbage collection\n");
-	for_each_host(host, pos, chain, nlm_hosts)
+	for_each_host(host, pos, chain, nlm_server_hosts)
 		host->h_inuse = 0;
 
 	/* Mark all hosts that hold locks, blocks or shares */
 	nlmsvc_mark_resources();
 
-	for_each_host_safe(host, pos, next, chain, nlm_hosts) {
+	for_each_host_safe(host, pos, next, chain, nlm_server_hosts) {
 		if (atomic_read(&host->h_count) || host->h_inuse
 		 || time_before(jiffies, host->h_expires)) {
 			dprintk("nlm_gc_hosts skipping %s "


  parent reply	other threads:[~2010-12-09 16:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-09 16:48 [PATCH 00/11] RFC: Split nlm_host cache Chuck Lever
2010-12-09 16:48 ` [PATCH 01/11] lockd: define host_for_each{_safe} macros Chuck Lever
2010-12-09 16:48 ` [PATCH 02/11] lockd: reorganize nlm_host_rebooted Chuck Lever
2010-12-09 16:48 ` [PATCH 03/11] lockd: Add nlm_alloc_host() Chuck Lever
2010-12-09 16:58   ` Trond Myklebust
2010-12-09 17:06     ` Chuck Lever
2010-12-09 16:48 ` [PATCH 04/11] lockd: Add nlm_destroy_host_locked() Chuck Lever
2010-12-09 16:48 ` [PATCH 05/11] lockd: Split nlm_release_call() Chuck Lever
2010-12-09 16:49 ` [PATCH 06/11] lockd: Create client-side nlm_host cache Chuck Lever
2010-12-09 16:49 ` [PATCH 07/11] lockd: Clean up nlmsvc_lookup_host() Chuck Lever
2010-12-09 16:49 ` Chuck Lever [this message]
2010-12-09 16:50 ` [PATCH 09/11] lockd: Make nrhosts an unsigned long Chuck Lever
2010-12-09 16:50 ` [PATCH 10/11] lockd: Remove nlm_lookup_host() Chuck Lever
2010-12-09 16:50 ` [PATCH 11/11] lockd: Remove src_sap and src_len from nlm_lookup_host_info struct Chuck Lever
  -- strict thread matches above, loose matches on Subject: below --
2010-12-14 15:04 [PATCH 00/11] nlm_host cache split for 2.6.38 Chuck Lever
2010-12-14 15:06 ` [PATCH 08/11] lockd: Rename nlm_hosts Chuck Lever

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101209164952.4513.13794.stgit@matisse.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).