Skip to contentSkip to conversation

NFS server problems in 2.6.0-test[4,5]

DISCUSSION David Mosberger 2 participants 3 messages Sep 15, 2003 – Sep 16, 2003

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Has there been any progress in getting the NFS server debugged?

	--david
#1 lore raw
Quoted 1 line · David Mosberger

Has there been any progress in getting the NFS server debugged?

Yep, on the NFS mailing list ... here's the latest patch courtesy of Neil Brown & Trond. I still get a 5:30 minute hang when mounting my ia64 NFS server, but that's probably something else.

Wouldn't surprise me if this affects other 64 bit arches too.

net/sunrpc/svcsock.c renamed from net/sunrpc/svcsock.c~current~ +10 -10
diff ./net/sunrpc/svcsock.c~current~ ./net/sunrpc/svcsock.c
@@ -352,9 +352,9 @@ svc_sendto(struct svc_rqst *rqstp, struc
 	struct svc_sock	*svsk = rqstp->rq_sock;
 	struct socket	*sock = svsk->sk_sock;
 	int		slen;
-	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		len = 0;
 	int		result;
 	int		size;
@@ -374,13 +374,13 @@ svc_sendto(struct svc_rqst *rqstp, struc
 		msg.msg_iovlen  = 0;
 		msg.msg_flags	= MSG_MORE;
 
-		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;
 
 		if (sock_sendmsg(sock, &msg, 0) < 0)
 			goto out;
Signature · 3 lines
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
#2 lore raw
In reply to David Mosberger

--text follows this line--

Quoted 1 line · David Mosberger
Quoted 1 line

Has there been any progress in getting the NFS server debugged?

Matthew> Yep, on the NFS mailing list ... here's the latest patch courtesy Matthew> of Neil Brown & Trond. I still get a 5:30 minute hang when mounting Matthew> my ia64 NFS server, but that's probably something else.

Matthew> Wouldn't surprise me if this affects other 64 bit arches too.

I'm glad I asked...

The patch works fine for me. I don't see any hangs either.

Thanks,

	--david