Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2888910pxy; Tue, 3 Aug 2021 18:52:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKfr5ldLkLJu5IeqlirLUNtJHcKi2dNOF5D5U3JAw465pkEetQPsTDcD19SmQ4oBZDKalt X-Received: by 2002:a5e:924a:: with SMTP id z10mr742326iop.35.1628041964776; Tue, 03 Aug 2021 18:52:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628041964; cv=none; d=google.com; s=arc-20160816; b=xPGS0MSWl+hPQvt97SBkRH+Vv7gaqrsmiYxQkssWaunwY6ZL0UeOAQ5UsoPYGYMJTQ 4wOSTrRESwizK2sVzWMshgagMgf0gp+VYRyaEv4MFCAcJXK1DYUJFQLa41nVFy/Xdrn+ pH0kE15drzUprtCRHXwZpPoiZKnVjY3E7QkAAKfpI98rV/fDbwJXiPGTetZh/JtxSPVP oNZ0BH81UW0O24jjm0G0BpPNUVb+TsRnaDC/0Vtn6ZDKbJdREFiIwMfvgHDw3ZQFvSYe XwU+yjD5qUy6wmGM1rJEduHP1iCFbTPikVNOWLEMm9ZAdhvB1kQwfG4FPzoDj+BJMva7 5URg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-filter; bh=aj+RtSka8qq6Q/sZbs4Nh7uTzjeeRlThX20vwezmEHY=; b=oE3gEj52/9o87jDiLIOytRwrDw7tjaI5KJlDRyv6gTRU8LQi3OVQxT6zARvDrmk3Od z+w2F4AtcvU16CLa8XDxy6BcmiUsxnuBHnNxNxNhOYj00bkPlp6lqeLBJohn1YNa+tfA yQoondmvbzrjqz4YFTzgddOkH5NCzOiOYMByPMwEjQ6U4Wop/cCv6PvQNO4ubJ7Effw2 jGcips7cZssJOtCuoog81gtM0+nIbFHU/z9f3JyWysRSEyhf53da6d9c3ngIPPJTAslF q0psrzBTHZ9DqHsoYfxPjYdqYYrELLoS10eNO8X1O040ckaGKo/KBy6oMtbCufhrpyE9 kuww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=ilBVMt6E; 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 y1si805659ilm.61.2021.08.03.18.52.31; Tue, 03 Aug 2021 18:52:44 -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=ilBVMt6E; 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 S232784AbhHDBQj (ORCPT + 99 others); Tue, 3 Aug 2021 21:16:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232332AbhHDBQj (ORCPT ); Tue, 3 Aug 2021 21:16:39 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D06FC06175F for ; Tue, 3 Aug 2021 18:16:27 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id 99DFD50EC; Tue, 3 Aug 2021 21:16:26 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 99DFD50EC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1628039786; bh=aj+RtSka8qq6Q/sZbs4Nh7uTzjeeRlThX20vwezmEHY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ilBVMt6ETeqmwAo4gX4w4k4xVYkViu6qqJfhHGznmZkukrWHxsOI12yYGKYJpmTSm BNfP5L5DTSTSyw8WAy6r7hwCo2/DQeamI25oFVC4qg+dx98VY8PMTQ3sDv7AFsLrlM TDzyUeB+vfFiKDkM6anVGH6eLLzthxl4jGp1KIGc= Date: Tue, 3 Aug 2021 21:16:26 -0400 From: "bfields@fieldses.org" To: Trond Myklebust Cc: "neilb@suse.de" , "plambri@redhat.com" , "linux-nfs@vger.kernel.org" , "bcodding@redhat.com" Subject: Re: cto changes for v4 atomic open Message-ID: <20210804011626.GA19848@fieldses.org> References: <20210803203051.GA3043@fieldses.org> <3feb71ab232b26df6d63111ee8226f6bb7e8dc36.camel@hammerspace.com> <20210803213642.GA4042@fieldses.org> <162803443497.32159.4120609262211305187@noble.neil.brown.name> <08db3d70a6a4799a7f3a6f5227335403f5a148dd.camel@hammerspace.com> <162803867150.32159.9013174090922030713@noble.neil.brown.name> 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) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Wed, Aug 04, 2021 at 01:03:58AM +0000, Trond Myklebust wrote: > On Wed, 2021-08-04 at 10:57 +1000, NeilBrown wrote: > > On Wed, 04 Aug 2021, Trond Myklebust wrote: > > > > > > No. What you propose is to optimise for a fringe case, which we > > > cannot > > > guarantee will work anyway. I'd much rather optimise for the common > > > case, which is the only case with predictable semantics. > > > > > > > "predictable"?? > > > > As I understand it (I haven't examined the code) the current > > semantics > > includes: > >  If a file is open for read, some other client changed the file, and > > the > >   file is then opened, then the second open might see new data, or > > might > >   see old data, depending on whether the requested data is still in > >   cache or not. > > > > I find this to be less predictable than the easy-to-understand > > semantics > > that Bruce has quoted: > >   - revalidate on every open, flush on every close > > > > I'm suggesting we optimize for fringe cases, I'm suggesting we > > provide > > semantics that are simple, documentated, and predictable. > > > > "Predictable" how? > > This is cached I/O. By definition, it is allowed to do things like > readahead, writeback caching, metadata caching. What you're proposing > is to optimise for a case that breaks all of the above. What's the > point? We might just as well throw in the towel and just make uncached > I/O and 'noac' mounts the default. It's possible to revalidate on every open and also still do readahead, writeback caching, and metadata caching. --b.