cvs commit: src/sys/nfsclient nfs_vnops.c

Adam McDougall mcdouga9 at
Sat Dec 29 06:33:25 UTC 2007

Can this be merged to 6 as well?  I've been running the patch
ported to 6-stable for a while with no problems.  Thanks. 

On Tue, Nov 27, 2007 at 12:20:59PM +0000, Robert Watson wrote:

  rwatson     2007-11-27 12:20:59 UTC
    FreeBSD src repository
    Modified files:        (Branch: RELENG_7)
      sys/nfsclient        nfs_vnops.c 
    Merge nfs_vnops.c:1.277 from HEAD to RELENG_7:
      Remove hacks from the NFSv2/3 client intended to handle a lack of a
      server-side RPC retranmission cache for non-idempotent operations: these
      hacks substituted 0 (success) for the expected EEXIST in the event that
      a target name already existed for LINK, SYMLINK, and MKDIR operations,
      under the assumption that EEXIST represented a second application of the
      original RPC rather than a true failure.
      Background: certain NFS operations (in this case, LINK, SYMLINK, and
      MKDIR) are not idempotent, as they leave behind persisting state on the
      server that prevents them from being replayed without an error;if an UDP
      RPC reply is lost leading to a retransmission by theclient, the second
      reply will return EEXIST rather than success, asthe new object has
      already been created.  The NFS client previouslysilently mapped the
      EEXIST return into success to paper over thisproblem.
      However, in all modern NFS server implementations, a reply cache is kept
      in order to retransmit the original reply to a retransmitted request,
      rather than performing the operation a second time, allowing this hack
      to be avoided.  This allows link()-based filelocking over NFS to operate
      correctly, as an application requestingthe creation of a new link for a
      file to tell if it succeededatomically or not.
      Other NFS clients, including Solaris and Linux, generally follow this
      behavior for the same reasons.  Most clients also now default to TCP,
      which also helps avoid the issue of retransmitted but non-idempotent
      requests in most cases.
      Reported by:    Adam McDougall <mcdouga9 at egr dot msu dot edu>,
                      Timo Sirainen <tss at iki dot fi>
      Reviewed by:    mohans
    Approved by:    re (kensmith)
    Revision   Changes    Path  +4 -25     src/sys/nfsclient/nfs_vnops.c
  cvs-src at mailing list
  To unsubscribe, send any mail to "cvs-src-unsubscribe at"

More information about the cvs-all mailing list