linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Abel Wu <wuyun.abel@bytedance.com>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Christian Brauner <brauner@kernel.org>,
	Linux API <linux-api@vger.kernel.org>,
	linux-man <linux-man@vger.kernel.org>,
	David Howells <dhowells@redhat.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <christian@brauner.io>,
	lsf-pc <lsf-pc@lists.linux-foundation.org>
Subject: Re: [LSF/MM TOPIC] fsinfo and mount namespace notifications
Date: Wed, 19 Apr 2023 10:43:35 +0200	[thread overview]
Message-ID: <CAJfpegv9=FKb=hUWOMb0-X_7yP8x8qfeCUvm9VTSpg5SCWAOng@mail.gmail.com> (raw)
In-Reply-To: <CAOQ4uxgzJTg61UOnYQOWggPUX9347gJRafUmQTd=rxxFMEdzrg@mail.gmail.com>

On Wed, 19 Apr 2023 at 10:18, Amir Goldstein <amir73il@gmail.com> wrote:
>
> On Tue, Apr 18, 2023 at 9:57 PM Miklos Szeredi <miklos@szeredi.hu> wrote:
> >
> > On Tue, 18 Apr 2023 at 17:57, Amir Goldstein <amir73il@gmail.com> wrote:
> > >
> > > On Tue, Apr 18, 2023 at 11:54 AM Miklos Szeredi <miklos@szeredi.hu> wrote:
> >
> > > > - mount ID's do not uniquely identify a mount across time
> > > >   o when a mount is deleted, the ID can be immediately reused
> > > >
> > > > The following are the minimal requirements needed to fix the above issues:
> > > >
> > > > 1) create a new ID for each mount that is unique across time; lets
> > > > call this umntid
> > > >
> > >
> > > Do you reckon we just stop recycling mntid?
> > > Do we also need to make it 64bit?
> > > statx() has already allocated 64bit for stx_mnt_id.
> > > In that case, should name_to_handle_at() return a truncated mnt_id?
> >
> > I'm not sure it's realistic to implement the new 64bit ID such that
> > the truncated value retains the properties of the previous mount ID
> > implementation.
> >
> > I think the only sane option is to leave the old mnt_id alone and add
> > a new 64bit one that is assigned from an atomic counter at allocation
> > and looked up using a hash table.
> >
>
> At the risk of shoehorning, that sounds a bit like file_handle of a mount.
> Meaning that it could be the result of
>
> name_to_handle_at(...,&mount_handle, &mount_id, AT_MNTID)
>
> We can possibly use open_by_handle_at() to get a mountfd from
> mount_handle - not sure if that makes sesnse.
>

There are conceptual similarities, yes.  Whether reusing the file
handle interfaces makes sense or not is another question.


> [...]
>
> > > > 3) allow querying mount parameters via umntid
>
> I forgot to mention in the context of this topic, that there was a
> topic proposal
> about using "BFP iterator" [1] to query fs/mount info.
>
> I don't know if that can be used to get namespace change notifications
> or if it meets other requirements (i.e. permissions), but wanted to
> mention it here.
>
> I think we can discuss both topics in the same session.

Okay.

Thanks,
Miklos

      reply	other threads:[~2023-04-19  8:43 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03 12:23 [RFC PATCH] getting misc stats/attributes via xattr API Miklos Szeredi
2022-05-03 14:39 ` Amir Goldstein
2022-05-03 14:53   ` Greg KH
2022-05-03 15:04     ` Miklos Szeredi
2022-05-03 15:14       ` Amir Goldstein
2022-05-03 16:54       ` Greg KH
2022-05-03 22:43 ` Dave Chinner
2022-05-04  7:18   ` Miklos Szeredi
2022-05-04 14:22     ` Amir Goldstein
2022-05-05 12:30 ` Karel Zak
2022-05-05 13:59   ` Miklos Szeredi
2022-05-05 23:38 ` tytso
2022-05-06  0:06   ` Amir Goldstein
2022-05-07  0:32   ` Dave Chinner
2022-05-09 12:48 ` Christian Brauner
2022-05-09 14:20   ` Amir Goldstein
2022-05-09 15:08     ` Christian Brauner
2022-05-09 17:07       ` Amir Goldstein
2022-05-09 21:42       ` Vivek Goyal
2022-05-10  3:34         ` Ian Kent
2022-05-10  0:55   ` Dave Chinner
2022-05-10 12:40     ` Christian Brauner
2022-05-11  0:42       ` Dave Chinner
2022-05-11  9:16         ` Christian Brauner
2022-05-10 12:45     ` Florian Weimer
2022-05-10 23:04       ` Dave Chinner
2022-05-10  3:49   ` Miklos Szeredi
2022-05-10  4:27     ` Ian Kent
2022-05-10  8:06       ` Miklos Szeredi
2022-05-10  8:07         ` Miklos Szeredi
2022-05-10 11:53     ` Christian Brauner
2022-05-10 13:15       ` Miklos Szeredi
2022-05-10 13:18         ` Miklos Szeredi
2022-05-10 14:19         ` Christian Brauner
2022-05-10 14:41           ` Miklos Szeredi
2022-05-10 15:30             ` Christian Brauner
2022-05-10 15:47               ` Miklos Szeredi
2022-05-10 15:53                 ` Christian Brauner
2022-05-10 12:35   ` Karel Zak
2022-05-10 23:25     ` Dave Chinner
2022-05-11  8:58       ` Karel Zak
2022-11-14  9:00 ` Abel Wu
2022-11-14 12:35   ` Miklos Szeredi
2022-11-15  3:39     ` Abel Wu
2023-04-15 11:06     ` [LSF/MM TOPIC] fsinfo and mount namespace notifications Amir Goldstein
2023-04-18  8:54       ` Miklos Szeredi
2023-04-18 15:56         ` Amir Goldstein
2023-04-18 18:57           ` Miklos Szeredi
2023-04-19  8:18             ` Amir Goldstein
2023-04-19  8:43               ` Miklos Szeredi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJfpegv9=FKb=hUWOMb0-X_7yP8x8qfeCUvm9VTSpg5SCWAOng@mail.gmail.com' \
    --to=miklos@szeredi.hu \
    --cc=amir73il@gmail.com \
    --cc=brauner@kernel.org \
    --cc=christian@brauner.io \
    --cc=dhowells@redhat.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=wuyun.abel@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).