Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp5466087rwn; Mon, 12 Sep 2022 09:24:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR5R/GAjblvSLL5Rv/cn3xqOLNkyam+LcqRoYu3wmzB09E/Ezs+BKjptiDyk1MzE0lnnFNrC X-Received: by 2002:aa7:c1c4:0:b0:44e:b39e:2a54 with SMTP id d4-20020aa7c1c4000000b0044eb39e2a54mr23012402edp.139.1662999890522; Mon, 12 Sep 2022 09:24:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662999890; cv=none; d=google.com; s=arc-20160816; b=VOSqbdDMyCqmnUaGQyCMINR/cHIYYv6z35zUyftnf2mnvxfpfW4Wojp+IPmzwmfRLs WOS0cwMhfShDzauXYiTFVQaSMK/6TodJ1QE6/z30LfEDOMpdr+ZQkwxMztAqAhDNagCj 8j8KU2pjcD5iqLy6TVzGj3YdU9op7aABxncA/Ec1AkFdE6ccik/W/tD97eXKEmyet7N8 UyQTjtK1P0AnRueef03kcOgVF59tCylaTeiBED5uBXB27+41NE+7yaIuiB5yGEyiHMzL 1fVqJRj9g5jznNyfea27Nk2ruWq7dHNE/RIvVf07c3FeyFXRumEp3ulZjYmt9X7dmHZj 7zGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:to:from :subject:message-id:dkim-signature; bh=DXdtmTHidzyfzbX8ydCZyQNgtbmzUEbrtNtHCccci6I=; b=w1BNzz2xjZH/poVhjf5D1HsYnu3tf8FwBC5Ygt11rWKN6r082frtzw1NAYS8sKRGbA jyRoZWCnMushS+32ec4aCszs+ETXevSCH2iivNWi3qX5Eyqg2kICbPL2NKNtPgMNo0zy SlFra6klxxadcqf5QeS7x4cXmtojrx+79wcReIEnzgHydBi40PXdWwugfC82dyT1vJ9o PqvzYHQzfV+ulCX5OOcEi34w5klPdHVV0pbQskmUTxH9gZQ8oGCDd8F1aOxGY5Aeaer+ mw7XgEF0GHMIOn37+k+n/Mao/Cmq3LH9OPWgtpok0DtqdtefrQj9ZtrHHxQNmTsHAVCZ cVaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="IzPIKk/2"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id js15-20020a17090797cf00b0073fc454c591si7783775ejc.153.2022.09.12.09.24.17; Mon, 12 Sep 2022 09:24:50 -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=@kernel.org header.s=k20201202 header.b="IzPIKk/2"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229636AbiILQWD (ORCPT + 99 others); Mon, 12 Sep 2022 12:22:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229536AbiILQWC (ORCPT ); Mon, 12 Sep 2022 12:22:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 109B22A71C for ; Mon, 12 Sep 2022 09:22:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9FED661234 for ; Mon, 12 Sep 2022 16:22:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BBEA2C433C1; Mon, 12 Sep 2022 16:22:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662999721; bh=lRNe4DU7UEiXjXaBqYuuE/QLKmwxXJkMPqw0/ffPJxE=; h=Subject:From:To:Date:In-Reply-To:References:From; b=IzPIKk/2liwesZw2qlfRpkEzgyJl4WEfPsgcFilQiSVOwRIpUNKVyMZ9iTj7Ohbqr m+AWBp9+8mhsZxSsIIZL9ZVUy3j282F78GeYQofAttnd2VSgQbmROwfO8JNcu1SCbg sJmI9smScZjtRhEK60tdg0fLafXvDgLoBuz9VLcgYULAFhltBQvdQWz1ITpyMMPpU9 v9MJWoko8x2rIzsxBjDzjO8e194T5KS9r3ViCWYYrxmCxLKphvEpAzZP+a1GqArHG4 ULNWe9g0QfPZkSPk8mQjXzoZlrwq/DLfosQk20sbouTEqMPfarc86GsYQS0BiKFaxT 85XKXzODIqqqw== Message-ID: <5a1937b15ae11cba376ce3373ae468d05e65f17f.camel@kernel.org> Subject: Re: [PATCH v4 0/8] Wait for DELEGRETURN before returning NFS4ERR_DELAY From: Jeff Layton To: Chuck Lever , linux-nfs@vger.kernel.org Date: Mon, 12 Sep 2022 12:21:59 -0400 In-Reply-To: <166267495153.1842.14474564029477470642.stgit@manet.1015granger.net> References: <166267495153.1842.14474564029477470642.stgit@manet.1015granger.net> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-1.fc36) MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Thu, 2022-09-08 at 18:13 -0400, Chuck Lever wrote: > This patch series adds logic to the Linux NFS server to make it wait > a few moments for clients to return a delegation before replying > with NFS4ERR_DELAY. There are two main benefits: >=20 > - It improves responsiveness when a delegated file is accessed from > another client, and > - It removes an unnecessary latency if a client has neglected to > return a delegation before attempting a RENAME or SETATTR >=20 > NFS4ERR_DELAY during NFSv4 OPEN is still not handled. However, I'm > comfortable merging the infrastructure in this series and support > for using it in SETATTR, RENAME, and REMOVE now, and then handling > OPEN at a later time. >=20 > This series applies against v6.0-rc4. >=20 > Changes since v3: > - Also handle JUKEBOX when an NFSv3 operation triggers a CB_RECALL >=20 > Changes since v2: > - Wake immediately after server receives DELEGRETURN > - More tracepoint improvements >=20 > Changes since RFC: > - Eliminate spurious console messages on the server > - Wait for DELEGRETURN for RENAME operations > - Add CB done tracepoints > - Rework the retry loop >=20 > --- >=20 > Chuck Lever (8): > NFSD: Replace dprintk() call site in fh_verify() > NFSD: Trace NFSv4 COMPOUND tags > NFSD: Add tracepoints to report NFSv4 callback completions > NFSD: Add a mechanism to wait for a DELEGRETURN > NFSD: Refactor nfsd_setattr() > NFSD: Make nfsd4_setattr() wait before returning NFS4ERR_DELAY > NFSD: Make nfsd4_rename() wait before returning NFS4ERR_DELAY > NFSD: Make nfsd4_remove() wait before returning NFS4ERR_DELAY >=20 >=20 > fs/nfsd/nfs4layouts.c | 2 +- > fs/nfsd/nfs4proc.c | 6 +- > fs/nfsd/nfs4state.c | 34 +++++++++++ > fs/nfsd/nfsd.h | 7 +++ > fs/nfsd/nfsfh.c | 8 +-- > fs/nfsd/trace.h | 131 ++++++++++++++++++++++++++++++++++++++---- > fs/nfsd/vfs.c | 100 ++++++++++++++++++++------------ > 7 files changed, 233 insertions(+), 55 deletions(-) >=20 > -- > Chuck Lever >=20 Nice work, Chuck. These all look reasonable to me. Reviewed-by: Jeff Layton