Re: [PATCH v3 0/3] fuse: Expose more information of fuse backing files to userspace

From: Miklos Szeredi
Date: Fri May 09 2025 - 09:21:35 EST


On Fri, 9 May 2025 at 09:36, Amir Goldstein <amir73il@xxxxxxxxx> wrote:

> This is not the case with displaying conn, because lsof is not designed
> to list fuse conn.
>
> Is there a way for userspace to get from conn to fuse server pid?

Define "server pid".

One such definition would be

"A fuse server is a process that has an open file descriptor
referring to a /dev/fuse instance."

This definition allows a mapping between tasks and fuse connections to
be established. Note that this is not a 1:1 mapping. Multiple
processes could have the same fuse fd (or a clone) open and one
process could have multiple different connections associated with it.

This might be sufficient for lsof if it can find out the connection
number from the fd. E.g. adding "fuse_connection: N" to fdinfo would
work, I think.

Thanks,
Miklos