Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7860197rwb; Tue, 6 Dec 2022 10:43:59 -0800 (PST) X-Google-Smtp-Source: AA0mqf4Jw8fISRas7w/Zc0vHW2IGimg3KlzCQ2GysvoxM7uYQghe5mB5psJL+4M1Tk11NAq2BT6G X-Received: by 2002:aa7:cd8d:0:b0:463:19ca:a573 with SMTP id x13-20020aa7cd8d000000b0046319caa573mr77791634edv.31.1670352239264; Tue, 06 Dec 2022 10:43:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670352239; cv=none; d=google.com; s=arc-20160816; b=vgvjEXy8mvNLtDUhUu4YuDRujGovXoP/hr3iSXBhqo8O7CC02jo4ckyCaEn56chTQz BKRMXczN4qngpcGIGWvrP5mtHWbyYMz7p30tQi+VqcOWNN6QSL089M2OjOGo/ZqdTWX+ KOrVm5bxTGQ0mdvQYNub0+hOSUwtfgH5EK8AqiT2/xw3KF1JmK7zM3LrxtnlDOIgI4vh 8O6eJwfWRw4k++WWrqhpInYjQNnCn4a0LvBNngRyvwmetrNCR/6HwSyUNIQdQe7ksqox WGGwg90E7sT5tDxCkX2BUjPPLh7SPuzHXTzexqx1wH34SUsBAKpmqRIBn6M27eDLS1Qu ACtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=BPCIfnbDBpjs4efIHZ8WUm5LDTwrZwzaxy+bAhXeEOE=; b=HAHXF/W5v2Bf0QYCHy98OmG7Z0+qjHzx7t36sYUJwDNyfuZXbdF6fRF08QIAscVGCL Dkd1xguDnQdUn2yTN3azLRHklknrxGQR+yVvDEaoiPClBse5Dm7eE2kPx7Wi7qjlQwGa S05qkBcDuq37dpmJJN9/N9SzZvouHmNk17HkD/8j/iC+OUfdv3jOXyd1DjLaEkNQnyOM 0Gg7t3kQM83OYeqKXYlbweqnDoTxCynK4/LCcX345QP+2u/Cvt4Y5Fw2T7Od3CVeiX5u eIJvLbeSGPDqeYWQLxn7Ef6IRWWSm3XJ0cxpEPCt1LxGawQ5fzu5xaoALT7dXK8yr9MH uKoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=I2LbWWpr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r5-20020a056402018500b004617e8811c4si2254932edv.28.2022.12.06.10.43.40; Tue, 06 Dec 2022 10:43:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=@redhat.com header.s=mimecast20190719 header.b=I2LbWWpr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229679AbiLFShF (ORCPT + 77 others); Tue, 6 Dec 2022 13:37:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229730AbiLFSgq (ORCPT ); Tue, 6 Dec 2022 13:36:46 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9A0ABE8 for ; Tue, 6 Dec 2022 10:35:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670351748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BPCIfnbDBpjs4efIHZ8WUm5LDTwrZwzaxy+bAhXeEOE=; b=I2LbWWpr1yHkuEqrFp1cMXZmGETTJ74FWRXg/UAp+53rhZNNFVd9uUv0fCFErg4kmPWQ2P 93iDZ8mF+1Ijo2RyYNwe5ZfQlMIpY25FvRxDWJ5kBkok0thv/+xahDa5PxsROEzwF1bPr8 CWe/jx80WL31lxB7LQucFiiNbnhkTwQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-475-RMqL0D19PX-y6CNUMWUZug-1; Tue, 06 Dec 2022 13:35:42 -0500 X-MC-Unique: RMqL0D19PX-y6CNUMWUZug-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0EB94811E75; Tue, 6 Dec 2022 18:35:42 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9D27A492B04; Tue, 6 Dec 2022 18:35:40 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <0d62615c-57d1-922b-5ebc-32faabf33327@deltatee.com> References: <0d62615c-57d1-922b-5ebc-32faabf33327@deltatee.com> <166997419665.9475.15014699817597102032.stgit@warthog.procyon.org.uk> <166997421646.9475.14837976344157464997.stgit@warthog.procyon.org.uk> To: Logan Gunthorpe Cc: dhowells@redhat.com, Al Viro , Christoph Hellwig , John Hubbard , Matthew Wilcox , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Christoph Hellwig , Jeff Layton , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/4] iov_iter: Add a function to extract a page list from an iterator MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1251302.1670351737.1@warthog.procyon.org.uk> Date: Tue, 06 Dec 2022 18:35:37 +0000 Message-ID: <1251303.1670351737@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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-kernel@vger.kernel.org Logan Gunthorpe wrote: > If this is going to be a general replacement for iov_iter_get_pages() > it's going to need to pass through gup_flags. My recent patchset added > versions with these and I think it should be in during the next merge > cycle. [1] Cool. Note that the current iov_iter_get_pages2() is broken, which is why Al wanted a replacement. It should not be taking a ref on the pages in an XARRAY, BVEC or PIPE - and it should be pinning rather than getting a ref on pages in IOVEC or UBUF if the buffer is being read into. I'm guessing that your changes move the latter decision to the caller? David