Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp416010rdb; Thu, 30 Nov 2023 08:03:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IG+qTGDGbxLejColEUOHSdyFKM/V5eUkE7ntAHaugmiVS2PJr4404nkTxz26ba00hoN6Ql9 X-Received: by 2002:a05:6a00:1251:b0:6cd:d67f:7cb with SMTP id u17-20020a056a00125100b006cdd67f07cbmr8175167pfi.16.1701360233484; Thu, 30 Nov 2023 08:03:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701360233; cv=none; d=google.com; s=arc-20160816; b=ONFZBWhm1q5nIykskVdW79cEXD4RaPNZOUSwcOcK0YWrr9TVQYmnISe+zP30X/4Osb vuW3bnOzOQOF9zi6c27H8UM2q0V7wLYduQR+7c2IfLKbNyB06UKTV76WeoGuQuCC/5RV wcIA8lA+FDCpijMkhc/VP4CWu0zr2m3k8g0pmmFxycMaPuSyDvHlQnmj3H5WbWNj2DLt WT9vYjEli0ykGUfyinzUmvCyouEED4aiq5G7CrJHSWya2kvcHfrbBIj/PiwbPAUsb8EK vmltgDblVf8YO+3soI7Rzov9pk6rx+vM3F+EBlPAGU1hTrTJSjYoG2zcDkIq++4oAmd8 1dig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=92VXvFUlFRJzLvUpsx/6oVUi1MNnsUSU071rX2CwwRM=; fh=QuxMcBaxE3/tn57a2RX/8liFzVvfYnV4T6V7s4P3Yr4=; b=anNpO/LdVt56XaCSML13kgOWtB+ON2DvWSQJq/rMyGlaoDcwO6g023f0Lhf6elXVMP 3Nnk8+Icz4It5Zc3G5fyq3eUK+KgDiOJnQH76hAMDf9gU6oNb+6wZu9Klp0kJPbv5TnY 6dA7mse2h9dnbYyQuUIvsI4HM0QGZ2lXD5M4sPzKfFdAUg5pzrF5Iom5r90wwUeP1wRh fiHE1IAJMqRZMo5hqRNCdiLUMUF3DHGfF8o93CaptMXqcLx1nfN9M2wWvtR7Ye3sdEw8 eG2Vp34bZVR58oXN1/Ind/khyVl1MLEUan1VbrzkAN0ivEUOJ5eu0BT3mm8ADL5u3FQU ECcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=iSUjxsLr; spf=pass (google.com: domain of linux-ext4+bounces-252-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-252-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id be14-20020a656e4e000000b005be1b2503ebsi1746035pgb.194.2023.11.30.08.03.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 08:03:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-252-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=iSUjxsLr; spf=pass (google.com: domain of linux-ext4+bounces-252-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-252-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D0C4E28130C for ; Thu, 30 Nov 2023 16:03:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 43D3C5466A; Thu, 30 Nov 2023 16:03:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="iSUjxsLr" X-Original-To: linux-ext4@vger.kernel.org Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F067C197; Thu, 30 Nov 2023 08:03:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=92VXvFUlFRJzLvUpsx/6oVUi1MNnsUSU071rX2CwwRM=; b=iSUjxsLr5KjK+1lFq02//yGooQ AJtK8D9RIfzXEbgA097WkSZMuge9IiiKpHaAe1S9eSxu8J62ZR82s+0XybDp7nB2ItKkeeKPF1m2B cQs0T0zlPdVWuQW0fTXWVN0G4ufSvyKANxymWR2KU/FlqZt8455J1WfHYCTQF0qyvMqSUGD6aSw1d F+JLSW1u5BaU5gD8gKdQWM7hqx0eOebkzfwJ9ytzznvAk5xYDNYxw6B6ykCXyFotq2uYvy0kcs4/b TrkKjWDuHUViO+YGEj3wWPfPyelhEmgpdvZTTfQcr+O4t4VumpR9ld08GJOEus9aC9sOGbjvF4hU9 zIXU7qEw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1r8jVp-00Ecwr-8G; Thu, 30 Nov 2023 16:03:37 +0000 Date: Thu, 30 Nov 2023 16:03:37 +0000 From: Matthew Wilcox To: Ritesh Harjani Cc: Jan Kara , Christoph Hellwig , linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [RFC 2/3] ext2: Convert ext2 regular file buffered I/O to use iomap Message-ID: References: <20231130140859.hdgvf24ystz2ghdv@quack3> <878r6fi6jy.fsf@doe.com> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878r6fi6jy.fsf@doe.com> On Thu, Nov 30, 2023 at 09:20:41PM +0530, Ritesh Harjani wrote: > OR, one other approach to this can be... > > IIUC, for a new block mapping for the same folio, the folio can be made to > get invalidated once in between right? So should this be handled in folio > cache somehow to know if for a given folio the underlying mapping might > have changed for which iomap should again query ->map_blocks() ? > ... can that also help against unnecessary re-validations against cached > block mappings? That's pretty much exactly what buffer heads do -- we'd see the mapped bit was now clear. Maybe we could have a bit in the iomap_folio_state that is set once a map has been returned for this folio. On the one hand, this is exactly against the direction of iomap; to divorce the filesystem state from the page cache state. On the other hand, maybe that wasn't a great idea and deserves to be reexamined.