Re: [fuse-devel] [PATCH v5] fuse: Add support for passthrough read/write

2016-03-04 Thread Andrew Karpow
Hi! Thanks for the passthrough patch, exactly what I was searching for. I'am currently trying to port your code to a prehistoric RedHat 6 Kernel, but I wonder about some implementation details... > +++ b/fs/fuse/passthrough.c ... > +void fuse_setup_passthrough(struct fuse_conn *fc, struct

Re: [fuse-devel] [PATCH v5] fuse: Add support for passthrough read/write

2016-03-04 Thread Andrew Karpow
Hi! Thanks for the passthrough patch, exactly what I was searching for. I'am currently trying to port your code to a prehistoric RedHat 6 Kernel, but I wonder about some implementation details... > +++ b/fs/fuse/passthrough.c ... > +void fuse_setup_passthrough(struct fuse_conn *fc, struct

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

2016-02-03 Thread Jann Horn
On Wed, Feb 03, 2016 at 12:16:17PM -0800, Nikhilesh Reddy wrote: > On 02/03/2016 11:53 AM, Jann Horn wrote: > >On Wed, Feb 03, 2016 at 11:05:57AM -0800, Nikhilesh Reddy wrote: > >>Hi > >>Thanks for your review again :) > >>> > >>>Uh... how do you know at this point that the file is actually

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

2016-02-03 Thread Nikhilesh Reddy
On 02/03/2016 11:53 AM, Jann Horn wrote: On Wed, Feb 03, 2016 at 11:05:57AM -0800, Nikhilesh Reddy wrote: Hi Thanks for your review again :) Uh... how do you know at this point that the file is actually writable? Normally, e.g. vfs_write() will ensure that the file is writable, and e.g.

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

2016-02-03 Thread Jann Horn
On Wed, Feb 03, 2016 at 11:05:32AM -0800, Nikhilesh Reddy wrote: > On 02/01/2016 11:45 AM, Jann Horn wrote: > >On Mon, Feb 01, 2016 at 11:28:51AM -0800, Nikhilesh Reddy wrote: > >>On Mon 01 Feb 2016 11:15:56 AM PST, Jann Horn wrote: > >>>On Mon, Feb 01, 2016 at 10:56:27AM -0800, Nikhilesh Reddy

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

2016-02-03 Thread Jann Horn
On Wed, Feb 03, 2016 at 11:05:57AM -0800, Nikhilesh Reddy wrote: > Hi > Thanks for your review again :) > > > >Uh... how do you know at this point that the file is actually writable? > >Normally, e.g. vfs_write() will ensure that the file is writable, and > >e.g. generic_file_write_iter() won't

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

2016-02-03 Thread Nikhilesh Reddy
Hi Thanks for your review again :) Uh... how do you know at this point that the file is actually writable? Normally, e.g. vfs_write() will ensure that the file is writable, and e.g. generic_file_write_iter() won't check for writability as far as I can tell. This might allow someone to use the

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

2016-02-03 Thread Nikhilesh Reddy
On 02/01/2016 11:45 AM, Jann Horn wrote: On Mon, Feb 01, 2016 at 11:28:51AM -0800, Nikhilesh Reddy wrote: On Mon 01 Feb 2016 11:15:56 AM PST, Jann Horn wrote: On Mon, Feb 01, 2016 at 10:56:27AM -0800, Nikhilesh Reddy wrote: diff --git a/fs/fuse/passthrough.c b/fs/fuse/passthrough.c [...]

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

2016-02-03 Thread Jann Horn
On Wed, Feb 03, 2016 at 12:16:17PM -0800, Nikhilesh Reddy wrote: > On 02/03/2016 11:53 AM, Jann Horn wrote: > >On Wed, Feb 03, 2016 at 11:05:57AM -0800, Nikhilesh Reddy wrote: > >>Hi > >>Thanks for your review again :) > >>> > >>>Uh... how do you know at this point that the file is actually

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

2016-02-03 Thread Nikhilesh Reddy
On 02/03/2016 11:53 AM, Jann Horn wrote: On Wed, Feb 03, 2016 at 11:05:57AM -0800, Nikhilesh Reddy wrote: Hi Thanks for your review again :) Uh... how do you know at this point that the file is actually writable? Normally, e.g. vfs_write() will ensure that the file is writable, and e.g.

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

2016-02-03 Thread Jann Horn
On Wed, Feb 03, 2016 at 11:05:57AM -0800, Nikhilesh Reddy wrote: > Hi > Thanks for your review again :) > > > >Uh... how do you know at this point that the file is actually writable? > >Normally, e.g. vfs_write() will ensure that the file is writable, and > >e.g. generic_file_write_iter() won't

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

2016-02-03 Thread Nikhilesh Reddy
On 02/01/2016 11:45 AM, Jann Horn wrote: On Mon, Feb 01, 2016 at 11:28:51AM -0800, Nikhilesh Reddy wrote: On Mon 01 Feb 2016 11:15:56 AM PST, Jann Horn wrote: On Mon, Feb 01, 2016 at 10:56:27AM -0800, Nikhilesh Reddy wrote: diff --git a/fs/fuse/passthrough.c b/fs/fuse/passthrough.c [...]

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

