Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4023743rwb; Tue, 6 Sep 2022 00:58:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR5D3sOeJ03cYNY+TcrRZzYj1s7ggsOgnAmTRD7QmNtswSVEuDUmN3J0Ox5D0Z/u9jdS2CWq X-Received: by 2002:a17:902:eb8e:b0:176:66bf:f350 with SMTP id q14-20020a170902eb8e00b0017666bff350mr20109877plg.111.1662451088227; Tue, 06 Sep 2022 00:58:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662451088; cv=none; d=google.com; s=arc-20160816; b=mvbpr8tyUq4G/X6nlROqJ4I3lyuLxPRE+ZE2THUY5suBUMKNxwKp5PRYkRJv/zCXBk EwsVKQ0/abJhnQxREgEZELfa+B3ADHYVbkzZaZPkLnxN19HNeLCJ768smvlzoZP4UFJu dvxAeGn43I6wFCjeRwY4pzZGb8wNXRQ5DrodIRYe9YgvzNzrJqF0F2TtFSyMm085jjXS RNGaXtAhu8J481qufBh5rg7jyuJLCg6286hvFgaRZ+NRYElFzl/ZRuxL/86vRVOGmINk sUxEI1dP20vDL3wAg5Hc7nIYpsu0AqXnbKlWugrWOrmnrlPakpUUwn6rpmKKFwnXh/+r exBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=//VHbIAzK137JUV3wdYi+bkIg+RFNtTNOapoAnB6JWQ=; b=DBlK6DFTPiV/jBSBxDO8wMRGJfvCqkQPF8sXJWrV+3RGgE7U9tzmh+bjv0G42T4ZT+ 96P0475J3F2ioiXGtDzymRJlQFgjg+Jn9nKh8ZYA0betWo9VcpGETcbFFQ9KaSUbJiJV gd4+9vAlL0BTt0NoTHKrZ7erb/S495CrlJBuuvYaSbpylWvscv3OS0SkcaO2OqY/QGS2 ZJa7NIov0hh2uR0E9qgyMHm4b/mNyLhTVvt+IRu1TODVatGNUb39tkguWdZzbV2/gMtB azsEncF9SGfQqeqzyxJHC61Clo7bkG8VbPmjuslefkbNatzDJfubvX2dYLIrZ69buWHY vB1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=ClmaQqYV; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s8-20020a63f048000000b0042b49305d68si12573832pgj.194.2022.09.06.00.57.55; Tue, 06 Sep 2022 00:58:08 -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=@infradead.org header.s=bombadil.20210309 header.b=ClmaQqYV; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238555AbiIFHs7 (ORCPT + 99 others); Tue, 6 Sep 2022 03:48:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233978AbiIFHs5 (ORCPT ); Tue, 6 Sep 2022 03:48:57 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 222AB5F98C; Tue, 6 Sep 2022 00:48:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=//VHbIAzK137JUV3wdYi+bkIg+RFNtTNOapoAnB6JWQ=; b=ClmaQqYV3Rr7HMvl1VZYIfZnCR jRe7hf3xcMU++YZlWuqWFGV7yOxXgIpw5cfVwrcGrONCrbaLvQbyG3imcg0L5ArK9A2drD7kyElWW nXQKaVxFJrG3tR0Z4U4Px3R7OpWn36TNcpqBIShyq99RxBc7AjqZgGjYsk8t2hNNt06e5WjA8H/ty RyHuTiOQV01VXnapEk24jH+CnWL3HTVChFhLI0VOiL1YDAush7xV3xHWLUNZICcRFCQ+31s25Ab2f NJZGx1AeyvkBlwLScjl7adl9Vy5CQ+Nyntlh4EwdZzr43wsKaXw1wEaH0wDR88TobrWWo+qXS2DCW PiCuP0Rg==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVTKD-00Avjf-6M; Tue, 06 Sep 2022 07:48:49 +0000 Date: Tue, 6 Sep 2022 00:48:49 -0700 From: Christoph Hellwig To: John Hubbard Cc: Christoph Hellwig , Andrew Morton , Jens Axboe , Alexander Viro , Miklos Szeredi , "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> <103fe662-3dc8-35cb-1a68-dda8af95c518@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <103fe662-3dc8-35cb-1a68-dda8af95c518@nvidia.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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, Sep 06, 2022 at 12:44:28AM -0700, John Hubbard wrote: > OK, that part is clear. > > > - for the pin case don't use the existing bvec helper at all, but > > copy the logic for the block layer for not pinning. > > I'm almost, but not quite sure I get the idea above. Overall, what > happens to bvec pages? Leave the get_page() pin in place for FOLL_GET > (or USE_FOLL_GET), I suppose, but do...what, for FOLL_PIN callers? Do not change anyhing for FOLL_GET callers, as they are on the way out anyway. For FOLL_PIN callers, never pin bvec and kvec pages: For file systems not acquiring a reference is obviously safe, and the other callers will need an audit, but I can't think of why it woul ever be unsafe.