Skip to contentSkip to conversation

nfsd not working in 2.6.0-test4 on ia64

DISCUSSION Matthew Wilcox 3 participants 6 messages Sep 3, 2003 – Sep 12, 2003

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

My mount attempts aren't working.

I turned on nfsd debugging and got...

Sep  3 17:34:00 rowlf rpc.mountd: authenticated mount request from gonzo.int.wil
.cx:787 for /pub (/pub)
Sep  3 17:34:00 rowlf kernel: found domain gonzo.int.wil.cx
Sep  3 17:34:00 rowlf kernel: found fsidtype 0
Sep  3 17:34:00 rowlf kernel: found fsid length 8
Sep  3 17:34:00 rowlf kernel: Path seems to be </pub>
Sep  3 17:34:00 rowlf kernel: Found the path /pub
Sep  3 17:34:00 rowlf kernel: And found export
Sep  3 17:34:00 rowlf kernel: nfsd: exp_rootfh(/pub [e0000040f69e1a80] gonzo.int
.wil.cx:sdb3/195064)
Sep  3 17:34:00 rowlf kernel: nfsd: fh_compose(exp 08:13/195064 //pub, ino=19506
4)
Sep  3 17:34:01 rowlf kernel: nfsd_dispatch: vers 2 proc 1
Sep  3 17:34:01 rowlf kernel: nfsd: GETATTR  32: 00000001 13000800 0002f9f8 0000
0000 00000000 00000000
Sep  3 17:34:01 rowlf kernel: nfsd: fh_verify(32: 00000001 13000800 0002f9f8 000

00000 00000000 00000000)

Then I added full rpc debugging, and got this:

Sep  3 17:56:26 rowlf kernel: svc: socket e0000040fe7b6f80(inet e0000040fe0f6480), count=112, busy=0
Sep  3 17:56:26 rowlf kernel: svc: socket e0000040fe0f6480 served by daemon e0000040425e6900
Sep  3 17:56:26 rowlf kernel: svc: server e0000040425e6900, socket e0000040fe7b6f80, inuse=1
Sep  3 17:56:26 rowlf kernel: svc: socket e0000040fe0f6480 served by daemon e0000040425e7500
Sep  3 17:56:26 rowlf kernel: svc: got len=104
Sep  3 17:56:26 rowlf kernel: svc: svc_authenticate (1)
Sep  3 17:56:26 rowlf kernel: svc: socket e0000040fe0f6480 busy, not enqueued
Sep  3 17:56:26 rowlf kernel: svc: calling dispatcher
Sep  3 17:56:26 rowlf kernel: nfsd_dispatch: vers 2 proc 1
Sep  3 17:56:26 rowlf kernel: nfsd: GETATTR  32: 00000001 13000800 0002f9f8 00000000 00000000 00000000
Sep  3 17:56:26 rowlf kernel: nfsd: fh_verify(32: 00000001 13000800 0002f9f8 00000000 00000000 00000000)
Sep  3 17:56:26 rowlf kernel: svc: service e0000040425e6900, releasing skb e0000040fe5ddf80
Sep  3 17:56:26 rowlf kernel: svc: socket e0000040fe7b6f80 sendto([e00000404258c000 96... ], 96) = 0 (addr 2501a8c0)
Sep  3 17:56:26 rowlf kernel: svc: socket e0000040fe0f6480 busy, not enqueued
Sep  3 17:56:26 rowlf kernel: svc: server e0000040425e6900 waiting for data (to = 3686400)
Sep  3 17:56:26 rowlf kernel: svc: server e0000040425e7500, socket e0000040fe7b6f80, inuse=1
Sep  3 17:56:26 rowlf kernel: svc: got len=-11

tcpdump confirms the same thing -- packets go in, but they don't come out.

Signature · 12 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


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#1 lore raw
Quoted 3 lines · On Wednesday September 3, [email protected] wrote:

My mount attempts aren't working.

...

Quoted 3 lines

Then I added full rpc debugging, and got this:

...

Quoted 1 line
Sep  3 17:56:26 rowlf kernel: svc: socket e0000040fe7b6f80 sendto([e00000404258c000 96... ], 96) = 0 (addr 2501a8c0)

...

Quoted 3 lines

tcpdump confirms the same thing -- packets go in, but they don't come out.

Very helpful details.
It looks like a simple case of 32-bit parochialism :-)

Does this patch help?
Thanks,
NeilBrown

net/sunrpc/svcsock.c renamed from net/sunrpc/svcsock.c~current~ +2 -2
diff ./net/sunrpc/svcsock.c~current~ ./net/sunrpc/svcsock.c
@@ -376,8 +376,8 @@ svc_sendto(struct svc_rqst *rqstp, struc
 		msg.msg_flags	= MSG_MORE;
 
 		msg.msg_control = &cm;
-		msg.msg_controllen = sizeof(cm);
-		cm.cmh.cmsg_len = sizeof(cm);
+		msg.msg_controllen = CMSG_LEN(sizeof(cm));
+		cm.cmh.cmsg_len = CMSG_LEN(sizeof(cm));
 		cm.cmh.cmsg_level = SOL_IP;
 		cm.cmh.cmsg_type = IP_PKTINFO;
 		cm.pki.ipi_ifindex = 0;

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#2 lore raw
Quoted 4 lines · Neil Brown

Very helpful details.
It looks like a simple case of 32-bit parochialism :-)

Does this patch help?

Nope. Applied patch, rebooted with it, here's the full details again (don't think anything changed, but just in case):