2016-02-03 Thread Nikhilesh Reddy
Hi Thanks for your review again :) Uh... how do you know at this point that the file is actually writable? Normally, e.g. vfs_write() will ensure that the file is writable, and e.g. generic_file_write_iter() won't check for writability as far as I can tell. This might allow someone to use the

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

2016-02-03 Thread Jann Horn
On Wed, Feb 03, 2016 at 11:05:32AM -0800, Nikhilesh Reddy wrote: > On 02/01/2016 11:45 AM, Jann Horn wrote: > >On Mon, Feb 01, 2016 at 11:28:51AM -0800, Nikhilesh Reddy wrote: > >>On Mon 01 Feb 2016 11:15:56 AM PST, Jann Horn wrote: > >>>On Mon, Feb 01, 2016 at 10:56:27AM -0800, Nikhilesh Reddy

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

2016-02-02 Thread Jann Horn
On Mon, Feb 01, 2016 at 10:56:27AM -0800, Nikhilesh Reddy wrote: > Add support for filesystem passthrough read/write of files > when enabled in userspace through the option FUSE_PASSTHROUGH. [...] > diff --git a/fs/fuse/passthrough.c b/fs/fuse/passthrough.c [...] > +static ssize_t

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

2016-02-02 Thread Jann Horn
On Mon, Feb 01, 2016 at 10:56:27AM -0800, Nikhilesh Reddy wrote: > Add support for filesystem passthrough read/write of files > when enabled in userspace through the option FUSE_PASSTHROUGH. [...] > diff --git a/fs/fuse/passthrough.c b/fs/fuse/passthrough.c [...] > +static ssize_t

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

2016-02-01 Thread Jann Horn
On Mon, Feb 01, 2016 at 11:28:51AM -0800, Nikhilesh Reddy wrote: > On Mon 01 Feb 2016 11:15:56 AM PST, Jann Horn wrote: > >On Mon, Feb 01, 2016 at 10:56:27AM -0800, Nikhilesh Reddy wrote: > >>diff --git a/fs/fuse/passthrough.c b/fs/fuse/passthrough.c > >[...] > >>+static ssize_t

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

2016-02-01 Thread Nikhilesh Reddy
On Mon 01 Feb 2016 11:15:56 AM PST, Jann Horn wrote: On Mon, Feb 01, 2016 at 10:56:27AM -0800, Nikhilesh Reddy wrote: diff --git a/fs/fuse/passthrough.c b/fs/fuse/passthrough.c [...] +static ssize_t fuse_passthrough_read_write_iter(struct kiocb *iocb, +

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

2016-02-01 Thread Jann Horn
On Mon, Feb 01, 2016 at 10:56:27AM -0800, Nikhilesh Reddy wrote: > diff --git a/fs/fuse/passthrough.c b/fs/fuse/passthrough.c [...] > +static ssize_t fuse_passthrough_read_write_iter(struct kiocb *iocb, > + struct iov_iter *iter, int do_write) > +{ > +

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

2016-02-01 Thread Nikhilesh Reddy
Add support for filesystem passthrough read/write of files when enabled in userspace through the option FUSE_PASSTHROUGH. There are many FUSE based filesystems that perform checks or enforce policy or perform some kind of decision making in certain functions like the "open" call but simply act as

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

2016-02-01 Thread Jann Horn
On Mon, Feb 01, 2016 at 11:28:51AM -0800, Nikhilesh Reddy wrote: > On Mon 01 Feb 2016 11:15:56 AM PST, Jann Horn wrote: > >On Mon, Feb 01, 2016 at 10:56:27AM -0800, Nikhilesh Reddy wrote: > >>diff --git a/fs/fuse/passthrough.c b/fs/fuse/passthrough.c > >[...] > >>+static ssize_t

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

2016-02-01 Thread Jann Horn
On Mon, Feb 01, 2016 at 10:56:27AM -0800, Nikhilesh Reddy wrote: > diff --git a/fs/fuse/passthrough.c b/fs/fuse/passthrough.c [...] > +static ssize_t fuse_passthrough_read_write_iter(struct kiocb *iocb, > + struct iov_iter *iter, int do_write) > +{ > +

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

2016-02-01 Thread Nikhilesh Reddy
On Mon 01 Feb 2016 11:15:56 AM PST, Jann Horn wrote: On Mon, Feb 01, 2016 at 10:56:27AM -0800, Nikhilesh Reddy wrote: diff --git a/fs/fuse/passthrough.c b/fs/fuse/passthrough.c [...] +static ssize_t fuse_passthrough_read_write_iter(struct kiocb *iocb, +

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

2016-02-01 Thread Nikhilesh Reddy
Add support for filesystem passthrough read/write of files when enabled in userspace through the option FUSE_PASSTHROUGH. There are many FUSE based filesystems that perform checks or enforce policy or perform some kind of decision making in certain functions like the "open" call but simply act as