From: "J. Bruce Fields" <bfields@fieldses.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: trond.myklebust@netapp.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/6] NFS: Enable NFSv4 callback server to listen on AF_INET6 sockets
Date: Thu, 11 Sep 2008 17:41:04 -0400 [thread overview]
Message-ID: <20080911214104.GC17355@fieldses.org> (raw)
In-Reply-To: <20080827205706.17837.28843.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
On Wed, Aug 27, 2008 at 04:57:07PM -0400, Chuck Lever wrote:
> Allow the NFS callback server to listen for requests via an AF_INET6 or
> AF_INET socket when IPv6 support is present in the kernel.
My only nitpick is that the above sentence isn't clear. (I think you
want to say something like "... via AF_INET6, if IPv6 is supported, or
AF_INET otherwise".)
The patch makes sense to me, though.--b.
>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
>
> fs/nfs/callback.c | 19 +++++++++++++++----
> 1 files changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
> index 6a09760..c2e9cfd 100644
> --- a/fs/nfs/callback.c
> +++ b/fs/nfs/callback.c
> @@ -40,6 +40,16 @@ unsigned short nfs_callback_tcpport;
> static const int nfs_set_port_min = 0;
> static const int nfs_set_port_max = 65535;
>
> +/*
> + * If the kernel has IPv6 support available, always listen for
> + * both AF_INET and AF_INET6 requests.
> + */
> +#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
> +static const sa_family_t nfs_callback_family = AF_INET6;
> +#else
> +static const sa_family_t nfs_callback_family = AF_INET;
> +#endif
> +
> static int param_set_port(const char *val, struct kernel_param *kp)
> {
> char *endp;
> @@ -106,7 +116,7 @@ int nfs_callback_up(void)
> if (nfs_callback_info.users++ || nfs_callback_info.task != NULL)
> goto out;
> serv = svc_create(&nfs4_callback_program, NFS4_CALLBACK_BUFSIZE,
> - AF_INET, NULL);
> + nfs_callback_family, NULL);
> ret = -ENOMEM;
> if (!serv)
> goto out_err;
> @@ -116,7 +126,8 @@ int nfs_callback_up(void)
> if (ret <= 0)
> goto out_err;
> nfs_callback_tcpport = ret;
> - dprintk("Callback port = 0x%x\n", nfs_callback_tcpport);
> + dprintk("NFS: Callback listener port = %u (af %u)\n",
> + nfs_callback_tcpport, nfs_callback_family);
>
> nfs_callback_info.rqst = svc_prepare_thread(serv, &serv->sv_pools[0]);
> if (IS_ERR(nfs_callback_info.rqst)) {
> @@ -149,8 +160,8 @@ out:
> mutex_unlock(&nfs_callback_mutex);
> return ret;
> out_err:
> - dprintk("Couldn't create callback socket or server thread; err = %d\n",
> - ret);
> + dprintk("NFS: Couldn't create callback socket or server thread; "
> + "err = %d\n", ret);
> nfs_callback_info.users--;
> goto out;
> }
>
next prev parent reply other threads:[~2008-09-11 21:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-27 20:56 [PATCH 0/6] 2nd IPv6 patchset for 2.6.28 (repost) Chuck Lever
[not found] ` <20080827204852.17837.38361.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-08-27 20:57 ` [PATCH 1/6] NFS: Enable NFSv4 callback server to listen on AF_INET6 sockets Chuck Lever
[not found] ` <20080827205706.17837.28843.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-09-11 21:41 ` J. Bruce Fields [this message]
2008-08-27 20:57 ` [PATCH 2/6] NLM: Clean up before introducing new debugging messages Chuck Lever
[not found] ` <20080827205714.17837.95227.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-09-11 21:42 ` J. Bruce Fields
2008-09-11 21:45 ` J. Bruce Fields
2008-08-27 20:57 ` [PATCH 3/6] lockd: address-family independent printable addresses Chuck Lever
2008-08-27 20:57 ` [PATCH 4/6] lockd: Specify address family for source address Chuck Lever
2008-08-27 20:57 ` [PATCH 5/6] lockd: Add address family-agnostic helper for zeroing the port number Chuck Lever
2008-08-27 20:57 ` [PATCH 6/6] SUNRPC: Make svc_addr's argument a constant Chuck Lever
2008-08-29 17:25 ` [PATCH 0/6] 2nd IPv6 patchset for 2.6.28 (repost) J. Bruce Fields
2008-08-29 17:25 ` J. Bruce Fields
2008-08-29 17:29 ` 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=20080911214104.GC17355@fieldses.org \
--to=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@netapp.com \
/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