Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp120558rwe; Wed, 31 Aug 2022 17:46:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR7g6kKgzDg3Mjt3KhUL8bZ7s5khNyMNfyyMtv96WlvqZgvej/lWVON94acoxwK+BG0/IVQX X-Received: by 2002:a50:ed93:0:b0:448:1acc:c048 with SMTP id h19-20020a50ed93000000b004481accc048mr19518977edr.148.1661993186768; Wed, 31 Aug 2022 17:46:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661993186; cv=none; d=google.com; s=arc-20160816; b=ohHOb5SjmJTrvOBCNo04YGManSqLkOexlGfBMG6YBKfa9xbzGW63CdI30FnLRmB0o6 HipuZeDHkmS/J7GLVRIOwCe5lM40kMFbO/qtY386ngs83ZVhwGDhNSXtGefoEOPe2Dyn hhAyHuqHJmys0B5vcHRfdEYapFF2qPwiLm6dXo/tXNHxtR7nbREyKDhXgO8iL3UAgyo1 WLw1ryiCg14p8OHLClHRc8nK7T2j0SfQuV9rBrgWx4WWSZKrooIk2RGLo1+e3nAxIcEa ugR1iq0+euIRj4hu2xhkdb/Gnh48yY+5BFtmFFNcviZFm96b1DXtscmEb14lE29Nkz+R qHNg== 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=C7e5gupx7uxhb230xCd10coToUBiCKDWQPIlevGdY80=; b=joyoP4yBJ/+G7oNL/qlNBqreVefW9rvdmkJcsATBE9xqFuI3pj1CAjB0pN6e8p26nP nDBDE9mBY5mneWqW2TywEohYkrv/vt0TroB+EQvP9GggWCeMx2xZEv48W6oSpH51+vzS zodoBZHLFkIUrIHy5SslUhQZKrocOKcdoemIBppXeMu42gRI3Qi3wZAcPlgm4HMsrUAv OZDE9AVOhY/1a+F5o1bpxskwhyXK8IhT0w+V0hxPK0M37E+teotnmtKINeEsOTWYh969 n4BtO7+ogce3ACUKOIj34Gama7+R2GTwRcVSWpeUQJDOpm5cAbeqSllAgz78h7LOGds1 pjcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=hOmLMP+u; 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 qf31-20020a1709077f1f00b00730babc11e3si13933245ejc.640.2022.08.31.17.46.01; Wed, 31 Aug 2022 17:46:26 -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=hOmLMP+u; 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 S229711AbiIAAnA (ORCPT + 99 others); Wed, 31 Aug 2022 20:43:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbiIAAm7 (ORCPT ); Wed, 31 Aug 2022 20:42:59 -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 33645E0976; Wed, 31 Aug 2022 17:42:58 -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=C7e5gupx7uxhb230xCd10coToUBiCKDWQPIlevGdY80=; b=hOmLMP+ugUyeMF+6QA09PjcGfu 0tRtPHTBgl7z0s+0RBcR5HuECX6vysi72oyqb9nKg5wfcAeYH/E5qvTZmEwzNP02MAz3qPXJ2urMq QOEo7VxYgfOzukB5+Q1xXyGnNcYh1a5f1Ccjj4umz03kPQ8jMURb+pUCnQE0CQCv6lLQOzQmYKqLs Wjx2NxdOHt3j+kmpXPmv2ZJZKZWFhn7QqvE02d6Oenv6a0u53D681c/AL6Ll/H2pW8+77KFGmiFSo uefabYiIChsmUAUy82RL56+vUhGqlH10rlzlzMZwSYk+7CP8NtmpA4CSnqdXla4EwnXtAff+Ztcj8 HY+Qicmw==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1oTYIA-00AnSf-7D; Thu, 01 Sep 2022 00:42:46 +0000 Date: Thu, 1 Sep 2022 01:42:46 +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 , David Hildenbrand , 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 v2 4/7] iov_iter: new iov_iter_pin_pages*() routines Message-ID: References: <20220831041843.973026-1-jhubbard@nvidia.com> <20220831041843.973026-5-jhubbard@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220831041843.973026-5-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 Tue, Aug 30, 2022 at 09:18:40PM -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(), for user_backed_iter(i) and iov_iter_bvec(i) > cases. > > 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(). What of ITER_PIPE (splice from O_DIRECT fd to a to pipe, for filesystem that uses generic_file_splice_read())?