Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2761433pxy; Tue, 3 Aug 2021 14:40:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKmqkyk1rIxx57zLiDu8JkEXkwPE5Y4SA8rR3JB1gkfUX80LdxjUGIh0SaKo/fCUetE9ZB X-Received: by 2002:a02:a115:: with SMTP id f21mr20714929jag.3.1628026825778; Tue, 03 Aug 2021 14:40:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628026825; cv=none; d=google.com; s=arc-20160816; b=Vh3JjTDu6y8ojoNZkyerdQrEabTw45oCtAcL3d2t8Zi8+ecNrbd61j6wQoRtqZw6HE UoNt60H0RCC6fuxe+zQ/w6lpQq/Z28s3z/aeXSZzBelvDQuGSgvfBuBAPoehm5IR9Vfc xkeqmTGfCfBtyT/l7tlT6PbwxDJEHNZswnqOCKeIiuMt6wsBwMV8dY4MuDap6AyU49NY EXQpQ/P2quICW3TX+WTbORykh2h4zW6lBfmscV3n9kwZfypK8pT+qaZMzBWRVUfhQ8ls jpq24MT6vUz8eREiqLHn2NR+vSiN6h6G7gTEWI6fVkKKnjdkFdHSJq2V7e2+RiS8lLxG Z8Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:from:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:date:dkim-signature:dkim-filter; bh=RgkCMao4c6UW4no6ckSwEUhFGOWNAVmOSt1/MT2U9wA=; b=XB9w0/v3MvgNKh7IXebwOb6FioDePwcw6QGXfIcrZz22gBPENT1l3SyWsANKz+/7Pz Ij8g3gcydSoyrMzllLG+QlhVLXZ1NMWUD48XmWczjK2gZMf1RW+23fvtkJUEpjRGzNiu fL3+kf8gNfznKLjXc9gxnLj+Tr+cSnjYDipA3xh6abfl0iVFmXLYhl25xb7CWkssHabz nMmrjwvWd2AuIFqn5IEvzJMYiYLIbwyieY+IwTy85oz0PVI+Au8fhY3NgcFoWOxhIIIy Nfwxrm6qW4lToiHY/bQgDqIkGr6p3R/jg8/rFGngdVkwk2B6U99PLm1E2x2KYEz5gqBp Xmeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=lMjR+F0O; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z10si172179ilz.130.2021.08.03.14.40.02; Tue, 03 Aug 2021 14:40:25 -0700 (PDT) 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=@fieldses.org header.s=default header.b=lMjR+F0O; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230096AbhHCUbE (ORCPT + 99 others); Tue, 3 Aug 2021 16:31:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229935AbhHCUbE (ORCPT ); Tue, 3 Aug 2021 16:31:04 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92AE8C061757 for ; Tue, 3 Aug 2021 13:30:52 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id 93F615BAF; Tue, 3 Aug 2021 16:30:51 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 93F615BAF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1628022651; bh=RgkCMao4c6UW4no6ckSwEUhFGOWNAVmOSt1/MT2U9wA=; h=Date:To:Cc:Subject:References:In-Reply-To:From:From; b=lMjR+F0OA1wdVnkuHBv6w281t0iUQ2+11tty6yfn9pUl7RWU7EdRhON2V+KxtBQsL FOl5eOWk7nVG5zvRSAlHleoVzZrFphEmx38D71jWCDyFGzi1u33lL90IVCeUBktCgh dCHrTQ3OywyAGpslqjNzhG6MEZEasrbB/sv4UtfY= Date: Tue, 3 Aug 2021 16:30:51 -0400 To: Trond Myklebust Cc: "linux-nfs@vger.kernel.org" , "bcodding@redhat.com" , "plambri@redhat.com" Subject: Re: cto changes for v4 atomic open Message-ID: <20210803203051.GA3043@fieldses.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) From: bfields@fieldses.org (J. Bruce Fields) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Fri, Jul 30, 2021 at 02:48:41PM +0000, Trond Myklebust wrote: > On Fri, 2021-07-30 at 09:25 -0400, Benjamin Coddington wrote: > > I have some folks unhappy about behavior changes after: 479219218fbe > > NFS: > > Optimise away the close-to-open GETATTR when we have NFSv4 OPEN > > > > Before this change, a client holding a RO open would invalidate the > > pagecache when doing a second RW open. > > > > Now the client doesn't invalidate the pagecache, though technically > > it could > > because we see a changeattr update on the RW OPEN response. > > > > I feel this is a grey area in CTO if we're already holding an open.  > > Do we > > know how the client ought to behave in this case?  Should the > > client's open > > upgrade to RW invalidate the pagecache? > > > > It's not a "grey area in close-to-open" at all. It is very cut and > dried. > > If you need to invalidate your page cache while the file is open, then > by definition you are in a situation where there is a write by another > client going on while you are reading. You're clearly not doing close- > to-open. Documentation is really unclear about this case. Every definition of close-to-open that I've seen says that it requires a cache consistency check on every application open. I've never seen one that says "on every open that doesn't overlap with an already-existing open on that client". They *usually* also preface that by saying that this is motivated by the use case where opens don't overlap. But it's never made clear that that's part of the definition. --b.