Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Feb 2011 17:59:10 -0500 (EST)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
Cc:        freebsd-fs@freebsd.org, Mickael Canevet <canevet@embl.fr>
Subject:   Re: "rpc mount export: RPC: Can't decode result" when export list is to long
Message-ID:  <511655722.1552410.1297119550835.JavaMail.root@erie.cs.uoguelph.ca>

next in thread | raw e-mail | index | archive | help
> This this the update (this is the minimal version, without optimization):
> 
> --- svc_vc.c.orig	2009-08-03 11:13:06.000000000 +0300
> +++ svc_vc.c	2011-01-31 11:31:28.000000000 +0200
> @@ -546,7 +546,7 @@ write_vc(xprtp, buf, len)
>  				cd->strm_stat = XPRT_DIED;
>  				return (-1);
>  			}
> -			if (cd->nonblock && i != cnt) {
> +			if (cd->nonblock) {
>  				/*
>  				 * For non-blocking connections, do not
>  				 * take more than 2 seconds writing the
> @@ -560,6 +560,7 @@ write_vc(xprtp, buf, len)
>  					return (-1);
>  				}
>  			}
> +			i = 0;
>  		}
>  	}

First off, good catch Andrey.

Second, sorry for taking soo long to respond. I'm in a location where my internet
access is limited and I missed this message on the first pass through my email.

I'm somewhat familiar with the kernel RPC, where the RPC messages are all in one
record, which means they're limited to the size set by svc_vc_create(). I looked
and see that the userland RPC library does split large messages into multiple
records over TCP, so the limitation doesn't exist for TCP for userland. (ie. What
I said before only applies to the UDP case and not the TCP one.)

I won't be able to commit the above fix until April (due to the limited internet
access before then), but will commit it then. Thanks for the fix.

W.r.t. The "brief" case, I don't know, but my guess was it was done to help
make things work for UDP clients, which are limited to 8800 byte RPC messages.
(That limit could be increased tojust under 64K, but since the message ends up
 being IP fragmented, it's not a great plan, imho.) I don't know if there are
any "showmount" commands out there still using UDP only.

rick
ps: Mickael, did you have a chance to try Andrey's patch to see if it fixed
    your Linux automount problem?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?511655722.1552410.1297119550835.JavaMail.root>