Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1367039pxa; Sat, 22 Aug 2020 23:36:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwy0EpG2Ntj9r2YNtg6r5IpNvR07A+pxGmd1FsXB/QQeUXSnSvEjmWdoaNT9xltuBFZW/dH X-Received: by 2002:a17:906:8389:: with SMTP id p9mr280588ejx.346.1598164587780; Sat, 22 Aug 2020 23:36:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598164587; cv=none; d=google.com; s=arc-20160816; b=ezvWus5hxGRml2ejY2kBXahWSn8EmDsOC1+FutvcaudpW6BmolyFAt47xHnF1i4FjW D1Pn/voaq/Luy7XHiqeCQ4iSgtED/oWOb9Ly1LQDLLkbG5QqSEd8EgMnTwG1NUXdsa8P fyaMbKMAujyxD8WIp/UpWEFiCnLiAEMCvDQP6+ZMaxMqHalgz1suYBrbHwRfrOoAUTq4 wT/FxAeDaSH9inO+WhzcwV2cEG1B0aRlR9YdEGGki0T16PaQaoKha8HtIgZE/BYLhLe7 AIUlKZ5QOBIMVEZSs0OVTKodyDRxL4dWyC6OsCsixy4dbT+sBmn0Pmf8uWAEGw0OS+9d 8oeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=xHNPas4uqQzNSMZwEJoiWBVI4RMLp8MHwIUwAk63z1Q=; b=Pq58n2uPDg8/bKriJRrZYBnHJXLOBVQ79cQ2VhuyMj6b//cEZv46PAURHwrsNEmjSA iACmfNWUZTarfgSTQkNCuyTExVENugh9EqnUw3DMCPrQyvRe1zCtqckUKAuBacsYxtxc YiA5ESj7n4PIpGyjzoWdhuO36wyhHrh1N4H52n58na+qQFj86IDKMZ/zQ0PeyzcySFcu J4diGXYNx7G7TtsL2aDT/1QuOQe2099HeUU2EXm+0fJYE/pIGAJTIe8ZHY93WfbrAv1B hB1558vKbXc8lfrAL0lFzxnGIc87OMsz6ARfsHfrCWSKRgRK8Utlu4RthQ8aE3XKnwbz xTAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=Z8iL7NHa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dt2si5452668ejc.67.2020.08.22.23.36.03; Sat, 22 Aug 2020 23:36:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=Z8iL7NHa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727064AbgHWG0J (ORCPT + 99 others); Sun, 23 Aug 2020 02:26:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725920AbgHWG0I (ORCPT ); Sun, 23 Aug 2020 02:26:08 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98164C061573; Sat, 22 Aug 2020 23:26:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=xHNPas4uqQzNSMZwEJoiWBVI4RMLp8MHwIUwAk63z1Q=; b=Z8iL7NHaVRxDIHyP/BmrtuGDZ+ I3inqX3HSz47Eu4p/9fCIK7Ou1agE7Br+HXlXAhWqVJLphgfELGc8HxD/uYIkXiWjce1/x9sro9QI 2qEqhUHGzfhI8een9gxSRNmavstFClnpCjaxcVODYD8N3Q88GUYCsxvDBgIZl/vSPvgIJtlE5Sof8 aHpBoBqhRWzfbZdyGrunlo2/RjGLrbPSxgASQT38gDhqileNV1DWTwfwzZZ0kiJ/YK+5uCrcFyJHB pu4cLFn8i0vmYE1TYlPMdBjeMmoEUaeJid5e43hj1CRXiusab3pmDyoGjfHZOs+UIAORqg/SGWndc KvlFXrhA==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1k9jS3-0000G8-9B; Sun, 23 Aug 2020 06:25:59 +0000 Date: Sun, 23 Aug 2020 07:25:59 +0100 From: Christoph Hellwig To: John Hubbard Cc: Andrew Morton , Alexander Viro , Christoph Hellwig , Ilya Dryomov , Jens Axboe , Jeff Layton , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, ceph-devel@vger.kernel.org, linux-mm@kvack.org, LKML Subject: Re: [PATCH 4/5] bio: introduce BIO_FOLL_PIN flag Message-ID: <20200823062559.GA32480@infradead.org> References: <20200822042059.1805541-1-jhubbard@nvidia.com> <20200822042059.1805541-5-jhubbard@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200822042059.1805541-5-jhubbard@nvidia.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 21, 2020 at 09:20:58PM -0700, John Hubbard wrote: > Add a new BIO_FOLL_PIN flag to struct bio, whose "short int" flags field > was full, thuse triggering an expansion of the field from 16, to 32 > bits. This allows for a nice assertion in bio_release_pages(), that the > bio page release mechanism matches the page acquisition mechanism. > > Set BIO_FOLL_PIN whenever pin_user_pages_fast() is used, and check for > BIO_FOLL_PIN before using unpin_user_page(). When would the flag not be set when BIO_NO_PAGE_REF is not set? Also I don't think we can't just expand the flags field, but I can send a series to kill off two flags.