From owner-freebsd-fs@FreeBSD.ORG Sat Jun 20 06:18:31 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 4D97AB7F for ; Sat, 20 Jun 2015 06:18:31 +0000 (UTC) (envelope-from alex.burlyga.ietf@gmail.com) Received: from mail-yk0-x22c.google.com (mail-yk0-x22c.google.com [IPv6:2607:f8b0:4002:c07::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1864DCE2 for ; Sat, 20 Jun 2015 06:18:31 +0000 (UTC) (envelope-from alex.burlyga.ietf@gmail.com) Received: by ykdr198 with SMTP id r198so104585739ykd.3 for ; Fri, 19 Jun 2015 23:18:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=UaUa6gy4GHoikgiEtdFPz+dcTJweksX5dDiYSSZuB8Q=; b=cEDzEzlZqj3ghYRUoCG8Yryv7AcVzrej15AKzNLtMsWNKLEc1PYIaWnUcSfM4qQTyW KAFUWwHkElwa84/uWAgY0lPIHQiZjlpj0hNVE1pjVVraT7jHvB4SLfGiLWjEn5IfjaZV KG3VuCYV+5+vfEYI+yX1NWczLOwyjhgaXg2yXwKOi/BEXaZdJRg1npEFie5XeCvalbUU IJfkU0haU9v0aNoGBlH0kVkR0JD31kYKAtz6Ng5qRHadvhO+wxot/2fDQeEf8Tdx5+CO 6XN6iMoPY8SwJZ400rcFqQJuzPluEYSusKYy+uiPCRcgR2NMOeMcaGzAEY9gZSjgQPtA lBfw== MIME-Version: 1.0 X-Received: by 10.129.108.12 with SMTP id h12mr24410390ywc.161.1434781110065; Fri, 19 Jun 2015 23:18:30 -0700 (PDT) Received: by 10.13.244.65 with HTTP; Fri, 19 Jun 2015 23:18:29 -0700 (PDT) Received: by 10.13.244.65 with HTTP; Fri, 19 Jun 2015 23:18:29 -0700 (PDT) In-Reply-To: References: Date: Fri, 19 Jun 2015 23:18:29 -0700 Message-ID: Subject: [nfs][client] - Question about handling of the NFS3_EEXIST error in SYMLINK rpc From: "alex.burlyga.ietf alex.burlyga.ietf" To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 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 06:18:31 -0000 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. 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. Alex