From owner-freebsd-fs@FreeBSD.ORG Sat Jun 20 23:06:10 2015 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06CC8C5A for ; Sat, 20 Jun 2015 23:06:10 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id C2DE3F1B for ; Sat, 20 Jun 2015 23:06:09 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2ABBADI8IVV/95baINcg2RfBoMYumcJgVwKhS5KAoFbFAEBAQEBAQGBCoQiAQEBAwEBAQEgKyALBRYYAgINGQIpAQkmBggHBAEcAgKIBggNsFCVdgEBAQEGAQEBAQEBARuBIYokhDQBAQUXNAeCaIFDBZN9hFaEL4REi3SKQiZjgVmBWSIxB4EFOoECAQEB X-IronPort-AV: E=Sophos;i="5.13,651,1427774400"; d="scan'208";a="217616347" Received: from muskoka.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.222]) by esa-jnhn.mail.uoguelph.ca with ESMTP; 20 Jun 2015 19:06:03 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 34EFDB3F78; Sat, 20 Jun 2015 19:06:03 -0400 (EDT) Date: Sat, 20 Jun 2015 19:06:03 -0400 (EDT) From: Rick Macklem To: "alex.burlyga.ietf alex.burlyga.ietf" Cc: freebsd-fs@freebsd.org Message-ID: <616007475.61421820.1434841563204.JavaMail.root@uoguelph.ca> In-Reply-To: Subject: Re: [nfs][client] - Question about handling of the NFS3_EEXIST error in SYMLINK rpc MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.95.12] X-Mailer: Zimbra 7.2.6_GA_2926 (ZimbraWebClient - FF3.0 (Win)/7.2.6_GA_2926) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Jun 2015 23:06:10 -0000 Alex Burlyga wrote: > Hi, > > NFS client code in nfsrpc_symlink() masks server returned NFS3_EEXIST > error > code > by returning 0 to the upper layers. I'm assuming this was an attempt > to > work around > some server's broken replay cache out there, however, it breaks a > more > common > case where server is returning EEXIST for legitimate reason and > application > is expecting this error code and equipped to deal with it. > Btw, since a DRC is a cache, any DRC can fail to handle a duplicate (because it has fallen out of the cache). Further, many DRCs are only used for UDP and when a client ends up doing a TCP reconnect (due to a network partitioning breaking the TCP connection or similar) it will resend any outstanding RPCs. - In other words, a DRC doesn`t guarantee that a duplicate won`t be performed, it just reduces the likelyhood. NFSv4.1 fixes this via sessions, which guarantee exactly once RPC semantics. > To fix it I see three ways of doing this: > * Remove offending code > * Make it optional, sysctl? > * On NFS3_EEXIST send READLINK rpc to make sure symlink content is > right > > Which of the ways will maximize the chances of getting this fix > upstream? > > One more point, old client circa FreeBSD 7.0 does not exhibit this > problem. > Since the old client didn`t do this, I think that turning it off by default and having a sysctl to enable it would be fine. (It is probably left over from the OpenBSD code which was the original base for my NFSv4 work.) rick > Alex > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" >