From owner-freebsd-fs@FreeBSD.ORG Mon Jun 22 21:02:23 2015 Return-Path: Delivered-To: freebsd-fs@nevdull.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 5C5B19C2 for ; Mon, 22 Jun 2015 21:02:23 +0000 (UTC) (envelope-from alex.burlyga.ietf@gmail.com) Received: from mail-yk0-x233.google.com (mail-yk0-x233.google.com [IPv6:2607:f8b0:4002:c07::233]) (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 17760FE9 for ; Mon, 22 Jun 2015 21:02:23 +0000 (UTC) (envelope-from alex.burlyga.ietf@gmail.com) Received: by ykfy125 with SMTP id y125so22371148ykf.1 for ; Mon, 22 Jun 2015 14:02:22 -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 :cc:content-type; bh=BvHgdACUUfkUJRRFCYXCAPPQfz+knpZwZkYbMrBS34g=; b=TQ964hBhA15gIHnC3fVQM1HX/3iJGUSxVzd5xpQ854Js7S6OsMm3o8DZavUOscoAMU snvOYePogNLJAXPlCx5/3fNcsuWjIXXnF0GjPoBzbrCiKkjySuVf4iNjERf5ApXc6fYR w9QKjW6/Hs5WmZwlQ+7JSblE6qO5jLvTuaqJgFo0dTFnLpZGJ8BQ2415Zv/0ySIHXxKt dJrfKKyC5CL/ENUDepBSf1rq09mP7vf+NMRMq3Z2tYjzP+ZCj0V8TuFmQQfaHi2AMiHN aePS4JimbQHKkiABvH74mqj35bKnb8fvH6NCokkJo7ZrHobh+HYK+qm8OjqSn24hKGSr 7uoA== MIME-Version: 1.0 X-Received: by 10.170.223.131 with SMTP id p125mr38768155ykf.47.1435006942126; Mon, 22 Jun 2015 14:02:22 -0700 (PDT) Received: by 10.13.244.65 with HTTP; Mon, 22 Jun 2015 14:02:22 -0700 (PDT) In-Reply-To: <1969046464.61534041.1434897034960.JavaMail.root@uoguelph.ca> References: <1969046464.61534041.1434897034960.JavaMail.root@uoguelph.ca> Date: Mon, 22 Jun 2015 14:02:22 -0700 Message-ID: Subject: Re: [nfs][client] - Question about handling of the NFS3_EEXIST error in SYMLINK rpc From: "alex.burlyga.ietf alex.burlyga.ietf" To: Rick Macklem Cc: freebsd-fs Content-Type: text/plain; charset=UTF-8 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: Mon, 22 Jun 2015 21:02:23 -0000 Rick, Thank you for a quick turn around, see answers inline: On Sun, Jun 21, 2015 at 7:30 AM, Rick Macklem wrote: > 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. >> >> 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? >> > I've attached a patch for testing/review that does essentially #2. > It has no effect on trivial tests, since the syscall does a Lookup > before trying to create the symlink and fails with EEXIST. > Do you have a case where competing clients are trying to create > the symlink or something like that, which runs into this? That's exactly failing test case we are running into. > > Please test the attached patch, since I don't know how to do that, rick Great! I'll test it. I was leaning towards option 3 for SYMLINK and option 2 for MKDIR. This will work. Thanks for taking your time to generate the patch! > >> One more point, old client circa FreeBSD 7.0 does not exhibit this >> problem. >> >> 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" >>