Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp655570pxb; Wed, 18 Nov 2020 13:40:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJyU5PEXwraE33AizQ8g/eruxI1jeYq9ITK0hdRzngwEYqH+OKlmZv4v/brUOCSf2W0dyNdR X-Received: by 2002:aa7:c2d6:: with SMTP id m22mr4135633edp.368.1605735622626; Wed, 18 Nov 2020 13:40:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605735622; cv=none; d=google.com; s=arc-20160816; b=Wxlte9/hHV8VxRus60XyPZNct9lqOSgWY6r0PTWkA+78D79CPWxrqKD9Y2mO6NN2oI bJqiHFPtHJPYrWCrzqDtQo5cGHm9KJsn8fiA8i02WlsYO/bh/Ja8tbrwa68ADcziYiG5 DkXIXLmGYGLMXHKIf+2AXx1/wgM2a74yWDkMfi9U+GG1iec5ceSqzVyR9c8goN+HBsBw ESVhwUh8arK7hcwrd/RwBA5HoewMyalhjLWXuOj1OFA1nuydjKH56VP9h6xEDuOnF5hD y5IRSWXl19Nzpic30sWp5/XvI8PSPInPxHN45R/HfgWOgEFjhqp2S6fKDLUCTM/yElOV edAA== 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:cc:to:from:date:subject :dkim-signature; bh=CFzTQ+Nhs2AflLk0S9gsqg4iJJjF2NZUiIgRPnV2kKc=; b=sNIneUmCo/2VEEVbEPsqsPtMYhwa9YOPNv/ZyAYsC7nm5TZrgI2oEhG+EtjIH2SBKU TdU1xw1VlZH6KmxQ+KxR5yTVOSUq99d6e9Tec6gdnc0DIkBsDmleVM01QUpwsUx+/EwS WgzJCWX77sPek5L4M3L9MuecvgSc6x0yEJCCEtiOVytT0VeZIBxSrqIqccwn2dj2WTXt TxgChRf+fRoJlkFobZVhK9B+ufRN5q16qLn1P1208Vgv/gKWWBDmR042bNJJI7cgvtsb ij8hXNdttlrgUILldnPQfb7/sJCaO9VjMxMgnXfdz8OobjAoth75S5OxaGXUtJNTX3l3 lq2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=OoMRv75L; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 10si10921922ejn.746.2020.11.18.13.39.50; Wed, 18 Nov 2020 13:40:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=OoMRv75L; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726199AbgKRVjq (ORCPT + 99 others); Wed, 18 Nov 2020 16:39:46 -0500 Received: from smtp-fw-6001.amazon.com ([52.95.48.154]:27538 "EHLO smtp-fw-6001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726110AbgKRVjq (ORCPT ); Wed, 18 Nov 2020 16:39:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1605735586; x=1637271586; h=date:from:to:cc:message-id:references:mime-version: in-reply-to:subject; bh=CFzTQ+Nhs2AflLk0S9gsqg4iJJjF2NZUiIgRPnV2kKc=; b=OoMRv75L+vo1f6bSfbybYdnFG258cj6izqBFCjZZtgPZLSXgP4tqAudZ 7TFKW/uN1mnQado40vr5m4n9Kx07HsBUIDxzyOnmXy04LIAyTESIdQABR UBfZ6gRz9dswkwz7Bb/Me8fTFzkW4/yWZIfm818Hcc/u0cvF6Yy8z76dQ 4=; X-IronPort-AV: E=Sophos;i="5.77,488,1596499200"; d="scan'208";a="67282979" Subject: Re: [PATCH] NFS: Retry the CLOSE if the embedded GETATTR is rejected with ERR_STALE Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-1d-474bcd9f.us-east-1.amazon.com) ([10.43.8.2]) by smtp-border-fw-out-6001.iad6.amazon.com with ESMTP; 18 Nov 2020 21:30:08 +0000 Received: from EX13MTAUWA001.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan2.iad.amazon.com [10.40.163.34]) by email-inbound-relay-1d-474bcd9f.us-east-1.amazon.com (Postfix) with ESMTPS id 40F09A0725; Wed, 18 Nov 2020 21:29:36 +0000 (UTC) Received: from EX13D47UWA002.ant.amazon.com (10.43.163.30) by EX13MTAUWA001.ant.amazon.com (10.43.160.58) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 18 Nov 2020 21:29:36 +0000 Received: from EX13MTAUWA001.ant.amazon.com (10.43.160.58) by EX13D47UWA002.ant.amazon.com (10.43.163.30) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 18 Nov 2020 21:29:36 +0000 Received: from dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com (172.22.96.68) by mail-relay.amazon.com (10.43.160.118) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 18 Nov 2020 21:29:36 +0000 Received: by dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com (Postfix, from userid 4335130) id 3967040E2B; Wed, 18 Nov 2020 21:29:35 +0000 (UTC) Date: Wed, 18 Nov 2020 21:29:35 +0000 From: Anchal Agarwal To: Trond Myklebust CC: "linux-nfs@vger.kernel.org" , "anna.schumaker@netapp.com" , "linux-kernel@vger.kernel.org" Message-ID: <20201118212935.GA12762@dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com> References: <20201118002431.GA6941@dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com> 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-nfs@vger.kernel.org On Wed, Nov 18, 2020 at 03:17:20AM +0000, Trond Myklebust wrote: > CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. > > > > On Wed, 2020-11-18 at 00:24 +0000, Anchal Agarwal wrote: > > If our CLOSE RPC call is rejected with an ERR_STALE error, then we > > should remove the GETATTR call from the compound RPC and retry. > > This could happen in a scenario where two clients tries to access > > the same file. One client opens the file and the other client removes > > the file while it's opened by first client. When the first client > > attempts to close the file the server returns ESTALE and the file > > ends > > up being leaked on the server. This depends on how nfs server is > > configured and is not reproducible if running against nfsd. > > That would be a seriously broken server. If you return NFS4ERR_STALE to > the client, you cannot expect any further interaction with that file > from the client. It won't try to send CLOSE or DELEGRETURN or any other > stateful operation. > In this scenario, the setup we have at EFS is more of a distributed fashion. Multiple clients are connected to multiple servers with a common filesystem. So the above scenario leads to leaked open file handles on the client that tries to close deleted file. So I was of the view, in that case client could retry close without getattr in the close sequence without anything to do on server side. Thanks, Anchal Agarwal > -- > Trond Myklebust > Linux NFS client maintainer, Hammerspace > trond.myklebust@hammerspace.com > >