On Fri, 19 May 2023 at 14:57, Amir Goldstein <amir73il@xxxxxxxxx> wrote: > > WIP > > Add an ioctl to associate a FUSE server open fd with a request. > A later response to this request get use the FOPEN_PASSTHROUGH flag > to request passthrough to the associated backing file. > > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx> > --- > > Miklos, > > After implementing refcounted backing files, I started to think how > to limit the server from mapping too many files. > > I wanted to limit the backing files mappings to the number of open fuse > files to simplify backing files accounting (i.e. open files are > effectively accounted to clients). > > It occured to me that creatig a 1-to-1 mapping between fuse files and > backing file ids is quite futile if there is no need to manage 1-to-many > backing file mappings. > > If only 1-to-1 mapping is desired, the proposed ioctl associates a > backing file with a pending request. The backing file will be kept > open for as long the request lives, or until its refcount is handed > over to the client, which can then use it to setup passthough to the > backing file without the intermediate idr array. I think I understand what the patch does, but what I don't understand is how this is going to solve the resource accounting problem. Can you elaborate? Thanks, Miklos