Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4054432rwb; Sat, 21 Jan 2023 05:10:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXtbLahTx+Gaiu9BOFk9Bsx8h2WQIPQ8RW3JOo6F8MxC0Hck5ho+d/QegQxZ34RJ7Z6c67YD X-Received: by 2002:a17:906:9417:b0:86c:f7ac:71ff with SMTP id q23-20020a170906941700b0086cf7ac71ffmr18165867ejx.10.1674306642137; Sat, 21 Jan 2023 05:10:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674306642; cv=none; d=google.com; s=arc-20160816; b=cfgt/B7xnam/G6KT9YoOkseMh0I/rRCLu6LyGcb1g1eCCsK/UXXhzdZEx07YhHYYjP ob+ltjKEzur3/WjRuHY/ADN17hPEaqQFGAZHnnTr/7TpFcsEp6ZUa9HhNov/7rU5Tb+3 opD0nkoTLSl+S5oDo97GDMUxqBcBaTLEFATRlb/vPjWkLjeMhQjJrA62vrwTbGSngZ+4 IkLpfISOOurEqEDD2jQX5IXbjiZuL5Gvd209uHLyQQ70WUrEB31Daeug1SZdY30o8HW4 4cS5M+Hn5BryFQoPAexH3BwhWPVqoIoKijDW+0L58/tNFKR8KkrCEznOmWZiAjNeXJNn LSzA== 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=s1Q5e085clIsV3PVum3lXcgIxl15MvZT6rwMsx9v3V8=; b=w6DaSQUUNX/YYZN0JwxppS7DD8dSNl3U0nu7S3mTnDmiWAJex6Lby5CVMCCAz812bV rh1hqcdyalUhg2qQvf/XzkSsGt1CUa+iuHVYxECaKXpNKC1gGHVnvr6BILselnc3+kUD +wtPwpg9fyiSbykiGZcWNzDHkG6jI1AOjHlQuZv3BIU/PUtL2Bdehn10N5ipohlcd0fj ukG28hLoIdJecNfLSptoH06sLVD7/fT97DEAR/3E1kgj5cW5KcsjsFjKbXvkd1s4ZbVO 7qH3U+X606oZpibt6pKM30XYFtO8SFk/hTQgbLTZ7p2bmx7J5gG1/iChLVHF82OBklfO 62Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=u5sCxbKg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 xb13-20020a170907070d00b0084c6c0a5296si50503835ejb.134.2023.01.21.05.10.28; Sat, 21 Jan 2023 05:10:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=u5sCxbKg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229686AbjAUNFC (ORCPT + 52 others); Sat, 21 Jan 2023 08:05:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjAUNFA (ORCPT ); Sat, 21 Jan 2023 08:05:00 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5034429144; Sat, 21 Jan 2023 05:04:59 -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=s1Q5e085clIsV3PVum3lXcgIxl15MvZT6rwMsx9v3V8=; b=u5sCxbKgnrP0/MSPcRZ4zYLP8Y PZGMPuq58CgQRKw1UVcMT2luKVkOzBZ3TNbLDPJtoEllXV0mKhnHpCdvNKjc9JG4hfysYVJN5g4Wr T+v6ZpOxE7AF8/TozQIMx0m3Ukaj5KeT3598Xhrv/azryWX+++7PFkkwcvwWcZ2YRfnbujnCy6iwF vPn7hoKK7NzS/ujDN6zDJAhg+5FmynKqDc0qKUXe9Ns14cSJ5IMCNYIgHh3AIKF6azdTrJM3YJA5K 8rCLmY7EEHu6d1naI7gv549NCc5H07HEIaV3P2jpKm5URDtOQ1KyAiB722ws5tQgK92JJOMQhG59b /WSwAmHQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pJDYB-00DsbC-49; Sat, 21 Jan 2023 13:04:51 +0000 Date: Sat, 21 Jan 2023 05:04:51 -0800 From: Christoph Hellwig To: David Howells Cc: Al Viro , Christoph Hellwig , Matthew Wilcox , Jens Axboe , Jan Kara , Jeff Layton , Logan Gunthorpe , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Hellwig Subject: Re: [PATCH v7 4/8] block: Rename BIO_NO_PAGE_REF to BIO_PAGE_REFFED and invert the meaning Message-ID: References: <20230120175556.3556978-1-dhowells@redhat.com> <20230120175556.3556978-5-dhowells@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230120175556.3556978-5-dhowells@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,URIBL_BLOCKED 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-kernel@vger.kernel.org On Fri, Jan 20, 2023 at 05:55:52PM +0000, David Howells wrote: > Rename BIO_NO_PAGE_REF to BIO_PAGE_REFFED and invert the meaning. In a > following patch I intend to add a BIO_PAGE_PINNED flag to indicate that the > page needs unpinning and this way both flags have the same logic. > > Signed-off-by: David Howells > Reviewed-by: Christoph Hellwig As pointed out last time, we really should not set the flag by default. When a bio is allocated there are no pages to be released, that only happens when we add dio-like pages to the bio. Instead of explaining why I mean again, I've put together a version of this series that implements this and my other suggestions here: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/dio-pin-pages This also tests fine with xfs and btrfs and nvme passthrough I/O.