Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3286964pxf; Mon, 15 Mar 2021 06:19:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOMoISxOG/akHlpWCFCaWdN6lU9B6aVdvAC/iiJNFL0vVir/CmBS6E5WAEXYM8X9HNR76U X-Received: by 2002:a05:6402:142:: with SMTP id s2mr29804702edu.2.1615814369135; Mon, 15 Mar 2021 06:19:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615814369; cv=none; d=google.com; s=arc-20160816; b=fOfDVXYjlRdZqEBTgsN0OjieeBvJmXozik8dFWE97izXd+OlZcC+j8d3AKE7FzQ+ru 4wygk/9XWxxsD+i0zw/lxLnBqmrN37XParfXJgbeaY7kihqZRYsiJ57F8pfaqYtRTNCE SxzZurLiVCgNRBrjIGxbcyj1qwFJgFrZiWJtiEjsngp3jG/XIbOKP3NaqoMe5ifMvm7q nN4pg31yFm28dKwImljQ8wdghN7lRYtQLSgVLBqCjXjK0D5tVDEIlaMXqzl/apJqIHed elDJzMrgSD1uLGSUrnKbVpdJ3CNSu3dojGqUN7lLOVlFxDGSMT2h+N3WjeW5lC6zeWHo KsyA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=7Jrclnurpg02FW6SBK78iFY06pC4oqxMEZmAxzr40dg=; b=CUa3ikPFMYvLjTVoiPKtEBp1s11VmDXrjy6OCqab2Mtp/4xFF3uE5GGLSiDKf5wM/U xOQad9hPSlphIC/w/rG1OTkr4xU+x4Zx50SgkD42KqWsU0zyLqpExWoy/hrmgVscinRO T178+Ic+nmzz/CUfT6jRphv9I6RDzp12uSy5t8dv0Ncr4dFKtfQFLWOKPAaW4FBzse9v crr5BOUNbyT30pbaP+rp0pEwOwTJHieJhXZK83xCA+tvsEDNWFuAZXVZRbmy6RMBH5rk siJxDnHTgmQ9msAO+ViFN4ZvcgK7kdrIduencJuy1HgcjiqyRF9LIsqY7jcj6Vx4FfgV wlAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=mLAmtzek; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e16si10668297edq.338.2021.03.15.06.19.07; Mon, 15 Mar 2021 06:19:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=mLAmtzek; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229821AbhCONSF (ORCPT + 99 others); Mon, 15 Mar 2021 09:18:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229746AbhCONRz (ORCPT ); Mon, 15 Mar 2021 09:17:55 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32946C06174A; Mon, 15 Mar 2021 06:17:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=7Jrclnurpg02FW6SBK78iFY06pC4oqxMEZmAxzr40dg=; b=mLAmtzek/OysmlUkK2D+l/+ViO P0JQHzdgMfu6NrsqY8zXpk6RTX/5nmNEn7oIDRUqEQM84J8B3lrsZGvkP5HHPKPkl0ZkPlrOGt31T xLmeHPnJjSHqB50gbfaDl7P7BEhGCQo+FHsuI7rB0HWgJzaaV2BLxt752pSmbcJtzi+bcZ+w405PR LUlCDthgLnKXM3rZxlWrYs+w7Fn7g+5hBePLZj+wRC9iUihLEQ2IQwyRZYa6GyFvoC+9pAMFj/oHO jpdlTTW3D7CA4MMjxR5B+DrHb0PQVjhMQ/4QM/do1x1T9WIERqk5XF/F184c6va0yydPKlm5RGM5o 4zjRyPUg==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lLn63-000DJ6-7o; Mon, 15 Mar 2021 13:17:26 +0000 Date: Mon, 15 Mar 2021 13:17:23 +0000 From: Matthew Wilcox To: Miklos Szeredi Cc: David Howells , Alexander Viro , Ian Kent , Linus Torvalds , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH 0/3] vfs: Use an xarray instead of inserted bookmarks to scan mount list Message-ID: <20210315131723.GW2577561@casper.infradead.org> References: <161581005972.2850696.12854461380574304411.stgit@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 15, 2021 at 02:14:35PM +0100, Miklos Szeredi wrote: > On Mon, Mar 15, 2021 at 1:07 PM David Howells wrote: > > > > > > Hi Al, Mikl?s, > > > > Can we consider replacing the "insert cursor" approach we're currently > > using for proc files to scan the current namespace's mount list[1] with > > something that uses an xarray of mounts indexed by mnt_id? > > > > This has some advantages: > > > > (1) It's simpler. We don't need to insert dummy mount objects as > > bookmarks into the mount list and code that's walking the list doesn't > > have to carefully step over them. > > > > (2) We can use the file position to represent the mnt_id and can jump to > > it directly - ie. using seek() to jump to a mount object by its ID. > > What happens if the mount at the current position is removed? xa_find() will move to the next one.