* [PATCH] NFS: Enable NFSv4 callback server to listen on AF_INET6 sockets
@ 2008-10-16 21:41 Chuck Lever
[not found] ` <20081016212513.21561.55647.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Chuck Lever @ 2008-10-16 21:41 UTC (permalink / raw)
To: trond.myklebust; +Cc: linux-nfs
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.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
I just pulled from your origin/master branch, and this patch appears to
be missing from the 2.6.28 merge. The patch was posted originally in
late August to linux-nfs.
http://marc.info/?l=linux-nfs&m=121987073015249&w=2
Bruce took the others in that series, but I think he may have left this
one for you since it hits only the client.
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;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread[parent not found: <20081016212513.21561.55647.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>]
* Re: [PATCH] NFS: Enable NFSv4 callback server to listen on AF_INET6 sockets [not found] ` <20081016212513.21561.55647.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org> @ 2008-10-17 13:46 ` Trond Myklebust 2008-10-17 15:03 ` Chuck Lever 0 siblings, 1 reply; 4+ messages in thread From: Trond Myklebust @ 2008-10-17 13:46 UTC (permalink / raw) To: Chuck Lever; +Cc: linux-nfs On Thu, 2008-10-16 at 17:41 -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. > > Signed-off-by: Chuck Lever <chuck.lever@oracle.com> > --- > > I just pulled from your origin/master branch, and this patch appears to > be missing from the 2.6.28 merge. The patch was posted originally in > late August to linux-nfs. > > http://marc.info/?l=linux-nfs&m=121987073015249&w=2 > > Bruce took the others in that series, but I think he may have left this > one for you since it hits only the client. I didn't take it at the time because it wouldn't even apply, let alone compile, without commit e851db5b05408b89b9a9429a66814b79fabee2a1. I'll push it to Linus later today. -- Trond Myklebust Linux NFS client maintainer NetApp Trond.Myklebust@netapp.com www.netapp.com ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] NFS: Enable NFSv4 callback server to listen on AF_INET6 sockets 2008-10-17 13:46 ` Trond Myklebust @ 2008-10-17 15:03 ` Chuck Lever 2008-10-17 18:40 ` J. Bruce Fields 0 siblings, 1 reply; 4+ messages in thread From: Chuck Lever @ 2008-10-17 15:03 UTC (permalink / raw) To: Trond Myklebust; +Cc: linux-nfs On Oct 17, 2008, at Oct 17, 2008, 9:46 AM, Trond Myklebust wrote: > On Thu, 2008-10-16 at 17:41 -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. >> >> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> >> --- >> >> I just pulled from your origin/master branch, and this patch >> appears to >> be missing from the 2.6.28 merge. The patch was posted originally in >> late August to linux-nfs. >> >> http://marc.info/?l=linux-nfs&m=121987073015249&w=2 >> >> Bruce took the others in that series, but I think he may have left >> this >> one for you since it hits only the client. > > I didn't take it at the time because it wouldn't even apply, let alone > compile, without commit e851db5b05408b89b9a9429a66814b79fabee2a1. Yeah, that's been a common problem with these latest patch sets. Hopefully we are through that now. > I'll push it to Linus later today. Thanks! -- Chuck Lever chuck[dot]lever[at]oracle[dot]com ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] NFS: Enable NFSv4 callback server to listen on AF_INET6 sockets 2008-10-17 15:03 ` Chuck Lever @ 2008-10-17 18:40 ` J. Bruce Fields 0 siblings, 0 replies; 4+ messages in thread From: J. Bruce Fields @ 2008-10-17 18:40 UTC (permalink / raw) To: Chuck Lever; +Cc: Trond Myklebust, linux-nfs On Fri, Oct 17, 2008 at 11:03:42AM -0400, Chuck Lever wrote: > On Oct 17, 2008, at Oct 17, 2008, 9:46 AM, Trond Myklebust wrote: >> On Thu, 2008-10-16 at 17:41 -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. >>> >>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> >>> --- >>> >>> I just pulled from your origin/master branch, and this patch appears >>> to >>> be missing from the 2.6.28 merge. The patch was posted originally in >>> late August to linux-nfs. >>> >>> http://marc.info/?l=linux-nfs&m=121987073015249&w=2 >>> >>> Bruce took the others in that series, but I think he may have left >>> this >>> one for you since it hits only the client. >> >> I didn't take it at the time because it wouldn't even apply, let alone >> compile, without commit e851db5b05408b89b9a9429a66814b79fabee2a1. > > Yeah, that's been a common problem with these latest patch sets. > Hopefully we are through that now. If you see it happening again, mention it and let's try to work out something better. We should be able to pull any common prerequisites into both of our trees somehow. --b. > >> I'll push it to Linus later today. > > Thanks! > > -- > Chuck Lever > chuck[dot]lever[at]oracle[dot]com > -- > To unsubscribe from this list: send the line "unsubscribe linux-nfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-10-17 18:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-16 21:41 [PATCH] NFS: Enable NFSv4 callback server to listen on AF_INET6 sockets Chuck Lever
[not found] ` <20081016212513.21561.55647.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-10-17 13:46 ` Trond Myklebust
2008-10-17 15:03 ` Chuck Lever
2008-10-17 18:40 ` J. Bruce Fields
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.