Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3286076pxf; Mon, 15 Mar 2021 06:18:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwsrwGVKLUp+jibb1jE7TcIRqDY2PJ4d1yeD6dgEV+NP6uvSMEntWfiSC4Uz2BjnVhSKnI X-Received: by 2002:a17:906:c414:: with SMTP id u20mr23312598ejz.215.1615814298831; Mon, 15 Mar 2021 06:18:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615814298; cv=none; d=google.com; s=arc-20160816; b=xQFXK82LpA4hpjPAK92VBFwXevuH/CrSCJhujc5tL4eM9VbSwYLOm28a4+gyJoHsUN cXzl8St1pH1uWyRVollSCFEGUSwmzKc/MZIXFeFOjV5zCLa+udD4qaAayWnD54wEavOz guFJ9WD4BhfVTDmePJPKhbb6mPxDMh+E7YZBiHC9auHDNgKgJ+AGax2QJG71xadVdHuF t9mqesUuEeod1nMOAU+WSA9/vgSH8Oibtn7equTGAjemMUNhHuA5Zcq4Sor1l64wQEtE qLo84TlIdeP3AecgbwoZKljd7Pp/BMIhD18bSU5c26Hxx7CY8Fh56Z+n2bL5CQiBN3gq ckQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=IpQmsQmwP07n7XM/oRApl7doOzXfiJ6Bu1zNbhk/39k=; b=jW12eOVl4i2+a31Ix0F9XEsZB50cZA+5AJZlghQmHmqBY2nfVH5BCkrLMMo8E7aqgN CUWgmeEu5ENMHxwWlz/uhT64EqYpIHIWDYMcXkvxMd7u09ql2c9RbnyjJE5NpwmZWXFW tA3H+Z4a89PE3bKHFJWSCCa7WpM+Ofg6xbMQfYJcwC1xurCqNWtnKEhFWLOgiS1VAdFX J/cW89WakLP2WpeUVEjWENBnPoxMsd5N2mgZoh8XhtyFp6a3tbjQ4DU287Bn+xPJVBsg w3tyzhZBJsH0y/KMkXU+YtxpEvvgLqRG4SHcDmeqqJYN6VuPebKy9TDd4W6tDY3ZR15I /9Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=mgoOqqUJ; 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 j2si10584589ejv.381.2021.03.15.06.17.56; Mon, 15 Mar 2021 06:18:18 -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=mgoOqqUJ; 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 S230009AbhCONOz (ORCPT + 99 others); Mon, 15 Mar 2021 09:14:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229956AbhCONOr (ORCPT ); Mon, 15 Mar 2021 09:14:47 -0400 Received: from mail-vs1-xe36.google.com (mail-vs1-xe36.google.com [IPv6:2607:f8b0:4864:20::e36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE222C06175F for ; Mon, 15 Mar 2021 06:14:46 -0700 (PDT) Received: by mail-vs1-xe36.google.com with SMTP id z65so16267266vsz.12 for ; Mon, 15 Mar 2021 06:14:46 -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:content-transfer-encoding; bh=IpQmsQmwP07n7XM/oRApl7doOzXfiJ6Bu1zNbhk/39k=; b=mgoOqqUJ7y0PsiCNRiWoJuVBzC0v2z8pc64OFxFninFmUPhNBhvvciEbJlBKl9tNBE N+l3LwDvPMb3AxLnlxBobNbDLTqoDgYlYwcr3ADHXEVnM9wwvo2Ptq3wM04VUokreVZo /rKrP/5E2NQs5y+OBT5XHIUCogGhRVILidOC0= 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:content-transfer-encoding; bh=IpQmsQmwP07n7XM/oRApl7doOzXfiJ6Bu1zNbhk/39k=; b=Ht6W3uM5FFeERjFDxVpmRSU82XgD9rUGyK060ZajBhvie61zGvbXI4OBCi1KI7WUyt d1Pkc6MefSEW/TQE/Uo6rCwgJ53jblmEDFmWBosLdLcpzAmFZhq+7gBzph2KNZDoRlzk OCnb51b8Zj5JvXKZE7B/PuHojsPJxbGC1k5Ydji/zIwvT3Ot6nm8eJFlXjLwoZkb1qlG i2FJOVDXIiFcHn/G6m2ddW3aN6MWOjsrS4PeClsE5bWktOXUh/cwGar0KFKW/5c0cJyl iENcVm8wmNJvh0JuJ/xg2sJb7MaflvIqUtNlkGbQYfg7waZkU2FVa3HBwoEEpjqVqOgU mGsw== X-Gm-Message-State: AOAM531O+m60BpXAXtdpmVO5ekm0+Jbfx0hDyG0Tt+/yl1A/nBJMLHFl kAKzJ02xvYsZ0Q9/dOtbb9Yai9kREqSzQH/3xDAKpg== X-Received: by 2002:a67:8793:: with SMTP id j141mr5072390vsd.7.1615814086066; Mon, 15 Mar 2021 06:14:46 -0700 (PDT) MIME-Version: 1.0 References: <161581005972.2850696.12854461380574304411.stgit@warthog.procyon.org.uk> In-Reply-To: <161581005972.2850696.12854461380574304411.stgit@warthog.procyon.org.uk> From: Miklos Szeredi Date: Mon, 15 Mar 2021 14:14:35 +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" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 15, 2021 at 1:07 PM David Howells wrote: > > > Hi Al, Mikl=C3=B3s, > > 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? Thanks, Miklos