Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3356025pxf; Mon, 15 Mar 2021 07:52:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7YDCdBAf/gDk6rUfvEiAi7FFhDBYf9s4rlxSi/uMZHMWvBFC2fmGYcbq7vYQ3ftGLHSff X-Received: by 2002:aa7:c654:: with SMTP id z20mr19252732edr.377.1615819951281; Mon, 15 Mar 2021 07:52:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615819951; cv=none; d=google.com; s=arc-20160816; b=T+eJy6YvoEtvmz8an3ydYpwlyAQpy2CABOXoYcEwaamLeSR/q5AWilqoPLD+llRi8A hZAf0SjJCBxu9hbbieuBpW85y3A/ofTEygkt8l2XXZyCGcH+sN7l13riia6qxoUKqhGx Mui4YCWRBE8gznN/RtNBxw9lhkTWYG5xfgqinRN8T2nnudIZvGHhwTbArn6v8IcdrrCh LN24X0RuZF/6B7m8BFr2xVfqyCet49yeI0sZWnksYT8LfBmlEwBg/J/ExzimcZAwF+dR VBlcnWbeRauZj5ZXxH0X5FPKnmvLz6UkNgzQXiOzEO3MLw0JTrfI6g9gDkazLbL0/aXu lutA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=8GX6YPqUCABnjYLSFPPUAEp9Fl0OXx9Bs7VEy7wBMuA=; b=yFsjWaDHvYZu5vqqLYKTEo3ck68FubW60rMFs2BBcaneVMsvMbhAQQYyPOMfavUo31 B8Av19BkLzBxw1+bTaH1+W07u21HuHHqsqGpkFmgMKLe5K44jaNQCZ5Ie98Nwo166Rsx UQOFbrK7WZEbJYQV0qvS7kq9mq2uzhZHA/s8YlZF/cVJ5BNY+WOfZ3RMEJg2JY0wa95C Iq7inb5CndAfgPtjNlTXxtRs4yRoqrVW959kx0kUmuF31rucjSizz4MdQ7k1SXOeFXr6 ywUMjEFl/iZzdLGtB2q5BOmIdTzz5W6s92k69updYsEBF9Y+1YdLzpJZHK+GawOhubld +6dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=fOFqWfoT; 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 bt16si10348947edb.440.2021.03.15.07.52.09; Mon, 15 Mar 2021 07:52:31 -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=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=fOFqWfoT; 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 S241323AbhCOOst (ORCPT + 99 others); Mon, 15 Mar 2021 10:48:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238250AbhCOOW7 (ORCPT ); Mon, 15 Mar 2021 10:22:59 -0400 Received: from mail-vs1-xe2c.google.com (mail-vs1-xe2c.google.com [IPv6:2607:f8b0:4864:20::e2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA547C06174A for ; Mon, 15 Mar 2021 07:22:58 -0700 (PDT) Received: by mail-vs1-xe2c.google.com with SMTP id d25so16409275vsr.11 for ; Mon, 15 Mar 2021 07:22:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8GX6YPqUCABnjYLSFPPUAEp9Fl0OXx9Bs7VEy7wBMuA=; b=fOFqWfoTqTvWH20gm5Qsm3Zqkw7ZWL185o17OFNTuL4W3gA1hPwHjQL59LgC5oah8r q1HgmHMD0gBAjo358LTDMyZLzbMaYUQe53lp+fEzhAzkqEkTcm+0PBgw2XCL6+hcpOzs foGVwNBMx9Q3nFMcPGcVFVcygEhwDmbybkRwo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8GX6YPqUCABnjYLSFPPUAEp9Fl0OXx9Bs7VEy7wBMuA=; b=gpHRIBEaTZAY2LkVBnDY39zs8SvwjLCEdnLB/2pRy2xXsrtKq0LZrt6g3g8aIOO9bX Rd/RTlAV3rZ5tFL0/B0U0dKXgmpKWtagiMnDQOPfiGSjRmUD2c51wYviw4zh9ysyGje9 mGqPs19wtqGeaDLlEdbVniBhe1FdGHs8tH9sJOvKPlwpZ9NrkLM2BxhYSa6OJar3YB+Z XINGLPA89DUTdo5UaG6hHZAPET4ov8dwZ2YFnoEw1gRcO0JJxwvpcls4SBTx2PtyKPe0 3a29fDLswirQ6aCtdIE/eTk7OPFe/Zuikf86HSgA8yfDb+Bw9myClhl9iLa50dPwwxMS OzaA== X-Gm-Message-State: AOAM531KWIX3L7hiOZ50jMthbZ3/270TmrquXUnhdkwxeYy+Dq8mW4Gx RXVQI6uHKOvdArpWOeB3bTSpX5B9J/v0oEQGrIQvsA== X-Received: by 2002:a67:f7d2:: with SMTP id a18mr10097003vsp.21.1615818177919; Mon, 15 Mar 2021 07:22:57 -0700 (PDT) MIME-Version: 1.0 References: <161581005972.2850696.12854461380574304411.stgit@warthog.procyon.org.uk> <2857440.1615815708@warthog.procyon.org.uk> In-Reply-To: <2857440.1615815708@warthog.procyon.org.uk> From: Miklos Szeredi Date: Mon, 15 Mar 2021 15:22:47 +0100 Message-ID: Subject: Re: [RFC][PATCH 0/3] vfs: Use an xarray instead of inserted bookmarks to scan mount list To: David Howells Cc: Alexander Viro , Matthew Wilcox , Ian Kent , Linus Torvalds , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 15, 2021 at 2:41 PM David Howells wrote: > > Miklos Szeredi wrote: > > > > (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? > > umount_tree() requires the namespace_sem to be writelocked, so that should be > fine as the patches currently read-lock that whilst doing /proc/*/mount* > > I'm assuming that kern_unmount() won't be a problem as it is there to deal > with mounts made by kern_mount() which don't get added to the mount list > (mnt_ns is MNT_NS_INTERNAL). kern_unmount_array() seems to be the same > because overlayfs gives it mounts generated by clone_private_mount(). It > might be worth putting a WARN_ON() in kern_unmount() to require this. > > When reading through proc, m_start() calls xas_find() which returns the entry > at the starting index or, if not present, the next higher entry. This will break the property of new mounts always being added to the end of the list. That's likely a regression for nerural based parsers (i.e. people), probably less so for machine parsers. Thanks, Miklos > > David >