Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Mar 2008 11:33:22 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/nfsclient nfs_vnops.c
Message-ID:  <200803011133.m21BXMmm006027@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
rwatson     2008-03-01 11:33:22 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_6)
    sys/nfsclient        nfs_vnops.c 
  Log:
  Merge nfs_vnops.c:1.277 from HEAD to RELENG_6:
  
    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
  
  Revision    Changes    Path
  1.258.2.16  +4 -25     src/sys/nfsclient/nfs_vnops.c



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