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 X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF6D2C43460 for ; Fri, 9 Apr 2021 01:24:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 273EA610F7 for ; Fri, 9 Apr 2021 01:24:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 273EA610F7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=zeniv.linux.org.uk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8B7286B006E; Thu, 8 Apr 2021 21:24:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 865D46B0070; Thu, 8 Apr 2021 21:24:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 77C8D6B0071; Thu, 8 Apr 2021 21:24:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0245.hostedemail.com [216.40.44.245]) by kanga.kvack.org (Postfix) with ESMTP id 5D02A6B006E for ; Thu, 8 Apr 2021 21:24:47 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 236261822BC40 for ; Fri, 9 Apr 2021 01:24:47 +0000 (UTC) X-FDA: 78011084214.04.CAF0EA2 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [142.44.231.140]) by imf09.hostedemail.com (Postfix) with ESMTP id C102A600010F for ; Fri, 9 Apr 2021 01:24:42 +0000 (UTC) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94 #2 (Red Hat Linux)) id 1lUfsw-003sCi-JE; Fri, 09 Apr 2021 01:24:34 +0000 Date: Fri, 9 Apr 2021 01:24:34 +0000 From: Al Viro To: David Howells Cc: linux-fsdevel@vger.kernel.org, "Matthew Wilcox (Oracle)" , Christoph Hellwig , linux-mm@kvack.org, linux-cachefs@redhat.com, linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, Trond Myklebust , Anna Schumaker , Steve French , Dominique Martinet , Jeff Layton , David Wysochanski , linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 01/30] iov_iter: Add ITER_XARRAY Message-ID: References: <161789062190.6155.12711584466338493050.stgit@warthog.procyon.org.uk> <161789064740.6155.11932541175173658065.stgit@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <161789064740.6155.11932541175173658065.stgit@warthog.procyon.org.uk> X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: C102A600010F X-Stat-Signature: joeg9t8pqebyufgosnqb4tmpbbe3aqay Received-SPF: none (ftp.linux.org.uk>: No applicable sender policy available) receiver=imf09; identity=mailfrom; envelope-from=""; helo=zeniv-ca.linux.org.uk; client-ip=142.44.231.140 X-HE-DKIM-Result: none/none X-HE-Tag: 1617931482-167290 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Apr 08, 2021 at 03:04:07PM +0100, David Howells wrote: > Add an iterator, ITER_XARRAY, that walks through a set of pages attached to > an xarray, starting at a given page and offset and walking for the > specified amount of bytes. The iterator supports transparent huge pages. > > The iterate_xarray() macro calls the helper function with rcu_access() > helped. I think that this is only a problem for iov_iter_for_each_range() > - and that returns an error for ITER_XARRAY (also, this function does not > appear to be called). Unused since lustre had gone away. > +#define iterate_all_kinds(i, n, v, I, B, K, X) { \ Do you have any users that would pass different B and X? > @@ -1440,7 +1665,7 @@ ssize_t iov_iter_get_pages_alloc(struct iov_iter *i, > return v.bv_len; > }),({ > return -EFAULT; > - }) > + }), 0 Correction - users that might get that flavour. This one explicitly checks for xarray and doesn't get to iterate_... in that case.