Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7466214rwl; Tue, 10 Jan 2023 00:53:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXuuS/fzQQgpy9YC45Z2Fid78dWZ+ucNPL/W+CzfX7DXYugqW2w7WAqhSMwYepz7tf18y3io X-Received: by 2002:a17:902:eb4c:b0:192:feef:588 with SMTP id i12-20020a170902eb4c00b00192feef0588mr17967655pli.23.1673340792629; Tue, 10 Jan 2023 00:53:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673340792; cv=none; d=google.com; s=arc-20160816; b=uSKVVEXzEMLpL7c1+czyQ3FZ51nrfHo3Ee5TGqSzYh9Yrk9AmPIgJwJ39mgPPtUmpD 2Z+F5Cr5MorwXKpi3yAUEKWH+oWLT7r0UG+6auySklDQwohyY8OXtmjiRHnq39UMyIWw feYsSmOG7/E1tg+uJjD679a4ThifTZK1/E+h4pjqPBbxZUPNE1hixYvfcJFGeUqWYZX1 6eqAIM1U1abUN3zBr2QyAfsg3RgPNzSunl2IUI/y4JehkMq/GuKXRjzxcAXlV1nTI6U6 8uBD+xiXQA3qN3qssIkl/PoTGbU0Y1QhpeNnjIQacJrFyNUXv2qDf3ZpyblCgcrSHX1H NheQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=usc4kPYlRKM7CFqadqNB7LyLIDZhCAK3LME1O0ZEeRg=; b=hw2caRHw1i+/FcUxQUIgFJ9RrWWzFmcIDwALhgv5mDHx53fKMloicpV87rX6rJEc4q WtbFIDySFIejMX/w1vm5fTcQIJxy+JCvaSWqcQwhkIynUB2ezVe6dzS6M9lxvm4sfji+ i2jPiEwEcGk5LSNm+g//+cWxYIuCmwPZt299l3YWe/tZ5aLNhlzeKV8F2bVu+9+Th7MQ M9jEwjl1jOKh0+EygSBftNQj2d55AFia/kVWB1yCJVxU5hL7U652rrFz8UFxTtC7Yi2s q8Xs2IO1Yyp5VQIdd4CIv9N2AI+t18Xi2tDGnLZPkH8mnofZSfj5IlVEn0ixOifw98W9 /Eew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=JsREblb4; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k16-20020a63d110000000b0046edf6e538asi11153192pgg.417.2023.01.10.00.52.58; Tue, 10 Jan 2023 00:53:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=JsREblb4; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235154AbjAJIrD (ORCPT + 99 others); Tue, 10 Jan 2023 03:47:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238144AbjAJIrA (ORCPT ); Tue, 10 Jan 2023 03:47:00 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4420D200B; Tue, 10 Jan 2023 00:46:58 -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=usc4kPYlRKM7CFqadqNB7LyLIDZhCAK3LME1O0ZEeRg=; b=JsREblb429CWLXqPBC0bFmQk8C JxdIJaCgXBIfXkIDBmcRskjW5V6Mc6cXIKK8M+VnmzytQo8kN0QHdmN3r+dJ0RDsx7g/Pjd3zKbEP ZW/C5QsNeZLHODkjFvCJZ5VK/q/z9foF87SWSlTIztfRjcyWo0ZWZoxY6G/1Qz6wyACTrvD+5YclJ OXPE4FDEiaEdNDVJ866VtAkLGuiAB3oeEVO/raQmatCKzDXz+mN3Q0eo+w5oZAXgDafVvUHeRD1mI 5cF8onl1ZCDW0LSdDjN9EqkGRnUUibxbyueYqIcoiJKkNE8r0KuB2SxPayRytNo/EdNvHhCPE/oD0 HB2pvFpg==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFAHN-005tNC-St; Tue, 10 Jan 2023 08:46:45 +0000 Date: Tue, 10 Jan 2023 00:46:45 -0800 From: Christoph Hellwig To: Andreas Gruenbacher Cc: Dave Chinner , Christoph Hellwig , "Darrick J . Wong" , Alexander Viro , Matthew Wilcox , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, cluster-devel@redhat.com, Christoph Hellwig Subject: Re: [RFC v6 04/10] iomap: Add iomap_get_folio helper Message-ID: References: <20230108213305.GO1971568@dread.disaster.area> <20230108194034.1444764-1-agruenba@redhat.com> <20230108194034.1444764-5-agruenba@redhat.com> <20230109124642.1663842-1-agruenba@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230109124642.1663842-1-agruenba@redhat.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Jan 09, 2023 at 01:46:42PM +0100, Andreas Gruenbacher wrote: > We can handle that by adding a new IOMAP_NOCREATE iterator flag and > checking for that in iomap_get_folio(). Your patch then turns into > the below. Exactly. And as I already pointed out in reply to Dave's original patch what we really should be doing is returning an ERR_PTR from __filemap_get_folio instead of reverse-engineering the expected error code. The only big question is if we should apply Dave's patch first as a bug fix before this series, and I suspect we should do that.