Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp44138rdb; Tue, 19 Dec 2023 08:57:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IG/WI5gmlv8BFuQ2c0JOuuZaX/PBaV3l95Dittm4H41SSkDNM0wMc061fnzJDVg6poz40VE X-Received: by 2002:a05:622a:1308:b0:423:93cf:8a92 with SMTP id v8-20020a05622a130800b0042393cf8a92mr25144364qtk.21.1703005022240; Tue, 19 Dec 2023 08:57:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703005022; cv=none; d=google.com; s=arc-20160816; b=I76HeCjdtOfE+96kC/cr+2qJR26ZnLlnvS43qDEFSzA2INlj0GmRct8bG7bAev2/3M QIJKK4lltDiufTKphiKl5wvfhqH2YTVWk28rZ8aN2HadOZvCm3P/9ajcUSU3Nlx7F08R njpzd2T5Pzq7OcIrK9nOa3FwM9CExCYKovMuCP2lC1yzmQibZfUSiU1FENBqqCccH31l eQPVZCt2T2rr6Z9WXI4CbTm8UBI6za/ww/L+QgsD0cQviEr6V9r6Mf8bIgKHD/mQxsfH WFL4UR+VWPJlLUbCSpACYrQ7Hp4yW61bfqGe1hx2MSIpLu3AQzTPL29h1mKkO0Tkj3G0 QGmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:content-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:cc:to:references :in-reply-to:from:organization:dkim-signature; bh=B719XTWiXIHllaEXvsXPz/Q4Bs162RLSRke3FIDQ97A=; fh=oTSheoojIQWE85h15wIbFV5tdQ792s9VwZPsELvSY7c=; b=ATt33q7ZVVJjF2BkVhdA4EOZR62JOVrw5a/X90W38FLbCyrq3BmsyrARwukMT3TSkd GTa+yZ0DHlW8WDr/JTan4lXltF4+qVvCj4AORV0tgjUPnQQ5yJAf0fklJj+oPO3zPFZL E45vfh4FodQdrFEujMgTiIDLdiWPaVg6zUYgyGs0MUMUNTu0P+FMInnYoHYgIBn/cM7e XnWosoas9u+iIPOiN0mdMtRih1PURAfWxI+c8+hOcj6Yw9M1PjUJEBwV7qJjGPKm538W /rm06Dg3PsbeLWmbFio+KyqUkcRLsBDswjyJ/p6VRF3lZyONaauwYEmldJxcrbe814dz tZxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="GCIh3SP/"; spf=pass (google.com: domain of linux-nfs+bounces-711-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-711-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id a7-20020a05622a02c700b00427818ff6d9si570345qtx.775.2023.12.19.08.57.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 08:57:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-711-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="GCIh3SP/"; spf=pass (google.com: domain of linux-nfs+bounces-711-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-711-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 001D61C24997 for ; Tue, 19 Dec 2023 16:57:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6FD2820DC2; Tue, 19 Dec 2023 16:56:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GCIh3SP/" X-Original-To: linux-nfs@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0DC1F20DD7 for ; Tue, 19 Dec 2023 16:56:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1703005007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=B719XTWiXIHllaEXvsXPz/Q4Bs162RLSRke3FIDQ97A=; b=GCIh3SP/uGneMf8xdyoLz80TYT/RtpRVl8Ek+VbMIe7dqzBw6wv8DyYQPHxFKw3zWnskYL D+32W/T1yqbc5+lCacqEnSewas/ox/2HsLpUQyVNf4GOmn1jbQ+VTRXWsDYcwe2xvbfAd4 40GO2SaZs1lOsOxuVRn3ApxUrGDE22o= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-15-6503fTaVPLqMEr27yNBRTA-1; Tue, 19 Dec 2023 11:56:43 -0500 X-MC-Unique: 6503fTaVPLqMEr27yNBRTA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9ED74185A782; Tue, 19 Dec 2023 16:56:42 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.39.195.169]) by smtp.corp.redhat.com (Postfix) with ESMTP id D48152026D66; Tue, 19 Dec 2023 16:56:39 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <8b9413cc37a231a97059c7d028d404ab35363764.camel@kernel.org> References: <8b9413cc37a231a97059c7d028d404ab35363764.camel@kernel.org> <20231213152350.431591-1-dhowells@redhat.com> <20231213152350.431591-38-dhowells@redhat.com> To: Jeff Layton Cc: dhowells@redhat.com, Steve French , Matthew Wilcox , Marc Dionne , Paulo Alcantara , Shyam Prasad N , Tom Talpey , Dominique Martinet , Eric Van Hensbergen , Ilya Dryomov , Christian Brauner , linux-cachefs@redhat.com, linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 37/39] netfs: Optimise away reads above the point at which there can be no data Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1075372.1703004999.1@warthog.procyon.org.uk> Date: Tue, 19 Dec 2023 16:56:39 +0000 Message-ID: <1075373.1703004999@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 Jeff Layton wrote: > > (4) On local truncation up, we don't change zero_point. > > > > The above seems odd, but I guess the assumption is that if there are any > writes by a 3rd party above the old zero point, that that would cause an > invalidation? All truncating up does is extend the region from which reading would return zeros, so it doesn't affect the zero_point. If a third party interferes, then we have to invalidate the local caches and reset zero_point to the EOF. But if a third party is writing to the file at the same time as you without both of you using locking or exclusive direct writes, your data is probably screwed anyway... Something cifs and ceph can use leasing to make this work; afs uses the data version number, notifications and the principle that you should use file locks. David