Skip to contentSkip to conversation

nfsd: Make INET6 transport creation failure an informational message

RFC PATCH In review Tom Tucker 2 participants 2 messages Apr 1, 2010 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Tom Tucker

author
#0 lore raw

RFC PATCH 1/1 nfsd: Make INET6 transport creation failure an informational message

If this looks right to everyone, I'll post this to linux-nfs.

Tom

nfsd: Make INET6 transport creation failure an informational message

The write_ports code will fail both the IENT4 and INET6 transport creation if the transport returns an error when PF_INET6 is specified. Some transports that do not support INET6 return an error other than EAFNOSUPPORT. We should allow communication on INET4 even if INET6 is not yet supported or fails for some reason.

---

fs/nfsd/nfsctl.c | 6 ++++--

1 files changed, 4 insertions(+), 2 deletions(-)
fs/nfsd/nfsctl.c +0 -0
index 0f0e77f..019a89e 100644
@@ -1008,8 +1008,10 @@ static ssize_t __write_ports_addxprt(char *buf)
 
	err = svc_create_xprt(nfsd_serv, transport,
				PF_INET6, port, SVC_SOCK_ANONYMOUS);

- if (err < 0 && err != -EAFNOSUPPORT)
- goto out_close;
+ if (err < 0)
+ dprintk("nfsd: Error creating PF_INET6 listener for transport '%s'\n",
+ transport);
+

	return 0;
out_close:
	xprt = svc_find_xprt(nfsd_serv, transport, PF_INET, port);

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Looks good.

Quoted 35 lines · Tom Tucker

If this looks right to everyone, I'll post this to linux-nfs.

Tom

nfsd: Make INET6 transport creation failure an informational message

The write_ports code will fail both the IENT4 and INET6 transport creation if the transport returns an error when PF_INET6 is specified. Some transports that do not support INET6 return an error other than EAFNOSUPPORT. We should allow communication on INET4 even if INET6 is not yet supported or fails for some reason.

---

fs/nfsd/nfsctl.c | 6 ++++--

1 files changed, 4 insertions(+), 2 deletions(-)
fs/nfsd/nfsctl.c +4 -2
index 0f0e77f..019a89e 100644
@@ -1008,8 +1008,10 @@ static ssize_t __write_ports_addxprt(char *buf)
 
    err = svc_create_xprt(nfsd_serv, transport,
                PF_INET6, port, SVC_SOCK_ANONYMOUS);
-    if (err < 0 && err != -EAFNOSUPPORT)
-        goto out_close;
+    if (err < 0)
+        dprintk("nfsd: Error creating PF_INET6 listener for transport 
 '%s'\n",
+             transport);
+
    return 0;

out_close:

Quoted 1 line
    xprt = svc_find_xprt(nfsd_serv, transport, PF_INET, port);

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html