Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Unverified Commit 98d2b430 authored by Miklos Szeredi's avatar Miklos Szeredi Committed by Christian Brauner
Browse files

add unique mount ID


If a mount is released then its mnt_id can immediately be reused.  This is
bad news for user interfaces that want to uniquely identify a mount.

Implementing a unique mount ID is trivial (use a 64bit counter).
Unfortunately userspace assumes 32bit size and would overflow after the
counter reaches 2^32.

Introduce a new 64bit ID alongside the old one.  Initialize the counter to
2^32, this guarantees that the old and new IDs are never mixed up.

Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
Link: https://lore.kernel.org/r/20231025140205.3586473-2-mszeredi@redhat.com


Reviewed-by: default avatarIan Kent <raven@themaw.net>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent b85ea95d
Branches
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment