Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp151493rdh; Wed, 22 Nov 2023 23:02:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IG6YuqU3zC4Fj7mXAl8tneqS8nQklTe5AWQOAqgBRUy8xc5UqhkTplfsSk6Le387oCG3Mzs X-Received: by 2002:a05:6a00:278c:b0:6cb:70cd:9dff with SMTP id bd12-20020a056a00278c00b006cb70cd9dffmr5525851pfb.1.1700722941268; Wed, 22 Nov 2023 23:02:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700722941; cv=none; d=google.com; s=arc-20160816; b=WpGkuMlA/E5J+dHDTdVqRnARNODMYO+aHCeiZYta0ywoktVPiTI7lnr5yiu902cMc/ cAJnI2dWn/3gSRWrTa6LGJJZGMjOHWZhPoYiBWd4dZ6xb5WvvzI7MWqAAfHR3shWGkhl 48+7/N7Z7aKPhfBXXi1bYA7WYZiY8L3f6+nF+fIRJwxX2rHXbKn3xwkhz85ZTQ2xw948 Dbee6nNAhEW2+noYtez/MlYyWHTZ6CSpPdEocFcV0kWOzmlMobeb6fnm0Xkg+zY2m5Op Q2Brc85vFiRhSEW5ELn5wXOxYwSKkrqLQhDptkP8Ud+nfBTJq788ZKAH1Pbaq3zkePKO OPhA== 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=wGp8wkm1UDcmb84ZHwflLaHhqE+fC1a0uk/PE7zSUac=; fh=2LA5e2h/TKB07aVl1W+mAx9+8bEDeFyOUWWbuFDrd8A=; b=XaeQ3QAQZT8aJAdFoLj0dxRu//bv5ap7GD+JmeOtwP+gypEOssoYS5dJ97OKpeu8tf RRp4r2Xb/W1JjDr9u7PudBb2TQYcyuEFQVMZUSIEg2ClJM00qeSIDOZoTJKdg1UOD7so SRuPjjDD1E3XiL6tlFi8h9dIo46PVmqxLawyXI+VDiJbSD4LBkHC0HKOOnZU5MIhyIpZ eqq7UcRDWT9EdJwikCqXgJZ3IJs95iOI8198anIm/Do0QCcZHpQR91gFCG9GTgpJNAx9 CmfD6wFGiavg/zixFRVKrZW8idWC+ZWE5IRAcRdgAc+ogSNcT8WcLL89YWzmQ1VnthxF juiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=vPYSXaRA; spf=pass (google.com: domain of linux-ext4+bounces-100-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-ext4+bounces-100-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id m190-20020a6326c7000000b005c17391f233si754789pgm.852.2023.11.22.23.02.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 23:02:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-100-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=vPYSXaRA; spf=pass (google.com: domain of linux-ext4+bounces-100-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-ext4+bounces-100-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 365CDB21092 for ; Thu, 23 Nov 2023 07:02:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 445891401D; Thu, 23 Nov 2023 07:02:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="vPYSXaRA" X-Original-To: linux-ext4@vger.kernel.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A47FE91; Wed, 22 Nov 2023 23:02:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=wGp8wkm1UDcmb84ZHwflLaHhqE+fC1a0uk/PE7zSUac=; b=vPYSXaRALrc/Uz1cQO2Sq51v8I TS2Lzn2E+ZJpBPpkCKccvCz/HQ4y3E2VDGpjaffHXmho0yEteK2TSeMDi+EY05egavpeCk9WBky9Z RYXMrzDICyh444lnHviZf9DzcZv9czI1pLQWUQ4D5Z0vYUmFqqBv0MGltYbGfdcZnYIFgFchc4j79 Ioz7b1XA5yq3bMUvWHnlK8UfqZ87JlSC+G6DZiHHlvHeuRMTR0oaxkfQYDar0OPsGphLTfFYKv3jB AAt/eK4j6kDzkt/rAhHTUhCpkF5NzkaRho1EQgiAi7azLW7Xpsasev88kZSetEb4bHcNkAXOiTNOw 0OZI+4aQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1r63ir-003yVI-0J; Thu, 23 Nov 2023 07:02:01 +0000 Date: Wed, 22 Nov 2023 23:02:01 -0800 From: Christoph Hellwig To: Dave Chinner Cc: Christoph Hellwig , Jan Kara , "Ritesh Harjani (IBM)" , 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: <20231122122946.wg3jqvem6fkg3tgw@quack3> 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: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Thu, Nov 23, 2023 at 09:26:44AM +1100, Dave Chinner wrote: > I think that was me No, it was Darrick. We talkd about a lot of things, but not this :) > , as part of aligning the writeback path with > the ->iomap_valid() checks in the write path after we lock the folio > we instantiated for the write. > > It's basically the same thing - once we have a locked folio, we have > to check that the cached iomap is still valid before we use it for > anything. Yes. Currently we do that in the wb ops ->map_blocks. This can get called multiple times per folio, which is a bit silly. With the series I just posted the link to we at least stop doing that if the folio is mapped contiguously, which solves all practical cases, as the sequence check is almost free compared to the actual block mapping. For steps beyond that I'll reply to Darrick's mail.