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 2B246C3A5A7 for ; Tue, 6 Dec 2022 18:37:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229603AbiLFShF (ORCPT ); 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 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