Re: [PATCH v6] fuse: Add support for passthrough read/write

From: Amir Goldstein
Date: Wed Aug 19 2020 - 05:25:18 EST


On Wed, Aug 19, 2020 at 9:03 AM Nikolaus Rath <Nikolaus@xxxxxxxx> wrote:
>
> Hi Alessio,
>
> Thank you for working on this, I'm excited to see things moving again on
> this front!
>
> What I would really like to see in the long-term is the ability for FUSE
> to support passthrough for specific areas of a file, i.e. the ability to
> specify different passthrough fds for different regions of the FUSE
> file.
>
> I do not want to ask you to extend the patch, but I am a little worried
> that the proposed interface would make a future extension more
> complicated than necessary. Could you comment on that? Is there a way to
> design the libfuse interface in a way that would - in the future - make
> it easier to extend it along these lines?
>
> What I have in mind is things like not coupling the setup of the
> passthrough fds to open(), but having a separate notification message for
> this (like what we use for invalidation of cache), and adding not just
> an "fd" field but also "offset" and "length" fields (which would
> currently be required to be both zero to get the "full file" semantics).
>

You mean like this?

https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git/commit/?h=fuse2

I cannot blame Alessio for missing this POC patch by Miklos.
It was well hidden in another thread:
https://lore.kernel.org/linux-fsdevel/CAJfpegtjEoE7H8tayLaQHG9fRSBiVuaspnmPr2oQiOZXVB1+7g@xxxxxxxxxxxxxx/

Thanks,
Amir.