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

2020-09-11 Thread Alessio Balsini
Thanks all for the comments. I have a patchset ready that hopefully wraps together the extendability suggested by Nikolaus, that I agree is a good idea. The way I tried to make it more flexible is first of all transitioning to a ioctl(), as suggested by both Jann and Miklos, and by using a data

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

2020-09-08 Thread Alessio Balsini
Thanks Jann, Sorry for the late reply, I wanted to better understand the problems you mentioned and explore the ioctl solution before coming back to discussion. I have a new patch ready which addresses the feedbacks received, and that has been converted to using a new ioctl. And I have to say I'm

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

2020-08-24 Thread Miklos Szeredi
On Wed, Aug 19, 2020 at 11:25 AM Amir Goldstein wrote: > > 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

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

2020-08-19 Thread Jann Horn
On Tue, Aug 18, 2020 at 3:53 PM Alessio Balsini wrote: > Thank you both for the important feedback, > > I tried to consolidate all your suggestions in the new version of the > patch, shared below. > > As you both recommended, that tricky ki_filp swapping has been removed, > taking overlayfs as a

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

2020-08-19 Thread Amir Goldstein
On Wed, Aug 19, 2020 at 9:03 AM Nikolaus Rath 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.

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

2020-08-19 Thread Nikolaus Rath
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

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

2020-08-18 Thread Alessio Balsini
Thank you both for the important feedback, I tried to consolidate all your suggestions in the new version of the patch, shared below. As you both recommended, that tricky ki_filp swapping has been removed, taking overlayfs as a reference for the management of asynchronous requests. The V7 below

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

2020-08-13 Thread Jens Axboe
On 8/12/20 12:29 PM, Jann Horn wrote: >> + passthrough_inode = file_inode(passthrough_filp); >> + >> + iocb->ki_filp = passthrough_filp; > > Hmm... so we're temporarily switching out the iocb's ->ki_filp here? I > wonder whether it is possible for some other code to look at ->ki_filp

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

2020-08-13 Thread Jann Horn
On Thu, Aug 13, 2020 at 3:28 PM Alessio Balsini wrote: > On Wed, Aug 12, 2020 at 08:29:58PM +0200, 'Jann Horn' via kernel-team wrote: [...] > > On Wed, Aug 12, 2020 at 6:15 PM Alessio Balsini wrote: > > > Add support for filesystem passthrough read/write of files when enabled in > > > userspace

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

2020-08-13 Thread Alessio Balsini
Hi Jann, Thank you for looking into this. On Wed, Aug 12, 2020 at 08:29:58PM +0200, 'Jann Horn' via kernel-team wrote: > [+Jens: can you have a look at that ->ki_filp switcheroo in > fuse_passthrough_read_write_iter() and help figure out whether that's > fine? This seems like your area of

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

2020-08-12 Thread Jann Horn
[+Jens: can you have a look at that ->ki_filp switcheroo in fuse_passthrough_read_write_iter() and help figure out whether that's fine? This seems like your area of expertise.] On Wed, Aug 12, 2020 at 6:15 PM Alessio Balsini wrote: > Add support for filesystem passthrough read/write of files

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

2020-08-12 Thread Alessio Balsini
Add support for filesystem passthrough read/write of files when enabled in userspace through the option FUSE_PASSTHROUGH. There are filesystems based on FUSE that are intended to enforce special policies or trigger complicate decision makings at the file operations level. Android, for example,