Re: [PATCH RESEND V12 8/8] fuse: Introduce passthrough for mmap

2021-04-01 Thread Alessio Balsini
On Wed, Feb 17, 2021 at 03:05:07PM +0100, Miklos Szeredi wrote: > On Mon, Jan 25, 2021 at 4:31 PM Alessio Balsini wrote: > > > > Enabling FUSE passthrough for mmap-ed operations not only affects > > performance, but has also been shown as mandatory for the correct &g

Re: [PATCH RESEND V12 1/8] fs: Generic function to convert iocb to rw flags

2021-03-24 Thread Alessio Balsini
On Wed, Mar 24, 2021 at 03:43:12PM +0800, Rokudo Yan wrote: > On 1/26/21 12:46 AM, Alessio Balsini wrote: > > On Mon, Jan 25, 2021 at 03:30:50PM +, Alessio Balsini wrote: > > > OverlayFS implements its own function to translate iocb flags into rw > > > flags,

Re: [PATCH RESEND V12 2/8] fuse: 32-bit user space ioctl compat for fuse device

2021-03-19 Thread Alessio Balsini
On Thu, Mar 18, 2021 at 10:15:43PM +0100, Arnd Bergmann wrote: > On Thu, Mar 18, 2021 at 5:13 PM Alessio Balsini wrote: > > On Tue, Mar 16, 2021 at 07:53:06PM +0100, Arnd Bergmann wrote: > > > On Mon, Jan 25, 2021 at 4:48 PM Alessio Balsini > > > wrote: > >

[PATCH] fs/fuse: Fix matching of FUSE_DEV_IOC_CLONE command

