Re: [PATCH 04/28] fuse: adapt FUSE_DEV_IOC_BACKING_{OPEN,CLOSE} to add new iomap devices

Miklos Szeredi
2025-09-19T07:14:05Z

On Thu, 18 Sept 2025 at 20:42, Amir Goldstein <amir73il@gmail.com> wrote:
>
> On Thu, Sep 18, 2025 at 8:17 PM Darrick J. Wong <djwong@kernel.org> wrote:

> > How about restricting the backing ids to RLIMIT_NOFILE? The @end param
> > to idr_alloc_cyclic constrains them in exactly that way.
>
> IDK. My impression was that Miklos didn't like having a large number
> of unaccounted files, but it's up to him.

There's no 1:1 mapping between a fuse instance and a "fuse server
process", so the question is whose RLIMIT_NOFILE? Accounting to the
process that registered the fd would be good, but implementing it
looks exceedingly complex. Just taking RLIMIT_NOFILE value from the
process that is doing the fd registering should work, I guess.

There's still the question of unhiding these files. Latest discussion
ended with lets create a proper directory tree for open files in proc.
I.e. /proc/PID/fdtree/FD/hidden/...

Thanks,
Miklos