Re: [PATCH v9 3/6] liveupdate: add LUO_SESSION_MAGIC magic inode type
From: Christian Brauner
Date: Wed Apr 22 2026 - 07:59:27 EST
On Mon, Apr 20, 2026 at 03:15:11PM +0100, luca.boccassi@xxxxxxxxx wrote:
> From: Luca Boccassi <luca.boccassi@xxxxxxxxx>
>
> In userspace when managing LUO sessions we want to be able to identify
> a FD as a LUO session, in order to be able to do the special handling
> that they require in order to function as intended on kexec.
>
> Currently this requires scraping procfs and doing string matching on
> the prefix of the dname, which is not an ideal interface.
>
> Add a singleton inode type with a magic value, so that we can
> programmatically identify a fd as a LUO session via fstatfs().
>
> Signed-off-by: Luca Boccassi <luca.boccassi@xxxxxxxxx>
> Reviewed-by: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx>
> ---
Fold the following diff [1] into this commit (and the test), please.
Btw, I see that currently you only allow to retrieve one file per
session. If you ever want to allow multiple files for a session
but single shared inode amongst the same session so that different files
for the same session still compare as identical I added a mechanism
called path_from_stashed() which would easily allow for this. The luo
session just needs to stash a dentry pointer to achieve this. Just a
heads-up.
[1]: