cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] Re: [NFS] [PATCH 3/4 Revised] NLM failover - statd changes
Date: Tue, 26 Sep 2006 10:54:29 +1000	[thread overview]
Message-ID: <17688.31301.427937.926300@cse.unsw.edu.au> (raw)
In-Reply-To: <message from Wendy Cheng on Thursday September 14>

On Thursday September 14, wcheng at redhat.com wrote:
> This kernel patch should be paired with nfs-utils user mode changes (in 
> patch 4-4 based on nfs-utils-1.0.8-rc4) that is optional. If changes 
> made in patch 4-4 is not presented in nfs-utils, the rpc.statd will 
> ignore whatever this kernel patch does.
> 
> The changes record the ip interface that accepts the lock requests and 
> passes the correct "my_name" (in standard IPV4 dot notation) to user 
> mode statd (instead of system_utsname.nodename). This enables rpc.statd 
> to add the correct taken-over IPv4 address into the 3rd parameter of 
> ha_callout program. Current nfs-utils always resets "my_name" into 
> loopback address (127.0.0.1), regardless the statement made in rpc.statd 
> man page. Check out "man rpc.statd" for details.
> 
> Signed-off-by: S. Wendy Cheng <wcheng@redhat.com>
> Signed-off-by: Lon Hohberger  <lhh@redhat.com>
> 
>  fs/lockd/host.c                |    4 ++--
>  fs/lockd/mon.c                 |   21 +++++++++++++++++----
>  fs/lockd/svc4proc.c            |    8 +++++++-
>  fs/lockd/svcproc.c             |    2 +-
>  include/linux/lockd/lockd.h    |    5 +++--
>  include/linux/lockd/sm_inter.h |    1 +
>  include/linux/sunrpc/svc.h     |    5 +++--
>  net/sunrpc/svcsock.c           |    5 +++++
>  8 files changed, 39 insertions(+), 12 deletions(-)
> 
> 
> --- linux-2/include/linux/sunrpc/svc.h	2006-09-11 16:52:34.000000000 -0400
> +++ linux-3/include/linux/sunrpc/svc.h	2006-09-13 14:07:32.000000000 -0400
> @@ -102,6 +102,7 @@ static inline void svc_putu32(struct kve
>  	iov->iov_len += sizeof(u32);
>  }
>  
> +typedef __u32  svc_addr_t;
>  	
>  /*
>   * The context of a single thread, including the request currently being
> @@ -138,8 +139,8 @@ struct svc_rqst {
>  	unsigned short
>  				rq_secure  : 1;	/* secure port */
>  
> -
> -	__u32			rq_daddr;	/* dest addr of request - reply from here */
> +	svc_addr_t		rq_daddr;	/* dest addr of request 
> +						   - reply from here */
>  
>  	void *			rq_argp;	/* decoded arguments */
>  	void *			rq_resp;	/* xdr'd results */
> --- linux-2/include/linux/lockd/lockd.h	2006-09-13 22:48:00.000000000 -0400
> +++ linux-3/include/linux/lockd/lockd.h	2006-09-13 22:51:41.000000000 -0400
> @@ -39,12 +39,13 @@
>  struct nlm_host {
>  	struct nlm_host *	h_next;		/* linked list (hash table) */
>  	struct sockaddr_in	h_addr;		/* peer address */
> +	svc_addr_t		h_server;	/* server ip for NLM failover */

Comment should say 'or 0 for client'.

>  	struct rpc_clnt	*	h_rpcclnt;	/* RPC client to talk to peer */
>  	char			h_name[20];	/* remote hostname */
>  	u32			h_version;	/* interface version */
>  	unsigned short		h_proto;	/* transport proto */
>  	unsigned short		h_reclaiming : 1,
> -				h_server     : 1, /* server side, not client side */
> +				h_notused    : 1, 

Just discard this, no need to rename it to 'h_notused'.

>  
> +#if 0
> +	if (argp->reclaim) {
> +		printk("nlm4svc_proc_lock lock reclaim received\n");
> +	}
> +#endif

Can this be removed?


So: mostly looks OK, but will need quite a bit of reworking do to
recent changes in lockd code.  So if you can get me a version that
applies to latest -mm, I'll take it from there.

Thanks,
NeilBrown



  parent reply	other threads:[~2006-09-26  0:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-14  4:44 [Cluster-devel] [PATCH 1/4 Revised] NLM failover - nlm_unlock Wendy Cheng
     [not found] ` <message from Wendy Cheng on Thursday September 14>
2006-09-26  0:39   ` [Cluster-devel] Re: [NFS] " Neil Brown
2007-03-23 22:55     ` Wendy Cheng
2006-09-26  0:46   ` [Cluster-devel] Re: [NFS] [PATCH 2/4 Revised] NLM failover - nlm_set_igrace Neil Brown
2007-03-26 22:21     ` Wendy Cheng
2007-03-28  2:45       ` J. Bruce Fields
2007-03-28  5:32         ` Wendy Cheng
2007-03-28 23:28           ` J. Bruce Fields
2007-03-29  5:31             ` Wendy Cheng
2006-09-26  0:54   ` Neil Brown [this message]
2006-09-26 13:42     ` [Cluster-devel] Re: [NFS] [PATCH 3/4 Revised] NLM failover - statd changes Wendy Cheng
  -- strict thread matches above, loose matches on Subject: below --
2006-09-14  4:48 [Cluster-devel] [PATCH 2/4 Revised] NLM failover - nlm_set_igrace Wendy Cheng
2006-09-14  4:50 [Cluster-devel] [PATCH 3/4 Revised] NLM failover - statd changes Wendy Cheng
2007-03-27 22:46 ` Wendy Cheng
2007-03-30  7:20   ` Wendy Cheng
2007-03-30  7:25     ` Wendy Cheng

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=17688.31301.427937.926300@cse.unsw.edu.au \
    --to=neilb@suse.de \
    /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).