Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp29591pxb; Thu, 21 Apr 2022 16:09:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWgHVPiFE/rm1nCboHoPLxqzYW04Wx1zDZlfIiVTlvWpC/MZqzcZSvhXfmHYi9O0swR1ED X-Received: by 2002:a17:906:9b85:b0:6db:ab80:7924 with SMTP id dd5-20020a1709069b8500b006dbab807924mr1589407ejc.160.1650582548042; Thu, 21 Apr 2022 16:09:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650582548; cv=none; d=google.com; s=arc-20160816; b=dA1jMc/OXdUV3hpYw31pJu7sK75eBSqxe+DDCm0y1ATLxAqlZxV3oRd7+DhaZ5Pyxi 6SIVS4bjsaKLVGcnNR4yP+0H/OY2oTqhXumia8FGxBQmBJ9RHb+ie8fCAceqgSJ1Hs8P QANeEr9CNiuAJgG2gAXcOXWXX1QCcFJnR6+euDib+ZJaxB3szQ3LU/tVzq8xZM2hjSOX QBSP2PLpAhRP/SxdbdY+ySw+E2YX8fPiuC5wqM2XRR5ll6CA6QeLM+WpuOHC7aVL0fqN B2SrzgBMav4yImk/YTTfayO7SkRQxv344PPhR548qBRt6hLgb/GY9hrLRDZmstjhSkuX 7S5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=vAcRySFdumALaaVWKny6dDU8KH6biyqZJFhn8cyzt9Q=; b=o1GxytVSBvgOxCMTRMGWJFGNU89Rzgr9zH6dJSieTHD+LOTRqXrwnLnK701gS3eRAO iCq15ud8Gi4Xd8Be0PGdTAQhyFn9rG0CdwLTP4r1YeLsybju5YKOepnM1VFhdnvBMLWF VZtdvRsyePozHdSpQ7jtJ22bLrHHRfZh6iYz/RHmIovtQMA/p08AjzN27gbSv6ghOj/v DTN5LOOFbT048mFnFfBeh41U5InlYAkxe8hwBg0j38kdf/CkFkll5Kahywj52+xatgYE pyQ39qXmaa8O/WtJ3bhXgjujzRceWNzj4EDsSLlhET75+s2VI5YTDFLTsaA8IXGCKDi3 o8Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=JNODiQ1Y; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d25-20020a056402517900b00418c2b5be8fsi4298654ede.369.2022.04.21.16.08.20; Thu, 21 Apr 2022 16:09:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=JNODiQ1Y; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231500AbiDUQka (ORCPT + 99 others); Thu, 21 Apr 2022 12:40:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229573AbiDUQk3 (ORCPT ); Thu, 21 Apr 2022 12:40:29 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F21D3488AC; Thu, 21 Apr 2022 09:37:39 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id 580AC3703; Thu, 21 Apr 2022 12:37:39 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 580AC3703 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1650559059; bh=vAcRySFdumALaaVWKny6dDU8KH6biyqZJFhn8cyzt9Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JNODiQ1YGnETuZiW13Y0U9eyPig5J9Biffl7RQreml0Dts6gDt31KzlI2uQBGBcfV 2wEE4ENimNbrfNCkZIHcTJa2wHbytoRSthqIBoRLDi6E+9yRi14cUxeBCQdL2q7emW qgNpjlz13zc/bXmXGitwyxgmaINXQL5gBkWPfxo8= Date: Thu, 21 Apr 2022 12:37:39 -0400 From: Bruce Fields To: Chuck Lever III Cc: Linux NFS Mailing List , "linux-fsdevel@vger.kernel.org" Subject: Re: [PATCH RFC 4/8] NFSD: Refactor NFSv3 CREATE Message-ID: <20220421163739.GA18620@fieldses.org> References: <165047903719.1829.18357114060053600197.stgit@manet.1015granger.net> <165047934027.1829.4170855794285748158.stgit@manet.1015granger.net> <20220420191042.GA27805@fieldses.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Wed, Apr 20, 2022 at 07:31:09PM +0000, Chuck Lever III wrote: > > I wonder if it'd be > > possible to keep the two paths free of complications from each other > > while sharing more code, e.g. if there are logical blocks of code that > > could now be pulled out into common helpers. > > I'm open to suggestions, but after the final patch in this > series, I don't see much else that is meaningful that can be > re-used by both. nfsd_create_setattr() was the one area that > seemed both common and heavyweight. The other areas are just > lightweight sanity checks. > > And honestly, in this case, I don't think these code paths > are well-served by aggressive code de-duplication. The code > in each case is more readable and less brittle this way. The > NFSv4 code path now has some comments that mark the subtle > differences with NFSv3 exclusive create, and now you can't > break NFSv3 CREATE by making a change to NFSv4 OPEN, which > is far more complex. I can live with that. Also, this passes all my usual regression tests, FWIW. --b.