]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
jwd@ reported a problem via email where the old NFS client would
authorRick Macklem <rmacklem@FreeBSD.org>
Wed, 21 Dec 2011 02:45:51 +0000 (02:45 +0000)
committerRick Macklem <rmacklem@FreeBSD.org>
Wed, 21 Dec 2011 02:45:51 +0000 (02:45 +0000)
commit713f46ac47f6bf3f51ba310dd082fe1e0de227bd
tree7bd580195a28371e048832986507c7cc4fd2ba82
parent4ee8547efb3acab01fbc9190a4f85f1ad62f17bc
jwd@ reported a problem via email where the old NFS client would
get a reply of EEXIST from an NFS server when a Mkdir RPC was retried,
for an NFS over UDP mount.
Upon investigation, it was found that the client was retransmitting
the Mkdir RPC request over UDP, but with a different xid. As such,
the retransmitted message would miss the Duplicate Request Cache
in the server, causing it to reply EEXIST. The kernel client side
UDP rpc code has two timers. The first one causes a retransmit using
the same xid and socket and was set to a fixed value of 3seconds.
(The default can be overridden via CLSET_RETRY_TIMEOUT.)
The second one creates a new socket and xid and should be larger
than the first. However, both NFS clients were setting the second
timer to nm_timeo ("timeout=<value>" mount argument), which defaulted to
1second, so the first timer would never time out.
This patch fixes both NFS clients so that they set the first timer
using nm_timeo and makes the second timer larger than the first one.

Reported by: jwd
Tested by: jwd
Reviewed by: jhb
MFC after: 2 weeks
sys/fs/nfs/nfs_commonkrpc.c
sys/nfsclient/nfs_krpc.c