All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Kirch <okir@suse.de>
To: Greg Banks <gnb@melbourne.sgi.com>
Cc: asha yr <asha_yr@rediffmail.com>,
	Linux NFS Mailing List <nfs@lists.sourceforge.net>
Subject: Re: NFS lock reclaiming not working on SLES9 SP2
Date: Fri, 17 Feb 2006 10:56:18 +0100	[thread overview]
Message-ID: <20060217095618.GB25707@suse.de> (raw)
In-Reply-To: <1140169024.31913.2313.camel@hole.melbourne.sgi.com>

[-- Attachment #1: Type: text/plain, Size: 572 bytes --]

On Fri, Feb 17, 2006 at 08:37:05PM +1100, Greg Banks wrote:
> In his trace, the client wasn't sending any LOCK calls at all
> for multiple minutes after receiving the NOTIFY.

Ah, you're right. I wasn't paying attention to the time stamps.

It seems the problem is that we're now using hostnames to identify lockd
peers, but you mounted the file system using the ipaddr:/path.

Could you please try the attached patch?

Thanks
Olaf
-- 
Olaf Kirch   |  --- o --- Nous sommes du soleil we love when we play
okir@suse.de |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax

[-- Attachment #2: statd-hostname-fix --]
[-- Type: text/plain, Size: 3020 bytes --]

 fs/lockd/host.c             |    5 +++--
 fs/lockd/statd.c            |    2 +-
 fs/lockd/svc4proc.c         |    2 +-
 fs/lockd/svcproc.c          |    2 +-
 include/linux/lockd/lockd.h |    2 +-
 5 files changed, 7 insertions(+), 6 deletions(-)

Index: build/fs/lockd/host.c
===================================================================
--- build.orig/fs/lockd/host.c
+++ build/fs/lockd/host.c
@@ -274,7 +274,7 @@ void nlm_release_host(struct nlm_host *h
  * Given an IP address, initiate recovery and ditch all locks.
  */
 void
-nlm_host_rebooted(const char *hostname, u32 new_state)
+nlm_host_rebooted(struct sockaddr_in *addr, const char *hostname, u32 new_state)
 {
 	struct nlm_host	*host, **hp;
 	int		hash;
@@ -287,7 +287,8 @@ nlm_host_rebooted(const char *hostname, 
 	/* Mark all matching hosts as having rebooted */
 	for (hash = 0; hash < NLM_HOST_NRHASH; hash++) {
 		for (hp = &nlm_hosts[hash]; (host = *hp); hp = &host->h_next) {
-			if (nlm_cmp_name(host->h_name, hostname)) {
+			if (nlm_cmp_name(host->h_name, hostname)
+			 || (addr && nlm_cmp_addr(&host->h_addr, addr))) {
 				if (host->h_nsmhandle)
 					host->h_nsmhandle->sm_monitored = 0;
 				host->h_rebooted = 1;
Index: build/fs/lockd/statd.c
===================================================================
--- build.orig/fs/lockd/statd.c
+++ build/fs/lockd/statd.c
@@ -311,7 +311,7 @@ nsmsvc_proc_notify(struct svc_rqst *rqst
 				           struct nsm_res  *resp)
 {
 	dprintk("statd: NOTIFY        called\n");
-	nlm_host_rebooted(argp->mon_name, argp->state);
+	nlm_host_rebooted(&rqstp->rq_addr, argp->mon_name, argp->state);
 	return rpc_success;
 }
 
Index: build/fs/lockd/svc4proc.c
===================================================================
--- build.orig/fs/lockd/svc4proc.c
+++ build/fs/lockd/svc4proc.c
@@ -427,7 +427,7 @@ nlm4svc_proc_sm_notify(struct svc_rqst *
 		return rpc_system_err;
 	}
 
-	nlm_host_rebooted(argp->mon, argp->state);
+	nlm_host_rebooted(NULL, argp->mon, argp->state);
 	return rpc_success;
 }
 
Index: build/fs/lockd/svcproc.c
===================================================================
--- build.orig/fs/lockd/svcproc.c
+++ build/fs/lockd/svcproc.c
@@ -455,7 +455,7 @@ nlmsvc_proc_sm_notify(struct svc_rqst *r
 		return rpc_system_err;
 	}
 
-	nlm_host_rebooted(argp->mon, argp->state);
+	nlm_host_rebooted(NULL, argp->mon, argp->state);
 	return rpc_success;
 }
 
Index: build/include/linux/lockd/lockd.h
===================================================================
--- build.orig/include/linux/lockd/lockd.h
+++ build/include/linux/lockd/lockd.h
@@ -166,7 +166,7 @@ struct nlm_host * nlm_get_host(struct nl
 void		  nlm_release_host(struct nlm_host *);
 void		  nlm_shutdown_hosts(void);
 extern struct nlm_host *nlm_find_client(void);
-extern void	  nlm_host_rebooted(const char *, u32);
+extern void	  nlm_host_rebooted(struct sockaddr_in *, const char *, u32);
 struct nsm_handle *nsm_find(const char *, int);
 void             nsm_release(struct nsm_handle *);
 

  reply	other threads:[~2006-02-17  9:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-17  4:44 NFS lock reclaiming not working on SLES9 SP2 asha  yr
2006-02-17  9:25 ` Olaf Kirch
2006-02-17  9:37   ` Greg Banks
2006-02-17  9:56     ` Olaf Kirch [this message]
2006-02-17 10:03       ` Greg Banks
2006-02-17 19:08       ` Marc Eshel

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=20060217095618.GB25707@suse.de \
    --to=okir@suse.de \
    --cc=asha_yr@rediffmail.com \
    --cc=gnb@melbourne.sgi.com \
    --cc=nfs@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.