Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp378418imn; Wed, 3 Aug 2022 07:44:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR7wvwa1dvSt/seQN0ez6GxiwLNJTroZQwxJYVkSRvPKz3uXzKY50QcV1wM/+FPz6+wxXTxk X-Received: by 2002:a05:6402:5245:b0:43d:6c9d:8d1b with SMTP id t5-20020a056402524500b0043d6c9d8d1bmr19224978edd.65.1659537863771; Wed, 03 Aug 2022 07:44:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659537863; cv=none; d=google.com; s=arc-20160816; b=pVUVasJ2YaHeMR56/bO/LIf7VU5g7IkoVPhuAsXI2QDWPo+ZbZTqZv/v4uoIMiJubX U2r6wX5RYoRBRlPwaXPbllc9VA5MC+644JoXKgHn3iZbw8G+kTbrpPxk0aXMjihujYuE iLA5kYBASEr7tjgmkRfZnocGC/paVHje7/0oB0ZU0KrZ/GPygMT64w6aDh7SADHzw71N +AV8r237n2Fqp6sv/g4YjGnxOn18wt1AyJe8+7KhoThHc6QJM2qOttutjN2wRJL5hpud LHlBpi5Dfx5Xd0NCgPe/XiRYT+VUPz90Z1gfAOo8+zqSYZ64jbTeVJPRiOLS6n/Fxl2u 6rNg== 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:cc:to:from:subject; bh=wjYSsJjGSlffE5fqdpNgm5KAksZCCeHv+Fckl5bRBTk=; b=q9LqzjFcgueHIF/FFLcRtNKvtlyl7Q554Hum0vprkPbtFZFwxwqLA07mVS6Fjrjk79 v2AlDif+LWEfZ62GbxdqjhRxGdwGGpgd+f1By9qkTFR0tBsdEVAqmkAYUVItRrciOwyQ j8kYQFUfSNXnJ0oXuIyzkJCayuK3c6i/X6aZdYfIGwCxMOk7MjmsJUai56C2Sw/2Q1tW +byJJV/n8km1wxfhXRihsgZoOcZhXpjElm8EeGWESEg1udPmL7jmIAnq3o9W/3wwc+ZJ iR0XOYyxAdUDWzBazkQnuA71BgJmq32SrmlWDpIhObiDn+4n3dz+aMfi4f7cusdYKR1S 5G9Q== 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 w11-20020a1709060a0b00b0072b872932d6si9606288ejf.567.2022.08.03.07.43.50; Wed, 03 Aug 2022 07:44:23 -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 S237518AbiHCOhd (ORCPT + 99 others); Wed, 3 Aug 2022 10:37:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235945AbiHCOhc (ORCPT ); Wed, 3 Aug 2022 10:37:32 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D807019C27 for ; Wed, 3 Aug 2022 07:37:30 -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 ams.source.kernel.org (Postfix) with ESMTPS id 81DA6B82264 for ; Wed, 3 Aug 2022 14:37:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12442C433C1; Wed, 3 Aug 2022 14:37:27 +0000 (UTC) Subject: [PATCH v2 0/3] Wait for DELEGRETURN before returning NFS4ERR_DELAY From: Chuck Lever To: linux-nfs@vger.kernel.org Cc: imammedo@redhat.com Date: Wed, 03 Aug 2022 10:37:26 -0400 Message-ID: <165953688893.1658.15242150042289528147.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 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) - The wait is a fixed 30ms delay; it would be better if the server could match an incoming CB_RECALL reply with waiters so they can proceed immediately, but I am still figuring out how that can be done 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 (3): NFSD: Add tracepoints to report NFSv4 callback completions 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 | 52 ++++++++++++++++++++++++++++++-------- fs/nfsd/nfs4state.c | 21 ++++++++++++++++ fs/nfsd/nfsd.h | 1 + fs/nfsd/trace.h | 58 +++++++++++++++++++++++++++++++++++++++++++ fs/nfsd/xdr4.h | 2 ++ 6 files changed, 124 insertions(+), 12 deletions(-) -- Chuck Lever