Messages in this thread Patch in this message | | | From | Neil Brown <> | Date | Sun, 14 Sep 2003 21:48:37 +1000 | Subject | Re: Linux 2.4.23-pre4 => NFSD problem on alpha |
| |
On Sunday September 14, willy@w.ods.org wrote: > Hi Marcelo, Neil, > > I've tested -pre4 on my alpha, and noticed that knsfd doesn't work anymore : > the client sticks in D state forever. It has been working flawlessly for > weeks with 2.4.22-rc2. What's strange is that 23-pre4 is OK on my athlon with > the same nfs-utils (1.0.5). > > I have the following NFSD options on both kernels : > CONFIG_NFSD=m > CONFIG_NFSD_V3=y > CONFIG_NFSD_TCP=y > > My alpha kernels were build with GCC 3.2.3, while the athlon one is done with > 2.95.3. > > If I have some time, I'll try intermediate kernels to find which one brought > the problem. I noticed that there were knfsd changes in 2.4.23-pre3, perhaps > they're related. If you want me to try a patch, please ask.
I know what broke it. Please try this patch and let me know.
NeilBrown
======================================================================= Fix cmsg setup for sock_sendmsg in svc_sendto
From: Trond Myklebust <trond.myklebust@fys.uio.no>
... see the code in ip_sockglue.c + the macros in socket.h.... AFAICS the control messages have wierd alignment requirements.
----------- Diffstat output ------------ ./net/sunrpc/svcsock.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
diff ./net/sunrpc/svcsock.c~current~ ./net/sunrpc/svcsock.c --- ./net/sunrpc/svcsock.c~current~ 2003-09-12 13:41:15.000000000 +1000 +++ ./net/sunrpc/svcsock.c 2003-09-14 21:46:50.000000000 +1000 @@ -317,9 +317,9 @@ svc_sendto(struct svc_rqst *rqstp, struc struct svc_sock *svsk = rqstp->rq_sock; struct socket *sock = svsk->sk_sock; struct msghdr msg; - struct { struct cmsghdr cmh; - struct in_pktinfo pki; - } cm; + char buffer[CMSG_SPACE(sizeof(struct in_pktinfo))]; + struct cmsghdr *cmh = (struct cmsghdr *)buffer; + struct in_pktinfo *pki = (struct in_pktinfo *)CMSG_DATA(cmh); int i, buflen, len; for (i = buflen = 0; i < nr; i++) @@ -330,13 +330,13 @@ svc_sendto(struct svc_rqst *rqstp, struc msg.msg_iov = iov; msg.msg_iovlen = nr; if (rqstp->rq_prot == IPPROTO_UDP) { - msg.msg_control = &cm; - msg.msg_controllen = sizeof(cm); - cm.cmh.cmsg_len = sizeof(cm); - cm.cmh.cmsg_level = SOL_IP; - cm.cmh.cmsg_type = IP_PKTINFO; - cm.pki.ipi_ifindex = 0; - cm.pki.ipi_spec_dst.s_addr = rqstp->rq_daddr; + msg.msg_control = cmh; + msg.msg_controllen = sizeof(buffer); + cmh->cmsg_len = CMSG_LEN(sizeof(*pki)); + cmh->cmsg_level = SOL_IP; + cmh->cmsg_type = IP_PKTINFO; + pki->ipi_ifindex = 0; + pki->ipi_spec_dst.s_addr = rqstp->rq_daddr; } else { msg.msg_control = NULL; msg.msg_controllen = 0; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |