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 32E7FC54EE9 for ; Sat, 27 Aug 2022 22:46:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230356AbiH0Wqt (ORCPT ); Sat, 27 Aug 2022 18:46:49 -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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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?