Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp10677099rwl; Thu, 12 Jan 2023 00:44:58 -0800 (PST) X-Google-Smtp-Source: AMrXdXunXzNDlP80ZRX3ZJvZPSsCiWQeMFY0+sIRWMMlrMhIr/EUU34S8cL1MSZ8sw2pn6lfrbZ0 X-Received: by 2002:a05:6a20:94a0:b0:af:e129:cc1 with SMTP id hs32-20020a056a2094a000b000afe1290cc1mr58908991pzb.27.1673513097832; Thu, 12 Jan 2023 00:44:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673513097; cv=none; d=google.com; s=arc-20160816; b=uF83utRO330bVAwZD5Bz9vN72HT0CLcmJHrzmovaO7XTfA2q5Bl5dhsUGTSb+9uXzA FcMCmgUSOFlI/zblb6bCqE5HBKECQf9NfF0iC6ZDzOl0tkM9ClNRiSmbFam8+qzYcCGM vNgf+w3hdpp77llPX58xQGToykiaHAiiqpZwQA3SaKV57HFU1qUBXJ4Oon5NrQNTzOF0 xY36zcBAGH9JQojuGXWlE7IAjIUzpKKCpoxdvWfHXyDlF6et9JqN1pZTJO1HQ3imFcsa 7fyyzJ30EGb3G3kEaWEfmr/taY71ctzp+9BLEjxM8SRs+HDrM2FbzsCKwb2jzvg8W0ep GF/Q== 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=HhzoXJd8QLSlSJS1DqxUvN7zM6XlenXjXRqQOg3se84=; b=FW7kKbNppYQtvuUQM2+T/RY/3An+XT/SIIxIGysaw8cm0oh0j6BCSZ4ohB6l6/Yo1H fSU4hUo0djSeUVGa+zMQO7gNFVprwIq6vJoH8h2lBhb1SjvlDIJup16oAqC3IXh6hOSy yVoN6500KU5U89F6M6UW00EKjOp2o82wfzbjwtYTcoSXOtQ9wWXUH+tHPC1DYs2nFtn+ HQQh1ZGax6C0w/DXPflCOv7EaaL2IUBh2u7f1lGKOPyHwdiB4szy07HjWFh0UQACKvFP C7fmJeb+n4j50iZWs19JLhLYPLKkMTFLVT4z4sBMJqaz/DPbbWx00AAey2kvpsi/shPY IgyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=B6HF5bEx; 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 a21-20020a63e855000000b004791644f520si16766851pgk.437.2023.01.12.00.44.42; Thu, 12 Jan 2023 00:44:57 -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=B6HF5bEx; 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 S239681AbjALIoB (ORCPT + 99 others); Thu, 12 Jan 2023 03:44:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239892AbjALIng (ORCPT ); Thu, 12 Jan 2023 03:43:36 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E551C3DBF7; Thu, 12 Jan 2023 00:41:24 -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=HhzoXJd8QLSlSJS1DqxUvN7zM6XlenXjXRqQOg3se84=; b=B6HF5bEx6iqEqIAEHf2KINLTzb kw9Iebu5wNTWnbBag/0Id0Fod+g8oVrFealLYYHlZkdcuro4LzIyMwsxEsEgwqA64cHt6gBru07Wi N5Sr26uvf7bx7QE8WLvoRr/le712HeIsmQzOEuOgkKzM18YXEwm51xjUI1tjei3SxiNxUF9Arg5aM v7mkqZfg+74uPpIeA+khsFr6LUG8fYSZQJzK6dRbYkoG80/bhxy19B+J0+q3eiUXZvDyhBWZbGOna ixysnyYIGf74Otb4knAoAeVYO+V1/l5hePKQmFMLEAcLIcpVIAhFbmWQkd5YR4UxIuCe8u3y32R+Z sxkp/04A==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFt9B-00EALM-Ff; Thu, 12 Jan 2023 08:41:17 +0000 Date: Thu, 12 Jan 2023 00:41:17 -0800 From: Christoph Hellwig To: Dave Chinner Cc: Matthew Wilcox , Christoph Hellwig , Andreas Gruenbacher , Dave Chinner , "Darrick J . Wong" , Alexander Viro , 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> <20230111205241.GA360264@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230111205241.GA360264@dread.disaster.area> 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 Thu, Jan 12, 2023 at 07:52:41AM +1100, Dave Chinner wrote: > Exposing internal implementation details in the API > that is supposed to abstract away the internal implementation > details from users doesn't seem like a great idea to me. While I somewhat agree with the concern of leaking the xarray internals, at least they are clearly documented and easy to find.. > Exactly what are we trying to fix here? Do we really need to punch > a hole through the abstraction layers like this just to remove half > a dozen lines of -slow path- context specific error handling from a > single caller? While the current code (which is getting worse with your fix) leaks completely undocumented and internal decision making. So what this fixes is a real leak of internatal logic inside of __filemap_get_folio into the callers. So as far as I'm concerned we really do need the helper, and anyone using !GFP_CREATE or FGP_NOWAIT should be using it. The only question to me is if exposing the xarray internals is worth it vs the less optimal calling conventions of needing an extra argument for the error code.