All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: trond.myklebust@fys.uio.no, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/6] NLM: Remove address eye-catcher buffers from nlm_host
Date: Wed, 3 Dec 2008 14:03:32 -0500	[thread overview]
Message-ID: <20081203190332.GK16846@fieldses.org> (raw)
In-Reply-To: <20081201185734.10600.88841.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>

On Mon, Dec 01, 2008 at 01:57:34PM -0500, Chuck Lever wrote:
> The h_name field in struct nlm_host is a just copy of
> h_nsmhandle->sm_name.  Likewise, the contents of the h_addrbuf field
> should be identical to the sm_addrbuf field.
> 
> The h_srcaddrbuf field is used only in one place for debugging.  We can
> live without this until we get %pI formatting for printk().
> 
> Currently these buffers are 48 bytes, but we need to support scope IDs
> in IPv6 presentation addresses, which means making the buffers even
> larger.  Instead, let's find ways to eliminate them to save space.
> 
> Finally, AF_UNSPEC support is no longer needed in nlm_display_address()
> now that it is not used for the h_srcaddr field.

As usual, whenever there's a "finally, ..." or "next, ..." I'd like a
separate patch.

Though this is distinct enough it's not really a problem to read.  Leave
it as is, OK.

> @@ -232,11 +229,6 @@ static struct nlm_host *nlm_lookup_host(struct nlm_lookup_host_info *ni)
>  
>  	nrhosts++;
>  
> -	nlm_display_address((struct sockaddr *)&host->h_addr,
> -				host->h_addrbuf, sizeof(host->h_addrbuf));
> -	nlm_display_address((struct sockaddr *)&host->h_srcaddr,
> -				host->h_srcaddrbuf, sizeof(host->h_srcaddrbuf));
> -
>  	dprintk("lockd: nlm_lookup_host created host %s\n",
>  			host->h_name);
>  
> @@ -378,8 +370,8 @@ nlm_bind_host(struct nlm_host *host)
>  {
>  	struct rpc_clnt	*clnt;
>  
> -	dprintk("lockd: nlm_bind_host %s (%s), my addr=%s\n",
> -			host->h_name, host->h_addrbuf, host->h_srcaddrbuf);
> +	dprintk("lockd: nlm_bind_host %s (%s)\n",
> +			host->h_name, host->h_nsmhandle->sm_addrbuf);

Hm, just checking: so the only place I can see h_nsmhandle set NULL is
in nsm_unmonitor(), which is called only from nlm_destroy_host(),
shortly before a kfree(host), but before a possible
rpc_shutdown_client()--and doesn't look like an rpc task could be
calling rpc_bind_host()?  OK.

And on the creation end, looks like h_nsmhandle is set on host creation.
So that won't be a NULL deference.  OK, looks fine.  Applied.

--b.

>  
>  	/* Lock host handle */
>  	mutex_lock(&host->h_mutex);
> diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
> index 23da3fa..4467b83 100644
> --- a/include/linux/lockd/lockd.h
> +++ b/include/linux/lockd/lockd.h
> @@ -65,9 +65,6 @@ struct nlm_host {
>  	struct list_head	h_granted;	/* Locks in GRANTED state */
>  	struct list_head	h_reclaim;	/* Locks in RECLAIM state */
>  	struct nsm_handle *	h_nsmhandle;	/* NSM status handle */
> -
> -	char			h_addrbuf[48],	/* address eyecatchers */
> -				h_srcaddrbuf[48];
>  };
>  
>  struct nsm_handle {
> 

  parent reply	other threads:[~2008-12-03 19:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-01 18:57 [PATCH 0/6] First set of patches for 2.6.29 Chuck Lever
     [not found] ` <20081201185108.10600.21700.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-12-01 18:57   ` [PATCH 1/6] NLM: Remove address eye-catcher buffers from nlm_host Chuck Lever
     [not found]     ` <20081201185734.10600.88841.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-12-03 19:03       ` J. Bruce Fields [this message]
2008-12-03 19:10         ` Chuck Lever
2008-12-01 18:57   ` [PATCH 2/6] NLM: Support IPv6 scope IDs in nlm_display_address() Chuck Lever
     [not found]     ` <20081201185741.10600.7375.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-12-03 19:34       ` J. Bruce Fields
2008-12-03 19:46         ` J. Bruce Fields
2008-12-01 18:57   ` [PATCH 3/6] NSM: Support IPv6 version of mon_name Chuck Lever
     [not found]     ` <20081201185749.10600.38468.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-12-03 21:01       ` J. Bruce Fields
2008-12-03 21:19         ` Chuck Lever
2008-12-03 21:24           ` Chuck Lever
2008-12-01 18:57   ` [PATCH 4/6] NLM: Clean up nsm_monitor() call Chuck Lever
     [not found]     ` <20081201185757.10600.38854.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-12-03 21:08       ` J. Bruce Fields
2008-12-03 21:20         ` Chuck Lever
2008-12-01 18:58   ` [PATCH 5/6] " Chuck Lever
     [not found]     ` <20081201185805.10600.23630.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-12-03 21:28       ` J. Bruce Fields
2008-12-01 18:58   ` [PATCH 6/6] NSM: Serialize SM_MON and SM_UNMON upcalls Chuck Lever
     [not found]     ` <20081201185812.10600.92501.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-12-03 21:41       ` J. Bruce Fields
2008-12-04  0:38         ` Chuck Lever
2008-12-04  3:55           ` J. Bruce Fields

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=20081203190332.GK16846@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@fys.uio.no \
    /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.