From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8001BC433EF for ; Thu, 21 Apr 2022 16:37:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231523AbiDUQka (ORCPT ); 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) Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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.