Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1733259rwe; Sat, 27 Aug 2022 15:50:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR4h6fIulfTIGPJrh43a1YIfmvBkXSaNCe4hs4eNmDmryX1Nhh7f8nWAM87tt2S7kW6FJ2g5 X-Received: by 2002:aa7:8887:0:b0:536:7078:75f7 with SMTP id z7-20020aa78887000000b00536707875f7mr10141273pfe.82.1661640639432; Sat, 27 Aug 2022 15:50:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661640639; cv=none; d=google.com; s=arc-20160816; b=bAjLDYCOJb0epZCitgItej+Sl+gePwTk1WxFO/y4IQrn1PyGDRFignznRp11PXs1bG +f0orL+h7HT4ae9ZBjOfyKkKFaGBNZr6SpMK0aQBgy5iPFvb+MSQDNkrGoB6xUqjA3KM 9jKIjY3dhyUL453Ny2y99Gq+SyH/cZ6BaLoAIVFN6z3TElwccSHq4WI62USflI3JsKlZ 0iuEFMssHnSy1hLGeNJqR3s1nJGFhB9tmZzLmclyc3SA7JKbh8yivdcDtOX26dtYXtGu tixnC9PsvQUwRprhSdK/QAmD9L1rJx9D3Tv3eh0Ti8ebaSs3KEZTWbBCQFDPkOCNYBVa 3zKw== 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=0srbmE7se1/webIbEP76hB4Oq2UTvYv6BWdCYbpFU1w=; b=Ihhlxl7bLoG+MkunU6TfDETUhXqS9G+83jTqQJxo31unx9ZE9vzrlw3egKazPRfafp MSmjPQoldEqxaGFrcA7ZB37G21iZ2JFWNWw1XRSWID30IJne3YgKzypALabchN8AEDox aQ1T3pqQlVHqTHwz0sj5P7zjjC2JvQ8ZYmgonTPoMYA15etJ6GYS/AtUMBOojaukHRVa POPJM9Ox+W1k4J5+pLUMZyzzIcEnQvohQ2N73yFg61e4JypFH068mYocz9XrUQYq8tYF vnb+nPDxPArRZGQiu+GkbQ1BhqRieyaoMmCihJZ2YRjWyPnXX6ZOydyEhVV0HHK2i5fe jyhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=ChDOfgcK; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n4-20020a1709026a8400b0017268f90f91si4712121plk.440.2022.08.27.15.50.22; Sat, 27 Aug 2022 15:50:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=@linux.org.uk header.s=zeniv-20220401 header.b=ChDOfgcK; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229852AbiH0Wqs (ORCPT + 99 others); Sat, 27 Aug 2022 18:46:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbiH0Wqr (ORCPT ); Sat, 27 Aug 2022 18:46:47 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3B3B564F3; Sat, 27 Aug 2022 15:46:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=0srbmE7se1/webIbEP76hB4Oq2UTvYv6BWdCYbpFU1w=; b=ChDOfgcKFvPYIRhfHui9MjUP9k RKbrn5/23LmkrN9ofk4yMTpEJ7O5fD+5LbBnj5hayWnVAqOKqWGhOiHQtZwCWCVJeWJ9ekR3Odr9H B7mMfOuabOUAvhnUxuQ11Br4WHZIHTUfZ4meQSFtYN578VaGPUjbh3tZd+eY8P5AMeKHYdkDd4taw MorgpTVfleTS5qWole4hAx4v8Thfy0WwnZYXxV1nHOfwYNLzUua+ilCjhJBlofvMABugWOyF7omkh /ahBbStJVf6abaPUDR9k6G0IP+naRoptJNem2u3ep8iMGiRayxIM66YvOg1QENbpi7gaH2oC0AX6V q6juhXXw==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1oS4ZQ-0097ix-6e; Sat, 27 Aug 2022 22:46:28 +0000 Date: Sat, 27 Aug 2022 23:46:28 +0100 From: Al Viro To: John Hubbard Cc: Andrew Morton , Jens Axboe , Miklos Szeredi , Christoph Hellwig , "Darrick J . Wong" , Trond Myklebust , Anna Schumaker , Jan Kara , Logan Gunthorpe , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-nfs@vger.kernel.org, linux-mm@kvack.org, LKML Subject: Re: [PATCH 3/6] iov_iter: new iov_iter_pin_pages*() routines Message-ID: References: <20220827083607.2345453-1-jhubbard@nvidia.com> <20220827083607.2345453-4-jhubbard@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220827083607.2345453-4-jhubbard@nvidia.com> Sender: Al Viro X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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-nfs@vger.kernel.org On Sat, Aug 27, 2022 at 01:36:04AM -0700, John Hubbard wrote: > Provide two new wrapper routines that are intended for user space pages > only: > > iov_iter_pin_pages() > iov_iter_pin_pages_alloc() > > Internally, these routines call pin_user_pages_fast(), instead of > get_user_pages_fast(). > > As always, callers must use unpin_user_pages() or a suitable FOLL_PIN > variant, to release the pages, if they actually were acquired via > pin_user_pages_fast(). > > This is a prerequisite to converting bio/block layers over to use > pin_user_pages_fast(). You do realize that O_DIRECT on ITER_BVEC is possible, right?