From owner-cvs-all@FreeBSD.ORG Sat Mar 1 11:33:22 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C6181065671; Sat, 1 Mar 2008 11:33:22 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8BD5D8FC16; Sat, 1 Mar 2008 11:33:22 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m21BXMwo006028; Sat, 1 Mar 2008 11:33:22 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m21BXMmm006027; Sat, 1 Mar 2008 11:33:22 GMT (envelope-from rwatson) Message-Id: <200803011133.m21BXMmm006027@repoman.freebsd.org> From: Robert Watson Date: Sat, 1 Mar 2008 11:33:22 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_6 Cc: Subject: cvs commit: src/sys/nfsclient nfs_vnops.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Mar 2008 11:33:22 -0000 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 , Timo Sirainen Reviewed by: mohans Revision Changes Path 1.258.2.16 +4 -25 src/sys/nfsclient/nfs_vnops.c