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_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 BD769C433B4 for ; Mon, 26 Apr 2021 19:53:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1F4076135B for ; Mon, 26 Apr 2021 19:53:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F4076135B 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 44AE26B0036; Mon, 26 Apr 2021 15:53:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3FABD6B006E; Mon, 26 Apr 2021 15:53:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2C1F26B0070; Mon, 26 Apr 2021 15:53:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0172.hostedemail.com [216.40.44.172]) by kanga.kvack.org (Postfix) with ESMTP id 100496B0036 for ; Mon, 26 Apr 2021 15:53:24 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id B86A8180AD83B for ; Mon, 26 Apr 2021 19:53:23 +0000 (UTC) X-FDA: 78075567486.19.48243B3 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [142.44.231.140]) by imf25.hostedemail.com (Postfix) with ESMTP id EFD7D600010A for ; Mon, 26 Apr 2021 19:53:18 +0000 (UTC) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94 #2 (Red Hat Linux)) id 1lb7Hl-008TqF-IE; Mon, 26 Apr 2021 19:52:49 +0000 Date: Mon, 26 Apr 2021 19:52:49 +0000 From: Al Viro To: David Howells Cc: linux-fsdevel@vger.kernel.org, Dave Wysochanski , Marc Dionne , "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 , linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 01/31] iov_iter: Add ITER_XARRAY Message-ID: References: <161918446704.3145707.14418606303992174310.stgit@warthog.procyon.org.uk> <161918448151.3145707.11541538916600921083.stgit@warthog.procyon.org.uk> <3651951.1619465011@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3651951.1619465011@warthog.procyon.org.uk> X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: EFD7D600010A X-Stat-Signature: bzeyruu1mpbwoy9tbuw1iodmwyj71hrx Received-SPF: none (ftp.linux.org.uk>: No applicable sender policy available) receiver=imf25; 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: 1619466798-898397 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000147, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Apr 26, 2021 at 08:23:31PM +0100, David Howells wrote: > I really need to defer this question to Willy, but as I understand it, > xas_retry() only restarts the current iteration. Referring to the comment on > xas_reset(): > > * Resets the error or walk state of the @xas so future walks of the > * array will start from the root. Use this if you have dropped the > * xarray lock and want to reuse the xa_state. > > I think that the walk returns to the bottom of the tree and whilst xarray > presents an interface that appears to be a contiguous array, it's actually a > tree internally - and 'root' is the root of the tree, not the head of the > array. > > Basically, I think it throws away its cached iteration state - which might > have been modified - and rewalks the tree to get back to the same index. >From RTFS(lib/xarray.c) that looks right. Nevermind the question, then... Anyway, Reviewed-by: Al Viro on the xarray-related bits (this patch + followups)