From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67E54C77B7D for ; Sat, 20 May 2023 04:14:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231186AbjETEN7 (ORCPT ); Sat, 20 May 2023 00:13:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230515AbjETEN6 (ORCPT ); Sat, 20 May 2023 00:13:58 -0400 Received: from out-28.mta1.migadu.com (out-28.mta1.migadu.com [95.215.58.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B91E137 for ; Fri, 19 May 2023 21:13:56 -0700 (PDT) Date: Sat, 20 May 2023 00:13:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1684556034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=SqsoafzfPV4IjLE2ZLifRoMd5Uqk59FpqAOq5GWnoQM=; b=e83hTXYMTjZ/kGkbHdu7QBK20JnL+nV9RtMDsHlg28URjNMcntI70K8uqwcw5eQ3Ld1ydi TB7rGni/vKo4lvCEPpV1/beRn7aqjBmnhfTv2E1LfUAP2+rEvrxOgoC/2VlqaZzFM9Ml79 vcAh3oHBldDEBGbnW9lVw2yfE5x2be8= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Christoph Hellwig Cc: David Howells , Jens Axboe , Al Viro , Matthew Wilcox , Jan Kara , Jeff Layton , David Hildenbrand , Jason Gunthorpe , Logan Gunthorpe , Hillf Danton , Christian Brauner , Linus Torvalds , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Christoph Hellwig , John Hubbard Subject: Re: [PATCH v20 29/32] block: Replace BIO_NO_PAGE_REF with BIO_PAGE_REFFED with inverted logic Message-ID: References: <20230519074047.1739879-1-dhowells@redhat.com> <20230519074047.1739879-30-dhowells@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Fri, May 19, 2023 at 08:56:56PM -0700, Christoph Hellwig wrote: > On Fri, May 19, 2023 at 09:26:07PM -0400, Kent Overstreet wrote: > > On Fri, May 19, 2023 at 08:40:44AM +0100, David Howells wrote: > > > From: Christoph Hellwig > > > > > > Replace BIO_NO_PAGE_REF with a BIO_PAGE_REFFED flag that has the inverted > > > meaning is only set when a page reference has been acquired that needs to > > > be released by bio_release_pages(). > > > > What was the motivation for this patch? > > So that is only is set when we need to release a page, instead telling > code to not release it when it otherwise would, where otherwise would > is implicit and undocumented and changes in this series. I suppose this way setting it can be done in bio_iov_iter_get_pages() - ok yeah, that makes sense. But it seems like it should be set in bio_iov_iter_get_pages() though, and I'm not seeing that?