Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp4774409rwb; Mon, 8 Aug 2022 06:55:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR6qEXOg1soEDLtILOQ/7BL5KOKooljDHm6a2BJOLqo4cU41Y2ANxyg1jg3jAiV2Sqgxl/Pv X-Received: by 2002:a17:903:447:b0:16e:cbe3:29de with SMTP id iw7-20020a170903044700b0016ecbe329demr18812523plb.65.1659966925759; Mon, 08 Aug 2022 06:55:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659966925; cv=none; d=google.com; s=arc-20160816; b=HcS4e08YaT6GBcdT1rhjTF3dweVeRl88P7nUUpSAFO426jjlrmkfqSlEXwR4fo4msx uAEbC0Eq9h2tdK3nD7k2T3lFFOsj+MEKOKm0zP7PxM+I2gaOzhZgmknaM1BFLIDzZxhq VAtztrJBxYkVRak8fm7PGpm0To4w7+LfOZWBS/uw30XjbbySrSYflBO5sDLyLlipEaZ7 i9koVi+cj+VLluPSK/qOr3K/x/pzEK/0QH0whrRJQeizEIzMwYUfnUu9EAeLuxuq+AAW g5DmmHeApuGPzTxH+wW4GX/CIK1KXgZLZ/FLIFhcS67YvAPQ1+FDGshGIhD1EPJy9DYR 35iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:date:to:from:subject; bh=YoRrqRaiID0DBR7oSjFj3YDnZzpmfVvuOi2QIl2wyi8=; b=e22Yeyefcc5pivnesKw82ENXUDOd0II80VvhjvJfZdHt7fowlBBfdU0PrIEJ6tsJ28 kUuSInU94nn5PlmnGkjQaxCCaxQfZtYjBpg/60DnKMry7OEaaTe0uC6RL9CDyjtJLbK6 Ixg7MakI5RFvc5EevidR32+hXiWA0yhxMSp4Tt1iPwgA3wATxbd27yQReFAl5GQPp2B1 XqK3B4MOOEE+5e5q+f0yzouKeVMZirLAuoFMfbi9J5L0WD2BBb/EDybkHidxwcx/ED2d lNeYrHD6cup20VouddcaH/FjPGCjliLZICQsLKya9kEqBQM3x5vqTqCY7Pxrcx/laJDl TzMQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s5-20020a656445000000b0041a4cfc72fdsi6593932pgv.196.2022.08.08.06.55.08; Mon, 08 Aug 2022 06:55:25 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242950AbiHHNwe (ORCPT + 99 others); Mon, 8 Aug 2022 09:52:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242251AbiHHNwe (ORCPT ); Mon, 8 Aug 2022 09:52:34 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B1A22DF7 for ; Mon, 8 Aug 2022 06:52:33 -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 sin.source.kernel.org (Postfix) with ESMTPS id A6ACECE10E7 for ; Mon, 8 Aug 2022 13:52:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE8D8C433D6 for ; Mon, 8 Aug 2022 13:52:29 +0000 (UTC) Subject: [PATCH v3 0/7] Wait for DELEGRETURN before returning NFS4ERR_DELAY From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Mon, 08 Aug 2022 09:52:28 -0400 Message-ID: <165996657035.2637.4745479232455341597.stgit@manet.1015granger.net> User-Agent: StGit/1.5.dev2+g9ce680a5 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,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 This RFC 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: - This improves responsiveness when a delegated file is accessed from another client - This removes an unnecessary latency if a client has neglected to return a delegation before attempting a RENAME or SETATTR This series is incomplete: - There are likely other operations that can benefit (eg. OPEN) This series applies against v5.19. Changes since v2: - Wake immediately after client sends DELEGRETURN - More tracepoint improvements Changes since RFC: - Eliminate spurious console messages on the server - Wait for DELEGRETURN for RENAME operations - Add CB done tracepoints - Rework the retry loop --- Chuck Lever (7): NFSD: Instrument fh_verify() 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: Make nfsd4_setattr() wait before returning NFS4ERR_DELAY NFSD: Make nfsd4_rename() wait before returning NFS4ERR_DELAY fs/nfsd/nfs4layouts.c | 2 +- fs/nfsd/nfs4proc.c | 56 +++++++++++--- fs/nfsd/nfs4state.c | 35 +++++++++ fs/nfsd/nfsd.h | 1 + fs/nfsd/nfsfh.c | 13 +--- fs/nfsd/trace.h | 171 ++++++++++++++++++++++++++++++++++++++++-- fs/nfsd/xdr4.h | 2 + 7 files changed, 251 insertions(+), 29 deletions(-) -- Chuck Lever