2021-03-19 Thread Alessio Balsini
Bergmann Signed-off-by: Alessio Balsini --- fs/fuse/dev.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index c0fee830a34e..a5ceccc5ef00 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -2233,11 +2233,8 @@ static long fuse_dev_ioctl(struct file

Re: [PATCH RESEND V12 2/8] fuse: 32-bit user space ioctl compat for fuse device

2021-03-18 Thread Alessio Balsini
On Tue, Mar 16, 2021 at 07:53:06PM +0100, Arnd Bergmann wrote: > On Mon, Jan 25, 2021 at 4:48 PM Alessio Balsini wrote: > > > > With a 64-bit kernel build the FUSE device cannot handle ioctl requests > > coming from 32-bit user space. > > This is due to th

Re: [PATCH RESEND V12 3/8] fuse: Definitions and ioctl for passthrough

2021-03-01 Thread Alessio Balsini
On Fri, Feb 19, 2021 at 09:40:21AM +0100, Miklos Szeredi wrote: > On Fri, Feb 19, 2021 at 8:05 AM Peng Tao wrote: > > > > On Wed, Feb 17, 2021 at 9:41 PM Miklos Szeredi wrote: > > > > What I think would be useful is to have an explicit > > > FUSE_DEV_IOC_PASSTHROUGH_CLOSE ioctl, that would need

Re: [PATCH RESEND V12 2/8] fuse: 32-bit user space ioctl compat for fuse device

2021-03-01 Thread Alessio Balsini
On Wed, Feb 17, 2021 at 11:21:04AM +0100, Miklos Szeredi wrote: > On Mon, Jan 25, 2021 at 4:31 PM Alessio Balsini wrote: > > > > With a 64-bit kernel build the FUSE device cannot handle ioctl requests > > coming from 32-bit user space. > > This is due to th

Re: [PATCH RESEND V12 7/8] fuse: Use daemon creds in passthrough mode

2021-02-05 Thread Alessio Balsini
On Fri, Feb 05, 2021 at 05:23:56PM +0800, Peng Tao wrote: > On Mon, Jan 25, 2021 at 11:31 PM Alessio Balsini wrote: > > > > When using FUSE passthrough, read/write operations are directly > > forwarded to the lower file system file through VFS, but there is no > >

Re: [PATCH RESEND V12 2/8] fuse: 32-bit user space ioctl compat for fuse device

2021-01-28 Thread Alessio Balsini
Hi all, I'm more than happy to change the interface into something that is objectively better and accepted by everyone. I would really love to reach the point at which we have a "stable-ish" UAPI as soon as possible. I've been thinking about a few possible approaches to fix the issue, yet to

Re: [PATCH RESEND V12 2/8] fuse: 32-bit user space ioctl compat for fuse device

2021-01-27 Thread Alessio Balsini
On Wed, Jan 27, 2021 at 08:15:19PM +0800, qxy wrote: > Hi Allesio, > > Thank you for your supply for 32-bit user space. > Actually we have already met this issue on our product and we resolved it > like this: > > Project *platform/external/libfuse* > diff --git a/include/fuse_kernel.h

[PATCH RESEND V12 8/8] fuse: Introduce passthrough for mmap

2021-01-26 Thread Alessio Balsini
the passthrough performance benefits to mmap-ed operations. [1] https://lore.kernel.org/lkml/20210119110654.11817-1-wu-...@tcl.com/ Signed-off-by: Alessio Balsini --- fs/fuse/file.c| 3 +++ fs/fuse/fuse_i.h | 1 + fs/fuse/passthrough.c | 41

[PATCH RESEND V12 3/8] fuse: Definitions and ioctl for passthrough

2021-01-25 Thread Alessio Balsini
the passthrough functions for the set-up and tear-down of the data structures and locks that will be used both when fuse_conns and fuse_files are created/deleted. Signed-off-by: Alessio Balsini --- fs/fuse/Makefile | 1 + fs/fuse/dev.c | 12 fs/fuse/dir.c

[PATCH RESEND V12 4/8] fuse: Passthrough initialization and release

2021-01-25 Thread Alessio Balsini
files to be targeted for this feature. Passthrough comes with another limitation: no further file system stacking is allowed for those FUSE file systems using passthrough. Signed-off-by: Alessio Balsini --- fs/fuse/inode.c | 5 +++ fs/fuse/passthrough.

[PATCH RESEND V12 7/8] fuse: Use daemon creds in passthrough mode

2021-01-25 Thread Alessio Balsini
the FUSE daemon responsible for enabling or not the passthrough feature at file open time, and should enable the feature only after appropriate access policy checks. Signed-off-by: Alessio Balsini --- fs/fuse/fuse_i.h | 5 - fs/fuse/passthrough.c | 11 +++ 2 files changed, 15

[PATCH RESEND V12 1/8] fs: Generic function to convert iocb to rw flags

2021-01-25 Thread Alessio Balsini
n. Reduce the OverlayFS code by making the flag conversion function generic and reusable. Signed-off-by: Alessio Balsini --- fs/overlayfs/file.c | 23 +-- include/linux/fs.h | 5 + 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/fs/overlayfs/file.c b/fs

Re: [PATCH RESEND V12 1/8] fs: Generic function to convert iocb to rw flags

2021-01-25 Thread Alessio Balsini
On Mon, Jan 25, 2021 at 03:30:50PM +, Alessio Balsini wrote: > OverlayFS implements its own function to translate iocb flags into rw > flags, so that they can be passed into another vfs call. > With commit ce71bfea207b4 ("fs: align IOCB_* flags with RWF_* flags") > Jens

[PATCH RESEND V12 0/8] fuse: Add support for passthrough read/write

2021-01-25 Thread Alessio Balsini
ent further stacking and a minor fix. [Proposed by Jann Horn] Changes in v2: * Changed the feature name to passthrough from stacked_io. [Proposed by Linus Torvalds] Alessio Balsini (8): fs: Generic function to convert iocb to rw flags fuse: 32-bit user space ioctl compat for fuse device fuse: D

[PATCH RESEND V12 5/8] fuse: Introduce synchronous read and write for passthrough

2021-01-25 Thread Alessio Balsini
operations, yet covering the majority of the use cases. Signed-off-by: Alessio Balsini --- fs/fuse/file.c| 8 -- fs/fuse/fuse_i.h | 2 ++ fs/fuse/passthrough.c | 57 +++ 3 files changed, 65 insertions(+), 2 deletions(-) diff --git a/fs/fuse

[PATCH RESEND V12 2/8] fuse: 32-bit user space ioctl compat for fuse device

2021-01-25 Thread Alessio Balsini
and number from the ioctl command to enable 32-bit user space compatibility on 64-bit kernel builds. Signed-off-by: Alessio Balsini --- fs/fuse/dev.c | 29 ++--- include/uapi/linux/fuse.h | 3 ++- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git

[PATCH RESEND V12 6/8] fuse: Handle asynchronous read and write in passthrough

2021-01-25 Thread Alessio Balsini
-by: Alessio Balsini --- fs/fuse/passthrough.c | 89 +-- 1 file changed, 78 insertions(+), 11 deletions(-) diff --git a/fs/fuse/passthrough.c b/fs/fuse/passthrough.c index d949ca07a83b..c7fa1eeb7639 100644 --- a/fs/fuse/passthrough.c +++ b/fs/fuse

Re: [PATCH RESEND V11 0/7] fuse: Add support for passthrough read/write

2021-01-22 Thread Alessio Balsini
On Tue, Jan 19, 2021 at 12:34:23PM +, Alessio Balsini wrote: > On Tue, Jan 19, 2021 at 07:06:54PM +0800, Rokudo Yan wrote: > > on Mon, Jan 18, 2021 at 5:27 PM Alessio Balsini wrote: > > > > > > This is the 11th version of the series, rebased on top of v

Re: [PATCH RESEND V11 0/7] fuse: Add support for passthrough read/write

2021-01-19 Thread Alessio Balsini
On Tue, Jan 19, 2021 at 07:06:54PM +0800, Rokudo Yan wrote: > on Mon, Jan 18, 2021 at 5:27 PM Alessio Balsini wrote: > > > > This is the 11th version of the series, rebased on top of v5.11-rc4. > > Please find the changelog at the bottom of this cover letter. > > >

Re: [PATCH RESEND V11 4/7] fuse: Passthrough initialization and release

2021-01-19 Thread Alessio Balsini
On Mon, Jan 18, 2021 at 07:27:45PM +, Alessio Balsini wrote: > Implement the FUSE passthrough ioctl() that associates the lower > (passthrough) file system file with the fuse_file. > > The file descriptor passed to the ioctl() by the FUSE daemon is used to > access the relati

Re: [PATCH RESEND V11 3/7] fuse: Definitions and ioctl for passthrough

2021-01-19 Thread Alessio Balsini
On Tue, Jan 19, 2021 at 08:33:16AM +0200, Amir Goldstein wrote: > On Mon, Jan 18, 2021 at 9:28 PM Alessio Balsini wrote: > > > > Expose the FUSE_PASSTHROUGH interface to user space and declare all the > > basic data structures and functions as the skeleton on top of which the

[PATCH RESEND V11 2/7] fuse: 32-bit user space ioctl compat for fuse device

2021-01-18 Thread Alessio Balsini
and number from the ioctl command to enable 32-bit user space compatibility on 64-bit kernel builds. Signed-off-by: Alessio Balsini --- fs/fuse/dev.c | 29 ++--- include/uapi/linux/fuse.h | 3 ++- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/fs/fuse

[PATCH RESEND V11 1/7] fs: Generic function to convert iocb to rw flags

2021-01-18 Thread Alessio Balsini
n. Reduce the OverlayFS code by making the flag conversion function generic and reusable. Signed-off-by: Alessio Balsini --- fs/overlayfs/file.c | 23 +-- include/linux/fs.h | 5 + 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/fs/overlayfs/file.c b/fs

[PATCH RESEND V11 3/7] fuse: Definitions and ioctl for passthrough

2021-01-18 Thread Alessio Balsini
, add the passthrough functions for the set-up and tear-down of the data structures and locks that will be used both when fuse_conns and fuse_files are created/deleted. Signed-off-by: Alessio Balsini --- fs/fuse/Makefile | 1 + fs/fuse/dev.c | 12 fs/fuse/dir.c

[PATCH RESEND V11 7/7] fuse: Use daemon creds in passthrough mode

2021-01-18 Thread Alessio Balsini
the FUSE daemon responsible for enabling or not the passthrough feature at file open time, and should enable the feature only after appropriate access policy checks. Signed-off-by: Alessio Balsini --- fs/fuse/fuse_i.h | 5 - fs/fuse/passthrough.c | 11 +++ 2 files changed, 15

[PATCH RESEND V11 5/7] fuse: Introduce synchronous read and write for passthrough

2021-01-18 Thread Alessio Balsini
operations, yet covering the majority of the use cases. Signed-off-by: Alessio Balsini --- fs/fuse/file.c| 8 -- fs/fuse/fuse_i.h | 2 ++ fs/fuse/passthrough.c | 57 +++ 3 files changed, 65 insertions(+), 2 deletions(-) diff --git a/fs/fuse

[PATCH RESEND V11 6/7] fuse: Handle asynchronous read and write in passthrough

2021-01-18 Thread Alessio Balsini
-by: Alessio Balsini --- fs/fuse/passthrough.c | 89 +-- 1 file changed, 78 insertions(+), 11 deletions(-) diff --git a/fs/fuse/passthrough.c b/fs/fuse/passthrough.c index 8f6882a31a0b..da71a74014d7 100644 --- a/fs/fuse/passthrough.c +++ b/fs/fuse

[PATCH RESEND V11 4/7] fuse: Passthrough initialization and release

2021-01-18 Thread Alessio Balsini
ations. Signed-off-by: Alessio Balsini --- fs/fuse/inode.c | 5 +++ fs/fuse/passthrough.c | 87 ++- 2 files changed, 90 insertions(+), 2 deletions(-) diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index d5c46eafb419..bc327789f25d 100644 --- a/f

[PATCH RESEND V11 0/7] fuse: Add support for passthrough read/write

2021-01-18 Thread Alessio Balsini
prevent further stacking and a minor fix. [Proposed by Jann Horn] Changes in v2: * Changed the feature name to passthrough from stacked_io. [Proposed by Linus Torvalds] Alessio Balsini (7): fs: Generic function to convert iocb to rw flags fuse: 32-bit user space ioctl compat for fuse

Re: [PATCH V10 2/5] fuse: Passthrough initialization and release

2020-12-16 Thread Alessio Balsini
On Wed, Dec 16, 2020 at 09:32:51PM +0800, wu-...@tcl.com wrote: > Hi Alessio, > > It may cause file reference counter leak in fuse_passthrough_open. If the > passthrough_filp > > not implement read_iter/write_iter or passthrough struct allocated failed, > the reference counter get in

Re: [PATCH V10 2/5] fuse: Passthrough initialization and release

2020-12-16 Thread Alessio Balsini
Hi Tao, On Sat, Nov 28, 2020 at 09:57:31AM +0800, Peng Tao wrote: > On Fri, Nov 27, 2020 at 9:41 PM Alessio Balsini wrote: > > > > Hi Peng, > > > > Thanks for the heads up! > > > > On Thu, Nov 26, 2020 at 09:33:34PM +0800, Peng Tao wrote: > > >

Re: [PATCH V10 0/5] fuse: Add support for passthrough read/write

2020-11-30 Thread Alessio Balsini
On Sat, Nov 28, 2020 at 10:10:37AM +0800, Peng Tao wrote: > On Tue, Oct 27, 2020 at 1:00 AM Alessio Balsini wrote: > > > > This is the 10th version of the series. Please find the changelog at the > > bottom of this cover letter. > > > > Add support for file syste

Re: [PATCH V10 2/5] fuse: Passthrough initialization and release

2020-11-27 Thread Alessio Balsini
Hi Peng, Thanks for the heads up! On Thu, Nov 26, 2020 at 09:33:34PM +0800, Peng Tao wrote: > On Tue, Oct 27, 2020 at 12:19 AM Alessio Balsini wrote: > > [...] > > int fuse_passthrough_setup(struct fuse_conn *fc, struct fuse_file *ff, > >

[PATCH V10 4/5] fuse: Handle asynchronous read and write in passthrough

2020-10-26 Thread Alessio Balsini
-by: Alessio Balsini --- fs/fuse/passthrough.c | 85 ++- 1 file changed, 76 insertions(+), 9 deletions(-) diff --git a/fs/fuse/passthrough.c b/fs/fuse/passthrough.c index 5a78cb336db4..10b6872cdaa7 100644 --- a/fs/fuse/passthrough.c +++ b/fs/fuse

[PATCH V10 5/5] fuse: Use daemon creds in passthrough mode

2020-10-26 Thread Alessio Balsini
the FUSE daemon responsible for enabling or not the passthrough feature at file open time, and should enable the feature only after appropriate access policy checks. Signed-off-by: Alessio Balsini --- fs/fuse/fuse_i.h | 5 - fs/fuse/passthrough.c | 11 +++ 2 files changed, 15

[PATCH V10 0/5] fuse: Add support for passthrough read/write

2020-10-26 Thread Alessio Balsini
name to passthrough from stacked_io. [Proposed by Linus Torvalds] Alessio Balsini (5): fuse: Definitions and ioctl() for passthrough fuse: Passthrough initialization and release fuse: Introduce synchronous read and write for passthrough fuse: Handle asynchronous read and write in

[PATCH V10 3/5] fuse: Introduce synchronous read and write for passthrough

2020-10-26 Thread Alessio Balsini
operations, yet covering the majority of the use cases. Signed-off-by: Alessio Balsini --- fs/fuse/file.c| 8 +++-- fs/fuse/fuse_i.h | 2 ++ fs/fuse/passthrough.c | 70 +++ 3 files changed, 78 insertions(+), 2 deletions(-) diff --git a/fs/fuse/file.c

[PATCH V10 1/5] fuse: Definitions and ioctl() for passthrough

2020-10-26 Thread Alessio Balsini
, add the passthrough functions for the set-up and tear-down of the data structures and locks that will be used both when fuse_conns and fuse_files are created/deleted. Signed-off-by: Alessio Balsini --- fs/fuse/Makefile | 1 + fs/fuse/dev.c | 40

[PATCH V10 2/5] fuse: Passthrough initialization and release

2020-10-26 Thread Alessio Balsini
system stacking is allowed for those FUSE file systems using passthrough. Signed-off-by: Alessio Balsini --- fs/fuse/inode.c | 5 +++ fs/fuse/passthrough.c | 80 +-- 2 files changed, 83 insertions(+), 2 deletions(-) diff --git a/fs/fuse/inode.c b/f

Re: [PATCH V9 4/4] fuse: Handle asynchronous read and write in passthrough

2020-10-22 Thread Alessio Balsini
On Wed, Sep 30, 2020 at 08:54:03PM +0200, Miklos Szeredi wrote: > On Thu, Sep 24, 2020 at 3:13 PM Alessio Balsini wrote: > > > > Extend the passthrough feature by handling asynchronous IO both for read > > and write operations. > > > > When an AIO request is

Re: [PATCH V9 3/4] fuse: Introduce synchronous read and write for passthrough

2020-10-22 Thread Alessio Balsini
On Wed, Sep 30, 2020 at 08:50:46PM +0200, Miklos Szeredi wrote: > > [...] > > +ssize_t fuse_passthrough_read_iter(struct kiocb *iocb_fuse, > > + struct iov_iter *iter) > > +{ > > + ssize_t ret; > > + const struct cred *old_cred; > > + struct file

Re: [PATCH V9 2/4] fuse: Trace daemon creds

2020-10-22 Thread Alessio Balsini
On Wed, Sep 30, 2020 at 03:16:20PM -0400, Antonio SJ Musumeci wrote: > On 9/30/2020 2:45 PM, Miklos Szeredi wrote: > > On Thu, Sep 24, 2020 at 3:13 PM Alessio Balsini wrote: > > > Add a reference to the FUSE daemon credentials, so that they can be used > > > to >

Re: [PATCH V9 1/4] fuse: Definitions and ioctl() for passthrough

2020-10-22 Thread Alessio Balsini
On Wed, Sep 30, 2020 at 05:44:54PM +0200, Miklos Szeredi wrote: > On Thu, Sep 24, 2020 at 3:13 PM Alessio Balsini wrote: > > > > Introduce the new FUSE passthrough ioctl(), which allows userspace to > > specify a direct connection between a FUSE file and a lower

Re: [PATCH V9 0/4] fuse: Add support for passthrough read/write

2020-10-21 Thread Alessio Balsini
Hi Miklos, all, After being stuck with some strange and hard to reproduce results from my SSD, I finally decided to overcome the biggest chunk of inconsistencies by forgetting about the SSD and switching to a RAM block device to host my lower file system. Getting rid of the discrete storage

Re: [PATCH V9 0/4] fuse: Add support for passthrough read/write

2020-10-02 Thread Alessio Balsini
On Wed, Sep 30, 2020 at 05:33:30PM +0200, Miklos Szeredi wrote: > On Thu, Sep 24, 2020 at 3:13 PM Alessio Balsini wrote: > > > The first benchmarks were done by running FIO (fio-3.21) with: > > - bs=4Ki; > > - file size: 50Gi; > > - ioengine: sync; > > - fsync

Re: [PATCH V9 1/4] fuse: Definitions and ioctl() for passthrough

2020-09-29 Thread Alessio Balsini
Hi, I noticed the following fixup suggested by Amir slipped from this submission. Thanks, Alessio ---8<--- diff --git a/fs/fuse/passthrough.c b/fs/fuse/passthrough.c index b7d1a5517ffd..eba26196be92 100644 --- a/fs/fuse/passthrough.c +++ b/fs/fuse/passthrough.c @@ -185,7 +185,7 @@ int

Re: [PATCH V8 1/3] fuse: Definitions and ioctl() for passthrough

2020-09-29 Thread Alessio Balsini
On Tue, Sep 22, 2020 at 07:08:48PM +0300, Amir Goldstein wrote: > > I am hearing about a lot of these projects. > I think that FUSE_PASSTHROUGH is a very useful feature. > I have an intention to explore passthrough to directory fd for > directory modifications. I sure hope you will beat me to it

[PATCH V9 2/4] fuse: Trace daemon creds

2020-09-24 Thread Alessio Balsini
passthrough is active, instead, the read/write operation is directly applied to the lower file system, so to keep the same behavior as before, the calling process temporarily receives the same credentials as the daemon, that should be removed as soon as the operation completes. Signed-off-by: Alessio

[PATCH V9 1/4] fuse: Definitions and ioctl() for passthrough

2020-09-24 Thread Alessio Balsini
read_ and write_iter file operations. This extra check avoids special pseudofiles to be targets for this feature. An additional enforced limitation is that when FUSE passthrough is enabled, no further file system stacking is allowed. Signed-off-by: Alessio Balsini --- fs/fuse/Makefile

[PATCH V9 0/4] fuse: Add support for passthrough read/write

2020-09-24 Thread Alessio Balsini
Changes in v3 and v4: * Use the fs_stack_depth to prevent further stacking and a minor fix. [Proposed by Jann Horn] Changes in v2: * Changed the feature name to passthrough from stacked_io. [Proposed by Linus Torvalds] Alessio Balsini (4): fuse: Definitions and ioctl() for passthrough

[PATCH V9 4/4] fuse: Handle asynchronous read and write in passthrough

2020-09-24 Thread Alessio Balsini
-off-by: Alessio Balsini --- fs/fuse/passthrough.c | 64 +-- 1 file changed, 62 insertions(+), 2 deletions(-) diff --git a/fs/fuse/passthrough.c b/fs/fuse/passthrough.c index f70c0ef6945b..b7d1a5517ffd 100644 --- a/fs/fuse/passthrough.c +++ b/fs/fuse

[PATCH V9 3/4] fuse: Introduce synchronous read and write for passthrough

2020-09-24 Thread Alessio Balsini
, and should enable the feature only after appropriate access policy checks. This change only implements synchronous requests in passthrough, returning an error in the case of ansynchronous operations, yet covering the majority of the use cases. Signed-off-by: Alessio Balsini --- fs/fuse/file.c

Re: [PATCH V8 1/3] fuse: Definitions and ioctl() for passthrough

2020-09-22 Thread Alessio Balsini
On Fri, Sep 18, 2020 at 10:59:16PM +0300, Amir Goldstein wrote: > On Fri, Sep 18, 2020 at 7:33 PM Alessio Balsini wrote: > [...] > > > ... for example: > > > > > >if (fs_stack_depth && passthrough_sb->s_type == fuse_fs_type) { > > >

Re: [PATCH V8 3/3] fuse: Handle AIO read and write in passthrough

2020-09-21 Thread Alessio Balsini
On Fri, Sep 11, 2020 at 11:23:22AM -0600, Jens Axboe wrote: > On 9/11/20 10:34 AM, Alessio Balsini wrote: > > Extend the passthrough feature by handling asynchronous IO both for read > > and write operations. > > When an AIO request is received, targeting a FUSE

Re: [PATCH V8 2/3] fuse: Introduce synchronous read and write for passthrough

2020-09-21 Thread Alessio Balsini
Hi Amir, On Sat, Sep 12, 2020 at 12:55:35PM +0300, Amir Goldstein wrote: > On Fri, Sep 11, 2020 at 7:34 PM Alessio Balsini wrote: > > +ssize_t fuse_passthrough_read_iter(struct kiocb *iocb_fuse, > > + struct iov_iter *iter) > > +{ &g

Re: [PATCH V8 1/3] fuse: Definitions and ioctl() for passthrough

2020-09-18 Thread Alessio Balsini
Hi Amir, Thanks again for your feedback. On Sat, Sep 12, 2020 at 02:06:02PM +0300, Amir Goldstein wrote: > On Fri, Sep 11, 2020 at 7:34 PM Alessio Balsini wrote: > [...] > > diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c > > index bba747520e9b..eb223130a917 100644 > &g

Re: [fuse-devel] [PATCH V8 0/3] fuse: Add support for passthrough read/write

2020-09-18 Thread Alessio Balsini
feedback, Alessio On Fri, Sep 11, 2020 at 02:46:04PM -0400, Antonio SJ Musumeci wrote: > On 9/11/2020 12:34 PM, Alessio Balsini via fuse-devel wrote: > > Add support for file system passthrough read/write of files when enabled in > > userspace through the option FUSE_PASSTHROUGH.

[PATCH V8 3/3] fuse: Handle AIO read and write in passthrough

2020-09-11 Thread Alessio Balsini
completion callback as well. Signed-off-by: Alessio Balsini --- fs/fuse/passthrough.c | 66 +-- 1 file changed, 63 insertions(+), 3 deletions(-) diff --git a/fs/fuse/passthrough.c b/fs/fuse/passthrough.c index 44a78e02f45d..87b57b26fd8a 100644 --- a/fs/fuse

[PATCH V8 0/3] fuse: Add support for passthrough read/write

2020-09-11 Thread Alessio Balsini
vent further stacking and a minor fix. [Proposed by Jann Horn] Changes in v2: * Changed the feature name to passthrough from stacked_io. [Proposed by Linus Torvalds] Alessio Balsini (3): fuse: Definitions and ioctl() for passthrough fuse: Introduce synchronous read and write for passthrough

[PATCH V8 2/3] fuse: Introduce synchronous read and write for passthrough

2020-09-11 Thread Alessio Balsini
operation is completed, the file stats change is notified (and propagated) to the lower file system. This change only implements synchronous requests in passthrough, returning an error in the case of ansynchronous operations, yet covering the majority of the use cases. Signed-off-by: Alessio Balsini

[PATCH V8 1/3] fuse: Definitions and ioctl() for passthrough

2020-09-11 Thread Alessio Balsini
read_ and write_iter file operations. This extra check avoids special pseudofiles to be targets for this feature. An additional enforced limitation is that when FUSE passthrough is enabled, no further file system stacking is allowed. Signed-off-by: Alessio Balsini --- fs/fuse/Makefile

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-18 Thread Alessio Balsini
fs to see how > they're dealing with this case. That was a great suggestion, I hopefully picked the right things from overlayfs, without overlooking some security aspects. Thanks again, Alessio ---8<--- >From 5f0e162d2bb39acf41687ca722e15e95d0721c43 Mon Sep 17 00:00:00 2001 From: Ales

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

2020-08-13 Thread Alessio Balsini
ke 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 when enabled in > > userspace through the option FUSE_PASSTHROUGH. > > Oh, I remember this old series... v5 was from 2016? Nice to se

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

2020-08-12 Thread Alessio Balsini
khilesh Reddy Signed-off-by: Alessio Balsini -- Performance What follows has been performed with this change rebased on top of a vanilla v5.8 Linux kernel, using a custom passthrough_hp FUSE daemon that enables pass-through for each file that is opened during both “open” and “create”. T

Re: [PATCH 4.4 4.9 4.14] loop: Add LOOP_SET_DIRECT_IO to compat ioctl

2019-10-23 Thread Alessio Balsini
Ops, please forgive the wrong in-reply-to messge id :) Cheers, Alessio On Wed, Oct 23, 2019 at 06:17:36PM +0100, Alessio Balsini wrote: > [ Upstream commit fdbe4eeeb1aac219b14f10c0ed31ae5d1123e9b8 ] > > Enabling Direct I/O with loop devices helps reducing memory usage by > avo

[PATCH 4.4 4.9 4.14] loop: Add LOOP_SET_DIRECT_IO to compat ioctl

2019-10-23 Thread Alessio Balsini
. This patch fixes the compatibility issue mentioned above by exporting LOOP_SET_DIRECT_IO as additional lo_compat_ioctl() entry. The input argument for this ioctl is a single long converted to a 1-bit boolean, so compatibility is preserved. Cc: Jens Axboe Signed-off-by: Alessio Balsini Signed-off

[PATCH] sysctl: Inline braces for ctl_table and ctl_table_header

2019-09-03 Thread Alessio Balsini
ruct definition when navigating the code. Signed-off-by: Alessio Balsini Cc: Luis Chamberlain Cc: Kees Cook --- include/linux/sysctl.h | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 6df477329b76e..02fa84493f237 100644

Re: [RFC][PATCH 00/13] SCHED_DEADLINE server infrastructure

2019-09-03 Thread Alessio Balsini
Hi Peter, While testing your series (peterz/sched/wip-deadline 7a9e91d3fe951), I ended up in a panic at boot on a x86_64 kvm guest, would you please have a look? Here attached the backtrace. Happy to test any suggestion that fixes the issue. Thanks, Alessio --- -->8-- [0.798326]

Re: [RFC][PATCH 01/13] sched/deadline: Impose global limits on sched_attr::sched_period

2019-08-31 Thread Alessio Balsini
looks at utilization and density, a very large period can allow a very large runtime, which in turn can incur a very large latency to lower priority tasks. - for very short periods we can end up spending more time programming the hardware timer than actually running the task. Mitigate these

Re: [RFC][PATCH 01/13] sched/deadline: Impose global limits on sched_attr::sched_period

2019-08-22 Thread Alessio Balsini
On Mon, Aug 05, 2019 at 01:53:09PM +0200, Peter Zijlstra wrote: > > Like so? > Yes, that's exactly what I meant! What about this refactoring? Thanks, Alessio --- >From 459d5488acb3fac938b0f35f480a81a6e401ef92 Mon Sep 17 00:00:00 2001 From: Alessio Balsini Date: Thu, 22 Aug 2

Re: [PATCH 4.9.y 4.14.y] IB/mlx5: Fix leaking stack memory to userspace

2019-08-13 Thread Alessio Balsini
Oops, you are totally right, I was still looking at the latest mlx5_ib_create_qp_resp struct while backporting these patches :) Sorry for that, Alessio On Mon, Aug 12, 2019 at 04:23:16PM +0200, Greg KH wrote: > On Mon, Aug 12, 2019 at 11:55:03AM +0100, Alessio Balsini wrote: > > Fr

[PATCH 4.9.y 4.14.y] IB/mlx5: Fix leaking stack memory to userspace

2019-08-12 Thread Alessio Balsini
-by: Jason Gunthorpe Signed-off-by: Alessio Balsini --- drivers/infiniband/hw/mlx5/qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index a7bc89f5dae7..89357d9e489d 100644 --- a/drivers/infiniband/hw/mlx5/

[PATCH 4.4.y] IB/mlx5: Fix leaking stack memory to userspace

2019-08-12 Thread Alessio Balsini
From: Jason Gunthorpe mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes were written. Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp") Cc: Acked-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Alessio Balsini --

[PATCH 3.18.y] IB/mlx5: Fix leaking stack memory to userspace

2019-08-12 Thread Alessio Balsini
From: Jason Gunthorpe mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes were written. Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp") Cc: Acked-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Alessio Balsini --

Re: [PATCH 3.18.y 4.4.y 4.9.y] block: blk_init_allocated_queue() set q->fq as NULL in the fail case

2019-08-08 Thread Alessio Balsini
Oops, thanks! On Thu, Aug 8, 2019 at 2:00 AM Greg KH wrote: > > On Thu, Aug 08, 2019 at 03:28:19AM +0100, Alessio Balsini wrote: > > From: xiao jin > > > > commit 54648cf1ec2d7f4b6a71767799c45676a138ca24 upstream. > > > > We find the memory use-a

[PATCH 3.18.y 4.4.y 4.9.y] block: blk_init_allocated_queue() set q->fq as NULL in the fail case

2019-08-07 Thread Alessio Balsini
he fail case of blk_init_allocated_queue(). Fixes: commit 7c94e1c157a2 ("block: introduce blk_flush_queue to drive flush machinery") Cc: Reviewed-by: Ming Lei Reviewed-by: Bart Van Assche Signed-off-by: xiao jin Signed-off-by: Jens Axboe Signed-off-by: Alessio Balsini --- block/blk-core.c | 1 + 1 fil

Re: [RFC][PATCH 01/13] sched/deadline: Impose global limits on sched_attr::sched_period

2019-08-02 Thread Alessio Balsini
Hi Peter, This is indeed an important missing piece. I think it would be worth having some simple checks, e.g.: - period_min <= period_max; - period_min >= (1ULL << DL_SCALE). To be even more picky, I'm wondering if it would be a good practice to fail the write operation if there are already

[PATCH 4.4] um: Compile with modern headers

2019-07-03 Thread Alessio Balsini
d Cc: sta...@vger.kernel.org Signed-off-by: Richard Weinberger Signed-off-by: Alessio Balsini --- arch/um/os-Linux/file.c | 1 + arch/um/os-Linux/signal.c | 2 ++ arch/x86/um/stub_segv.c | 1 + 3 files changed, 4 insertions(+) diff --git a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c index 26

Re: [RFC PATCH 1/6] sched/dl: Improve deadline admission control for asymmetric CPU capacities

2019-06-18 Thread Alessio Balsini
Hi Luca, On Mon, May 06, 2019 at 06:48:31AM +0200, Luca Abeni wrote: > From: luca abeni > > extern void dl_change_utilization(struct task_struct *p, u64 new_bw); > @@ -785,6 +786,8 @@ struct root_domain { > unsigned long max_cpu_capacity; > unsigned long

[PATCH] sched/deadline: Minor typos in dl_entity_overflow comment

2019-05-28 Thread Alessio Balsini
Fix two non-critical typos in the documentation of the dl_entity_overflow function: - "rather then" --> "rather than"; - "in such way that" --> "in such a way that". Signed-off-by: Alessio Balsini --- kernel/sched/deadline.c | 4 ++-- 1 file change

Re: [RFC PATCH] sched/deadline: sched_getattr() returns absolute dl-task information

2019-04-29 Thread Alessio Balsini

Re: [PATCH v6 01/16] sched/core: Allow sched_setattr() to use the current policy

2019-01-25 Thread Alessio Balsini
Hello Patrick, What do you think about the following minor changes: On Tue, Jan 15, 2019 at 10:14:58AM +, Patrick Bellasi wrote: > /* SCHED_ISO: reserved but not implemented yet */ > #define SCHED_IDLE 5 > #define SCHED_DEADLINE 6 > +/* Must be the last entry: used

[RFC PATCH] sched/deadline: sched_getattr() returns absolute dl-task information

2018-06-29 Thread Alessio Balsini
: Juri Lelli Cc: Tommaso Cucinotta Cc: Luca Abeni Cc: Claudio Scordino Cc: Daniel Bristot de Oliveira Cc: Patrick Bellasi Cc: Ingo Molnar Cc: Peter Zijlstra Tested-by: Joel Fernandes (Google) Reviewed-by: Joel Fernandes (Google) Signed-off-by: Alessio Balsini --- Having a precise means

[RFC PATCH] sched/deadline: sched_getattr() returns absolute dl-task information

2018-06-29 Thread Alessio Balsini
: Juri Lelli Cc: Tommaso Cucinotta Cc: Luca Abeni Cc: Claudio Scordino Cc: Daniel Bristot de Oliveira Cc: Patrick Bellasi Cc: Ingo Molnar Cc: Peter Zijlstra Tested-by: Joel Fernandes (Google) Reviewed-by: Joel Fernandes (Google) Signed-off-by: Alessio Balsini --- Having a precise means

Re: [PATCH] sched/core: sched_getattr returning consistent sched_priority

2017-12-20 Thread Alessio Balsini
Hi, On 19/12/17 16:16, Peter Zijlstra wrote: [...] This inaccuracy was introduced in 06a76fe08d4d, that moved the function from core.c to deadline.c. Before that, it was making more sense to access sched_priority, either if the function name __getparam_dl() was misleading. OK, I'm dense,

Re: [PATCH] sched/core: sched_getattr returning consistent sched_priority

2017-12-20 Thread Alessio Balsini
Hi, On 19/12/17 16:16, Peter Zijlstra wrote: [...] This inaccuracy was introduced in 06a76fe08d4d, that moved the function from core.c to deadline.c. Before that, it was making more sense to access sched_priority, either if the function name __getparam_dl() was misleading. OK, I'm dense,

[PATCH] sched/core: sched_getattr returning consistent sched_priority

2017-12-19 Thread Alessio Balsini
is out of scope and is removed. This inaccuracy was introduced in 06a76fe08d4d, that moved the function from core.c to deadline.c. Before that, it was making more sense to access sched_priority, either if the function name __getparam_dl() was misleading. Signed-off-by: Alessio Balsini <ales

[PATCH] sched/core: sched_getattr returning consistent sched_priority

2017-12-19 Thread Alessio Balsini
is out of scope and is removed. This inaccuracy was introduced in 06a76fe08d4d, that moved the function from core.c to deadline.c. Before that, it was making more sense to access sched_priority, either if the function name __getparam_dl() was misleading. Signed-off-by: Alessio Balsini Reviewed-by:

[PATCH] sched/deadline: comment update for constrained deadline tasks explanation

2017-11-24 Thread Alessio Balsini
Remove the adjective "relative" associated to the period of a periodic task, since the period is an absolute value. Rephrased the comment with the aim of making it even more clear. Signed-off-by: Alessio Balsini <alessio.bals...@arm.com> Cc: Ingo Molnar <mi...@redhat.com> C

[PATCH] sched/deadline: comment update for constrained deadline tasks explanation

2017-11-24 Thread Alessio Balsini
Remove the adjective "relative" associated to the period of a periodic task, since the period is an absolute value. Rephrased the comment with the aim of making it even more clear. Signed-off-by: Alessio Balsini Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Juri Lelli Cc: Daniel Bristot d

[RFC PATCH 2/3] sched/deadline: Hierarchical scheduling with DL on top of RT

2017-03-31 Thread Alessio Balsini
Molnar <mi...@redhat.com> Cc: Peter Zijlstra <pet...@infradead.org> Signed-off-by: Alessio Balsini <a.bals...@sssup.it> --- include/linux/sched.h| 13 +- kernel/sched/autogroup.c | 4 +- kernel/sched/core.c | 86 -- kernel/sched/deadline.c | 17

[RFC PATCH 2/3] sched/deadline: Hierarchical scheduling with DL on top of RT

2017-03-31 Thread Alessio Balsini
-off-by: Luca Abeni Cc: Tommaso Cucinotta Cc: Juri Lelli Cc: Daniel Bristot de Oliveira Cc: Steven Rostedt Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: Alessio Balsini --- include/linux/sched.h| 13 +- kernel/sched/autogroup.c | 4 +- kernel/sched/core.c | 86

[RFC PATCH 3/3] sched/rt: DL-RT group migration from throttled rq

2017-03-31 Thread Alessio Balsini
ristot de Oliveira <bris...@redhat.com> Cc: Steven Rostedt <rost...@goodmis.org> Cc: Ingo Molnar <mi...@redhat.com> Cc: Peter Zijlstra <pet...@infradead.org> Signed-off-by: Alessio Balsini <a.bals...@sssup.it> --- kernel/sched/deadline.c

[RFC PATCH 3/3] sched/rt: DL-RT group migration from throttled rq

2017-03-31 Thread Alessio Balsini
available bandwidth is the given runtime/period multiplied by M. Signed-off-by: Andrea Parri Signed-off-by: Luca Abeni Cc: Tommaso Cucinotta Cc: Juri Lelli Cc: Daniel Bristot de Oliveira Cc: Steven Rostedt Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: Alessio Balsini --- kernel/sched

[RFC PATCH 0/3] RT bandwidth constraints enforced by hierarchical DL scheduling

2017-03-31 Thread Alessio Balsini
Hi, This patchset provides hierarchical RT scheduling by nesting the SCHED_RT fixed-priority scheduler within SCHED_DEADLINE reservations, namely allowing for groups of tasks to be scheduled within a SCHED_DEADLINE reservation, choosing tasks within each group according to their RT priorities.

  1   2   >