Sep  5 07:52:06 rowlf kernel: svc: socket e00000404404a680(inet e000004043d22480
), count=112, busy=0
Sep  5 07:52:06 rowlf kernel: svc: socket e000004043d22480 served by daemon e000
0040ea866900
Sep  5 07:52:06 rowlf kernel: svc: server e0000040ea866900, socket e00000404404a
680, inuse=1
Sep  5 07:52:06 rowlf kernel: svc: socket e000004043d22480 served by daemon e000
0040ea867500
Sep  5 07:52:06 rowlf kernel: svc: got len=104
Sep  5 07:52:06 rowlf kernel: svc: svc_authenticate (1)
Sep  5 07:52:06 rowlf kernel: svc: socket e000004043d22480 busy, not enqueued
Sep  5 07:52:06 rowlf kernel: svc: calling dispatcher
Sep  5 07:52:06 rowlf kernel: nfsd_dispatch: vers 2 proc 1
Sep  5 07:52:06 rowlf kernel: nfsd: GETATTR  32: 00000001 13000800 0002f9f8 0000
0000 00000000 00000000
Sep  5 07:52:06 rowlf kernel: nfsd: fh_verify(32: 00000001 13000800 0002f9f8 000
00000 00000000 00000000)
Sep  5 07:52:06 rowlf kernel: nfsd: storing reply in cache
Sep  5 07:52:06 rowlf kernel: svc: service e0000040ea866900, releasing skb e0000
040ff163d80
Sep  5 07:52:06 rowlf kernel: svc: socket e00000404404a680 sendto([e0000040ea30c
000 96... ], 96) = 0 (addr 2501a8c0)
Sep  5 07:52:06 rowlf kernel: svc: socket e000004043d22480 busy, not enqueued
Sep  5 07:52:06 rowlf kernel: svc: server e0000040ea866900 waiting for data (to 
= 3686400)
Sep  5 07:52:06 rowlf kernel: svc: server e0000040ea867500, socket e00000404404a
680, inuse=1
Sep  5 07:52:06 rowlf kernel: svc: got len=-11
Sep  5 07:52:06 rowlf kernel: svc: server e0000040ea867500 waiting for data (to 

= 3686400)

Signature · 12 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


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#3 lore raw
Quoted 8 lines · On Friday September 5, [email protected] wrote:
Quoted 4 lines · Neil Brown

Very helpful details.
It looks like a simple case of 32-bit parochialism :-)

Does this patch help?

Nope. Applied patch, rebooted with it, here's the full details again (don't think anything changed, but just in case):

Ok, I looked more closely at the .h files etc and I think the following is correct (instead of the previous patch).

(i.e. sizeof(cm.pki) instead of sizeof(cm)).

NeilBrown

net/sunrpc/svcsock.c renamed from net/sunrpc/svcsock.c~current~ +2 -2
diff ./net/sunrpc/svcsock.c~current~ ./net/sunrpc/svcsock.c
@@ -376,8 +376,8 @@ svc_sendto(struct svc_rqst *rqstp, struc
 		msg.msg_flags	= MSG_MORE;
 
 		msg.msg_control = &cm;
-		msg.msg_controllen = sizeof(cm);
-		cm.cmh.cmsg_len = sizeof(cm);
+		msg.msg_controllen = CMSG_LEN(sizeof(cm.pki));
+		cm.cmh.cmsg_len = CMSG_LEN(sizeof(cm.pki));
 		cm.cmh.cmsg_level = SOL_IP;
 		cm.cmh.cmsg_type = IP_PKTINFO;
 		cm.pki.ipi_ifindex = 0;

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#4 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

" " == Neil Brown <[email protected]> writes:

> On Friday September 5, [email protected] wrote:
>> On Fri, Sep 05, 2003 at 01:53:27PM +1000, Neil Brown wrote:
>> > Very helpful details. It looks like a simple case of 32-bit >> > parochialism :-)
>> >
>> > Does this patch help?
>>
>> Nope. Applied patch, rebooted with it, here's the full details >> again (don't think anything changed, but just in case):

> Ok, I looked more closely at the .h files etc and I think the > following is correct (instead of the previous patch).

> (i.e. sizeof(cm.pki) instead of sizeof(cm)).

Nope see the code in ip_sockglue.c + the macros in socket.h.... AFAICS the control messages have wierd alignment requirements.

Shouldn't it rather be something like the following?

Cheers,
Trond

net/sunrpc/svcsock.c renamed from net/sunrpc/svcsock.c.orig +10 -10
@@ -352,9 +352,9 @@
 	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 @@
 		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;

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#5 lore raw
Quoted 15 lines · On September 8, [email protected] wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

" " == Neil Brown <[email protected]> writes:

> On Friday September 5, [email protected] wrote:
>> On Fri, Sep 05, 2003 at 01:53:27PM +1000, Neil Brown wrote:
>> > Very helpful details. It looks like a simple case of 32-bit >> > parochialism :-)
>> >
>> > Does this patch help?
>>
>> Nope. Applied patch, rebooted with it, here's the full details >> again (don't think anything changed, but just in case):

> Ok, I looked more closely at the .h files etc and I think the > following is correct (instead of the previous patch).

Quoted 6 lines

> (i.e. sizeof(cm.pki) instead of sizeof(cm)).

Nope see the code in ip_sockglue.c + the macros in socket.h.... AFAICS the control messages have wierd alignment requirements.

Shouldn't it rather be something like the following?

Probably it should, but that felt ugly, and the alignment requirements are "round up to multiple of size of long", and I believe that just putting them together in a struct would do that. But I guess it isn't 100% guaranteed so it is safer to use your code.

Once I get confirmation from Matthew that something actually works for him, I'll send an appropriate change to Linus.

thanks.
NeilBrown

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs