[PATCH] fuse: relax inode_lock on fsync(2)

2016-12-13 Thread Maxim Patlasov
Sometimes handling FUSE_FSYNC in userspace may take a while. No need to block incoming writes while userspace processes FUSE_FSYNC. Signed-off-by: Maxim Patlasov <mpatla...@virtuozzo.com> --- fs/fuse/file.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/fuse/file.c b/fs/fuse/

[PATCH] fuse: relax inode_lock on fsync(2)

2016-12-13 Thread Maxim Patlasov
Sometimes handling FUSE_FSYNC in userspace may take a while. No need to block incoming writes while userspace processes FUSE_FSYNC. Signed-off-by: Maxim Patlasov --- fs/fuse/file.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 2401c5d..9d52a8a

[PATCH v2] btrfs: limit async_work allocation and worker func duration

2016-12-12 Thread Maxim Patlasov
orward way: refuse queuing too many works in btrfs_wq_run_delayed_node and bail out of worker func if at least BTRFS_DELAYED_WRITEBACK items are processed. Changed in v2: remove support of thresh == NO_THRESHOLD. Signed-off-by: Maxim Patlasov <mpatla...@virtuozzo.com> --- fs/btrfs/async-threa

[PATCH v2] btrfs: limit async_work allocation and worker func duration

2016-12-12 Thread Maxim Patlasov
orward way: refuse queuing too many works in btrfs_wq_run_delayed_node and bail out of worker func if at least BTRFS_DELAYED_WRITEBACK items are processed. Changed in v2: remove support of thresh == NO_THRESHOLD. Signed-off-by: Maxim Patlasov --- fs/btrfs/async-thread.c | 14 ++ f

Re: [PATCH] btrfs: limit async_work allocation and worker func duration

2016-12-12 Thread Maxim Patlasov
On 12/12/2016 06:54 AM, David Sterba wrote: On Fri, Dec 02, 2016 at 05:51:36PM -0800, Maxim Patlasov wrote: Problem statement: unprivileged user who has read-write access to more than one btrfs subvolume may easily consume all kernel memory (eventually triggering oom-killer). Reproducer

Re: [PATCH] btrfs: limit async_work allocation and worker func duration

2016-12-12 Thread Maxim Patlasov
On 12/12/2016 06:54 AM, David Sterba wrote: On Fri, Dec 02, 2016 at 05:51:36PM -0800, Maxim Patlasov wrote: Problem statement: unprivileged user who has read-write access to more than one btrfs subvolume may easily consume all kernel memory (eventually triggering oom-killer). Reproducer

[PATCH] btrfs: limit async_work allocation and worker func duration

2016-12-02 Thread Maxim Patlasov
orward way: refuse queuing too many works in btrfs_wq_run_delayed_node and bail out of worker func if at least BTRFS_DELAYED_WRITEBACK items are processed. Signed-off-by: Maxim Patlasov <mpatla...@virtuozzo.com> --- fs/btrfs/async-thread.c |8 fs/btrfs/async-thread.h |

[PATCH] btrfs: limit async_work allocation and worker func duration

2016-12-02 Thread Maxim Patlasov
orward way: refuse queuing too many works in btrfs_wq_run_delayed_node and bail out of worker func if at least BTRFS_DELAYED_WRITEBACK items are processed. Signed-off-by: Maxim Patlasov --- fs/btrfs/async-thread.c |8 fs/btrfs/async-thread.h |1 + fs/btrfs/delayed-inode.c |

Re: [fuse-devel] fuse: max_background and congestion_threshold settings

2016-11-22 Thread Maxim Patlasov
On 11/22/2016 02:45 PM, Nikolaus Rath wrote: On Nov 16 2016, Maxim Patlasov <mpatla...@virtuozzo.com> wrote: On 11/16/2016 12:19 PM, Nikolaus Rath wrote: On Nov 16 2016, Maxim Patlasov <mpatla...@virtuozzo.com> wrote: On 11/16/2016 11:19 AM, Nikolaus Rath wrote: Hi Maxim, On

Re: [fuse-devel] fuse: max_background and congestion_threshold settings

2016-11-22 Thread Maxim Patlasov
On 11/22/2016 02:45 PM, Nikolaus Rath wrote: On Nov 16 2016, Maxim Patlasov wrote: On 11/16/2016 12:19 PM, Nikolaus Rath wrote: On Nov 16 2016, Maxim Patlasov wrote: On 11/16/2016 11:19 AM, Nikolaus Rath wrote: Hi Maxim, On Nov 15 2016, Maxim Patlasov wrote: On 11/15/2016 08:18 AM

Re: [fuse-devel] fuse: max_background and congestion_threshold settings

2016-11-16 Thread Maxim Patlasov
On 11/16/2016 11:19 AM, Nikolaus Rath wrote: Hi Maxim, On Nov 15 2016, Maxim Patlasov <mpatla...@virtuozzo.com> wrote: On 11/15/2016 08:18 AM, Nikolaus Rath wrote: Could someone explain to me the meaning of the max_background and congestion_threshold settings of the fuse module? At f

Re: [fuse-devel] fuse: max_background and congestion_threshold settings

2016-11-16 Thread Maxim Patlasov
On 11/16/2016 11:19 AM, Nikolaus Rath wrote: Hi Maxim, On Nov 15 2016, Maxim Patlasov wrote: On 11/15/2016 08:18 AM, Nikolaus Rath wrote: Could someone explain to me the meaning of the max_background and congestion_threshold settings of the fuse module? At first I assumed

Re: [fuse-devel] fuse: max_background and congestion_threshold settings

2016-11-16 Thread Maxim Patlasov
On 11/16/2016 12:19 PM, Nikolaus Rath wrote: On Nov 16 2016, Maxim Patlasov <mpatla...@virtuozzo.com> wrote: On 11/16/2016 11:19 AM, Nikolaus Rath wrote: Hi Maxim, On Nov 15 2016, Maxim Patlasov <mpatla...@virtuozzo.com> wrote: On 11/15/2016 08:18 AM, Nikolaus Rath wrote: C

Re: [fuse-devel] fuse: max_background and congestion_threshold settings

2016-11-16 Thread Maxim Patlasov
On 11/16/2016 12:19 PM, Nikolaus Rath wrote: On Nov 16 2016, Maxim Patlasov wrote: On 11/16/2016 11:19 AM, Nikolaus Rath wrote: Hi Maxim, On Nov 15 2016, Maxim Patlasov wrote: On 11/15/2016 08:18 AM, Nikolaus Rath wrote: Could someone explain to me the meaning of the max_background

Re: [fuse-devel] fuse: max_background and congestion_threshold settings

2016-11-16 Thread Maxim Patlasov
Hi, On 11/15/2016 08:18 AM, Nikolaus Rath wrote: Hello, Could someone explain to me the meaning of the max_background and congestion_threshold settings of the fuse module? At first I assumed that max_background specifies the maximum number of pending requests (i.e., requests that have been

Re: [fuse-devel] fuse: max_background and congestion_threshold settings

2016-11-16 Thread Maxim Patlasov
Hi, On 11/15/2016 08:18 AM, Nikolaus Rath wrote: Hello, Could someone explain to me the meaning of the max_background and congestion_threshold settings of the fuse module? At first I assumed that max_background specifies the maximum number of pending requests (i.e., requests that have been

[PATCH v2] fuse: fuse_flush must check mapping->flags for errors

2016-07-20 Thread Maxim Patlasov
silly type: check must be *after* fuse_sync_writes() Signed-off-by: Maxim Patlasov <mpatla...@virtuozzo.com> --- fs/fuse/file.c |9 + 1 file changed, 9 insertions(+) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index ad1da83..6cac3dc 100644 --- a/fs/fuse/file.c +++ b/fs

[PATCH v2] fuse: fuse_flush must check mapping->flags for errors

2016-07-20 Thread Maxim Patlasov
silly type: check must be *after* fuse_sync_writes() Signed-off-by: Maxim Patlasov --- fs/fuse/file.c |9 + 1 file changed, 9 insertions(+) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index ad1da83..6cac3dc 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -417,6 +417,15 @@ stat

[PATCH] fuse: fuse_flush must check mapping->flags for errors

2016-07-19 Thread Maxim Patlasov
fuse_flush() calls write_inode_now() that triggers writeback, but actual writeback will happen later, on fuse_sync_writes(). If an error happens, fuse_writepage_end() will set error bit in mapping->flags. So, we have to check mapping->flags after fuse_sync_writes(). Signed-off-by: Maxim Pa

[PATCH] fuse: fuse_flush must check mapping->flags for errors

2016-07-19 Thread Maxim Patlasov
fuse_flush() calls write_inode_now() that triggers writeback, but actual writeback will happen later, on fuse_sync_writes(). If an error happens, fuse_writepage_end() will set error bit in mapping->flags. So, we have to check mapping->flags after fuse_sync_writes(). Signed-off-by: Maxim Pa

[PATCH] fuse: fsync() did not return IO errors

2016-07-19 Thread Maxim Patlasov
From: Alexey Kuznetsov <kuz...@parallels.com> Due to implementation of fuse writeback filemap_write_and_wait_range() does not catch errors. We have to do this directly after fuse_sync_writes() Signed-off-by: Alexey Kuznetsov <kuz...@virtuozzo.com> Signed-off-by: Maxim Patl

[PATCH] fuse: fsync() did not return IO errors

2016-07-19 Thread Maxim Patlasov
From: Alexey Kuznetsov Due to implementation of fuse writeback filemap_write_and_wait_range() does not catch errors. We have to do this directly after fuse_sync_writes() Signed-off-by: Alexey Kuznetsov Signed-off-by: Maxim Patlasov --- fs/fuse/file.c | 15 +++ 1 file changed

[PATCH] tmpfs: shmem_fallocate must return ERESTARTSYS

2016-03-03 Thread Maxim Patlasov
shmem_fallocate() is restartable, so it can return ERESTARTSYS if signal_pending(). Although fallocate(2) manpage permits EINTR, the more places use ERESTARTSYS the better. Signed-off-by: Maxim Patlasov <mpatla...@virtuozzo.com> --- mm/shmem.c |8 +--- 1 file changed, 5 insertions

[PATCH] tmpfs: shmem_fallocate must return ERESTARTSYS

2016-03-03 Thread Maxim Patlasov
shmem_fallocate() is restartable, so it can return ERESTARTSYS if signal_pending(). Although fallocate(2) manpage permits EINTR, the more places use ERESTARTSYS the better. Signed-off-by: Maxim Patlasov --- mm/shmem.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git

Re: [PATCH] fs/pnode.c: treat zero mnt_group_id-s as unequal

2016-02-16 Thread Maxim Patlasov
On 02/16/2016 11:54 AM, Al Viro wrote: On Tue, Feb 16, 2016 at 11:45:33AM -0800, Maxim Patlasov wrote: propagate_one(m) calculates "type" argument for copy_tree() like this: if (m->mnt_group_id == last_dest->mnt_group_id) { type = CL_MAKE_SHARED; } els

Re: [PATCH] fs/pnode.c: treat zero mnt_group_id-s as unequal

2016-02-16 Thread Maxim Patlasov
On 02/16/2016 11:54 AM, Al Viro wrote: On Tue, Feb 16, 2016 at 11:45:33AM -0800, Maxim Patlasov wrote: propagate_one(m) calculates "type" argument for copy_tree() like this: if (m->mnt_group_id == last_dest->mnt_group_id) { type = CL_MAKE_SHARED; } els

[PATCH] fs/pnode.c: treat zero mnt_group_id-s as unequal

2016-02-16 Thread Maxim Patlasov
; clause above when we have to ascend upward in the master/slave tree by calling: >last_source = last_source->mnt_master; >last_dest = last_source->mnt_parent; proper number of times. The last step is governed by "n->mnt_group_id != last_dest->mnt_group_id" condition that

[PATCH] fs/pnode.c: treat zero mnt_group_id-s as unequal

2016-02-16 Thread Maxim Patlasov
; clause above when we have to ascend upward in the master/slave tree by calling: >last_source = last_source->mnt_master; >last_dest = last_source->mnt_parent; proper number of times. The last step is governed by "n->mnt_group_id != last_dest->mnt_group_id" condition that

Re: [PATCH] kvm: do not SetPageDirty from kvm_set_pfn_dirty for file mappings

2016-02-12 Thread Maxim Patlasov
On 02/12/2016 05:48 AM, Dmitry Monakhov wrote: Maxim Patlasov writes: The patch solves the following problem: file system specific routines involved in ordinary routine writeback process BUG_ON page_buffers() because a page goes to writeback without buffer-heads attached. The way how

Re: [PATCH] kvm: do not SetPageDirty from kvm_set_pfn_dirty for file mappings

2016-02-12 Thread Maxim Patlasov
On 02/12/2016 05:48 AM, Dmitry Monakhov wrote: Maxim Patlasov <mpatla...@virtuozzo.com> writes: The patch solves the following problem: file system specific routines involved in ordinary routine writeback process BUG_ON page_buffers() because a page goes to writeback without buffer

[PATCH] kvm: do not SetPageDirty from kvm_set_pfn_dirty for file mappings

2016-02-11 Thread Maxim Patlasov
et_pfn_dirty redundant. Signed-off-by: Maxim Patlasov --- virt/kvm/kvm_main.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index a11cfd2..5a7d3fa 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -1582,7 +15

[PATCH] kvm: do not SetPageDirty from kvm_set_pfn_dirty for file mappings

2016-02-11 Thread Maxim Patlasov
et_pfn_dirty redundant. Signed-off-by: Maxim Patlasov <mpatla...@virtuozzo.com> --- virt/kvm/kvm_main.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index a11cfd2..5a7d3fa 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm

Re: [fuse-devel] [PATCH] fuse: break infinite loop in fuse_fill_write_pages()

2015-10-05 Thread Maxim Patlasov
On 10/02/2015 06:58 PM, Konstantin Khlebnikov wrote: On Sat, Oct 3, 2015 at 1:04 AM, Andrew Morton wrote: On Fri, 2 Oct 2015 12:27:45 -0700 Maxim Patlasov wrote: On 10/02/2015 04:21 AM, Konstantin Khlebnikov wrote: Bump. Add more peopple in CC. On Mon, Sep 21, 2015 at 1:02 PM, Roman

Re: [fuse-devel] [PATCH] fuse: break infinite loop in fuse_fill_write_pages()

2015-10-05 Thread Maxim Patlasov
On 10/02/2015 06:58 PM, Konstantin Khlebnikov wrote: On Sat, Oct 3, 2015 at 1:04 AM, Andrew Morton <a...@linux-foundation.org> wrote: On Fri, 2 Oct 2015 12:27:45 -0700 Maxim Patlasov <mpatla...@parallels.com> wrote: On 10/02/2015 04:21 AM, Konstantin Khlebnikov wrote: Bump. Add

Re: [fuse-devel] [PATCH] fuse: break infinite loop in fuse_fill_write_pages()

2015-10-02 Thread Maxim Patlasov
On 10/02/2015 04:21 AM, Konstantin Khlebnikov wrote: Bump. Add more peopple in CC. On Mon, Sep 21, 2015 at 1:02 PM, Roman Gushchin wrote: I got a report about unkillable task eating CPU. Thge further investigation shows, that the problem is in the fuse_fill_write_pages() function. If iov's

Re: [fuse-devel] [PATCH] fuse: break infinite loop in fuse_fill_write_pages()

2015-10-02 Thread Maxim Patlasov
On 10/02/2015 04:21 AM, Konstantin Khlebnikov wrote: Bump. Add more peopple in CC. On Mon, Sep 21, 2015 at 1:02 PM, Roman Gushchin wrote: I got a report about unkillable task eating CPU. Thge further investigation shows, that the problem is in the fuse_fill_write_pages()

Re: [PATCH v2 4/4] block: loop: support to submit I/O via kernel aio based

2015-03-19 Thread Maxim Patlasov
On 03/18/2015 07:57 PM, Ming Lei wrote: On Thu, Mar 19, 2015 at 2:28 AM, Maxim Patlasov wrote: On 01/13/2015 07:44 AM, Ming Lei wrote: Part of the patch is based on Dave's previous post. This patch submits I/O to fs via kernel aio, and we can obtain following benefits: - double

Re: [PATCH v2 4/4] block: loop: support to submit I/O via kernel aio based

2015-03-19 Thread Maxim Patlasov
On 03/18/2015 07:57 PM, Ming Lei wrote: On Thu, Mar 19, 2015 at 2:28 AM, Maxim Patlasov mpatla...@parallels.com wrote: On 01/13/2015 07:44 AM, Ming Lei wrote: Part of the patch is based on Dave's previous post. This patch submits I/O to fs via kernel aio, and we can obtain following benefits

Re: [PATCH v2 4/4] block: loop: support to submit I/O via kernel aio based

2015-03-18 Thread Maxim Patlasov
On 01/13/2015 07:44 AM, Ming Lei wrote: Part of the patch is based on Dave's previous post. This patch submits I/O to fs via kernel aio, and we can obtain following benefits: - double cache in both loop file system and backend file gets avoided - context switch

Re: [PATCH v2 4/4] block: loop: support to submit I/O via kernel aio based

2015-03-18 Thread Maxim Patlasov
On 01/13/2015 07:44 AM, Ming Lei wrote: Part of the patch is based on Dave's previous post. This patch submits I/O to fs via kernel aio, and we can obtain following benefits: - double cache in both loop file system and backend file gets avoided - context switch

Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec

2015-01-05 Thread Maxim Patlasov
On 12/31/2014 04:52 PM, Ming Lei wrote: On Thu, Jan 1, 2015 at 6:35 AM, Sedat Dilek wrote: On Wed, Dec 31, 2014 at 10:52 PM, Dave Kleikamp wrote: On 12/31/2014 02:38 PM, Sedat Dilek wrote: What has happened to that aio_loop patchset? Is it in Linux-next? ( /me started to play with "block:

Re: [PATCH V8 00/33] loop: Issue O_DIRECT aio using bio_vec

2015-01-05 Thread Maxim Patlasov
On 12/31/2014 04:52 PM, Ming Lei wrote: On Thu, Jan 1, 2015 at 6:35 AM, Sedat Dilek sedat.di...@gmail.com wrote: On Wed, Dec 31, 2014 at 10:52 PM, Dave Kleikamp dave.kleik...@oracle.com wrote: On 12/31/2014 02:38 PM, Sedat Dilek wrote: What has happened to that aio_loop patchset? Is it in

Re: [PATCH 0/5] fuse: handle release synchronously (v4)

2014-10-16 Thread Maxim Patlasov
Hi Miklos, On 10/09/2014 12:14 PM, Miklos Szeredi wrote: On Wed, Oct 1, 2014 at 1:28 PM, Maxim Patlasov wrote: Given those patches must die, do you have any ideas how to resolve that "spurious EBUSY" problem? Check the "sync_release" branch of fuse: git://git.kern

Re: [PATCH 0/5] fuse: handle release synchronously (v4)

2014-10-16 Thread Maxim Patlasov
Hi Miklos, On 10/09/2014 12:14 PM, Miklos Szeredi wrote: On Wed, Oct 1, 2014 at 1:28 PM, Maxim Patlasov mpatla...@parallels.com wrote: Given those patches must die, do you have any ideas how to resolve that spurious EBUSY problem? Check the sync_release branch of fuse: git

Re: [PATCH 0/5] fuse: handle release synchronously (v4)

2014-10-01 Thread Maxim Patlasov
On 10/01/2014 12:44 AM, Linus Torvalds wrote: On Tue, Sep 30, 2014 at 12:19 PM, Miklos Szeredi wrote: What about flock(2), FL_SETLEASE, etc semantics (which are the sane ones, compared to the POSIX locks shit which mandates release of lock on each close(2) instead of "when all [duplicate]

Re: [PATCH 0/5] fuse: handle release synchronously (v4)

2014-10-01 Thread Maxim Patlasov
On 10/01/2014 12:44 AM, Linus Torvalds wrote: On Tue, Sep 30, 2014 at 12:19 PM, Miklos Szeredi mik...@szeredi.hu wrote: What about flock(2), FL_SETLEASE, etc semantics (which are the sane ones, compared to the POSIX locks shit which mandates release of lock on each close(2) instead of when all

[PATCH 5/5] fuse: enable close_wait synchronous release

2014-09-25 Thread Maxim Patlasov
, it's always safe because callbacks don't send requests to userspace anymore. The feature can be made privileged by means of DISABLE_SYNC_RELEASE mount option implemented by the previous patch. Signed-off-by: Maxim Patlasov --- fs/fuse/file.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH 4/5] fuse: add mount option to disable synchronous release

2014-09-25 Thread Maxim Patlasov
the option by default for unprivileged mounts (allowing system administrator to configure it like "user_allow_other"). Signed-off-by: Maxim Patlasov --- fs/fuse/file.c |3 ++- fs/fuse/fuse_i.h |3 +++ fs/fuse/inode.c |8 3 files changed, 13 insertions(+), 1 deletio

[PATCH 3/5] fuse: wait for end of IO on release

2014-09-25 Thread Maxim Patlasov
async I/O, its callbacks (fuse_readpages_end and fuse_writepage_finish) calling fuse_file_put cannot be the last holders of fuse file anymore. To emphasize the fact, the patch replaces fuse_file_put with __fuse_file_put there. Signed-off-by: Maxim Patlasov --- fs/fuse/fil

[PATCH 1/5] fuse: add FOPEN_SYNC_RELEASE flag to ff->open_flags

2014-09-25 Thread Maxim Patlasov
The feature will be governed by fuse file open flag FOPEN_SYNC_RELEASE. Userspace can enable it on per file basis in the same way as for FOPEN_KEEP_CACHE or FOPEN_DIRECT_IO. Signed-off-by: Maxim Patlasov --- include/uapi/linux/fuse.h |3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH 2/5] fuse: cosmetic rework of fuse_send_readpages

2014-09-25 Thread Maxim Patlasov
The patch change arguments of fuse_send_readpages to give it access to inode (will be used in the next patch of patch-set). The change is cosmetic, no logic changed. Signed-off-by: Maxim Patlasov --- fs/fuse/file.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions

[PATCH 0/5] fuse: handle release synchronously (v4)

2014-09-25 Thread Maxim Patlasov
Given the problem has existed for fuseblk mount for long time and there is no reasonable solution now, I put it aside for the future. Thanks, Maxim --- Maxim Patlasov (5): fuse: add FOPEN_SYNC_RELEASE flag to ff->open_flags fuse: cosmetic rework of fuse_send_readpages f

[PATCH 0/5] fuse: handle release synchronously (v4)

2014-09-25 Thread Maxim Patlasov
and there is no reasonable solution now, I put it aside for the future. Thanks, Maxim --- Maxim Patlasov (5): fuse: add FOPEN_SYNC_RELEASE flag to ff-open_flags fuse: cosmetic rework of fuse_send_readpages fuse: wait for end of IO on release fuse: add mount option to disable

[PATCH 2/5] fuse: cosmetic rework of fuse_send_readpages

2014-09-25 Thread Maxim Patlasov
The patch change arguments of fuse_send_readpages to give it access to inode (will be used in the next patch of patch-set). The change is cosmetic, no logic changed. Signed-off-by: Maxim Patlasov mpatla...@parallels.com --- fs/fuse/file.c | 22 -- 1 file changed, 12

[PATCH 1/5] fuse: add FOPEN_SYNC_RELEASE flag to ff-open_flags

2014-09-25 Thread Maxim Patlasov
The feature will be governed by fuse file open flag FOPEN_SYNC_RELEASE. Userspace can enable it on per file basis in the same way as for FOPEN_KEEP_CACHE or FOPEN_DIRECT_IO. Signed-off-by: Maxim Patlasov mpatla...@parallels.com --- include/uapi/linux/fuse.h |3 +++ 1 file changed, 3

[PATCH 3/5] fuse: wait for end of IO on release

2014-09-25 Thread Maxim Patlasov
, its callbacks (fuse_readpages_end and fuse_writepage_finish) calling fuse_file_put cannot be the last holders of fuse file anymore. To emphasize the fact, the patch replaces fuse_file_put with __fuse_file_put there. Signed-off-by: Maxim Patlasov mpatla...@parallels.com --- fs/fuse/file.c | 71

[PATCH 4/5] fuse: add mount option to disable synchronous release

2014-09-25 Thread Maxim Patlasov
the option by default for unprivileged mounts (allowing system administrator to configure it like user_allow_other). Signed-off-by: Maxim Patlasov mpatla...@parallels.com --- fs/fuse/file.c |3 ++- fs/fuse/fuse_i.h |3 +++ fs/fuse/inode.c |8 3 files changed, 13 insertions

[PATCH 5/5] fuse: enable close_wait synchronous release

2014-09-25 Thread Maxim Patlasov
, it's always safe because callbacks don't send requests to userspace anymore. The feature can be made privileged by means of DISABLE_SYNC_RELEASE mount option implemented by the previous patch. Signed-off-by: Maxim Patlasov mpatla...@parallels.com --- fs/fuse/file.c |3 ++- 1 file changed, 2

Re: [PATCH 5/6] fuse: fix synchronous case of fuse_file_put()

2014-09-24 Thread Maxim Patlasov
On 09/16/2014 12:19 PM, Miklos Szeredi wrote: On Thu, Sep 11, 2014 at 6:14 PM, Maxim Patlasov wrote: I really need your help to proceed with this patch. Could you please explain what those places are where we should allow interruption. BTW, as for "just an optimization", I'v

Re: [PATCH 5/6] fuse: fix synchronous case of fuse_file_put()

2014-09-24 Thread Maxim Patlasov
On 09/16/2014 12:19 PM, Miklos Szeredi wrote: On Thu, Sep 11, 2014 at 6:14 PM, Maxim Patlasov mpatla...@parallels.com wrote: I really need your help to proceed with this patch. Could you please explain what those places are where we should allow interruption. BTW, as for just an optimization

Re: [PATCH 5/6] fuse: fix synchronous case of fuse_file_put()

2014-09-11 Thread Maxim Patlasov
On 08/22/2014 06:08 PM, Miklos Szeredi wrote: On Thu, Aug 21, 2014 at 6:09 PM, Maxim Patlasov wrote: If fuse_file_put() is called with sync==true, the user may be blocked for a while, until userspace ACKs our FUSE_RELEASE request. This blocking must be uninterruptible. Otherwise request could

Re: [PATCH 5/6] fuse: fix synchronous case of fuse_file_put()

2014-09-11 Thread Maxim Patlasov
On 08/22/2014 06:08 PM, Miklos Szeredi wrote: On Thu, Aug 21, 2014 at 6:09 PM, Maxim Patlasov mpatla...@parallels.com wrote: If fuse_file_put() is called with sync==true, the user may be blocked for a while, until userspace ACKs our FUSE_RELEASE request. This blocking must be uninterruptible

Re: [PATCH 0/2] fuse: fix regression in fuse_get_user_pages()

2014-09-10 Thread Maxim Patlasov
On 09/10/2014 01:51 PM, Miklos Szeredi wrote: On Wed, Sep 03, 2014 at 02:10:23PM +0400, Maxim Patlasov wrote: Hi, The patchset fixes a regression introduced by the following commits: c7f3888ad7f0 ("switch iov_iter_get_pages() to passing maximal number of pages") c9c37e2e6378 (&qu

Re: [PATCH 0/2] fuse: fix regression in fuse_get_user_pages()

2014-09-10 Thread Maxim Patlasov
On 09/10/2014 01:51 PM, Miklos Szeredi wrote: On Wed, Sep 03, 2014 at 02:10:23PM +0400, Maxim Patlasov wrote: Hi, The patchset fixes a regression introduced by the following commits: c7f3888ad7f0 (switch iov_iter_get_pages() to passing maximal number of pages) c9c37e2e6378 (fuse: switch

[PATCH 2/2] fuse: fuse_get_user_pages(): do not pack more data than requested

2014-09-03 Thread Maxim Patlasov
ated "maxsize" to the helper. Reported-by: Werner Baumann Signed-off-by: Maxim Patlasov --- fs/fuse/file.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 40ac262..1d2bb70 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/f

[PATCH 1/2] vfs: switch iov_iter_get_pages() to passing maximal size

2014-09-03 Thread Maxim Patlasov
The patch reverts the commit c7f3888ad7f0 ("switch iov_iter_get_pages() to passing maximal number of pages") because FUSE do need maxsize argument that existed before that commit. Signed-off-by: Maxim Patlasov --- fs/direct-io.c |2 +- fs/fuse/file.c |4 ++-- inc

[PATCH 0/2] fuse: fix regression in fuse_get_user_pages()

2014-09-03 Thread Maxim Patlasov
dd if=/dev/zero of=/mnt/owncloud/test.txt bs=20417 count=1 > fails. Thanks, Maxim --- Maxim Patlasov (2): vfs: switch iov_iter_get_pages() to passing maximal size fuse: fuse_get_user_pages(): do not pack more data than requested fs/direct-io.c |2 +- fs/fuse/file.c

[PATCH 0/2] fuse: fix regression in fuse_get_user_pages()

2014-09-03 Thread Maxim Patlasov
count=1 fails. Thanks, Maxim --- Maxim Patlasov (2): vfs: switch iov_iter_get_pages() to passing maximal size fuse: fuse_get_user_pages(): do not pack more data than requested fs/direct-io.c |2 +- fs/fuse/file.c | 13 + include/linux/uio.h |2 +- mm

[PATCH 1/2] vfs: switch iov_iter_get_pages() to passing maximal size

2014-09-03 Thread Maxim Patlasov
The patch reverts the commit c7f3888ad7f0 (switch iov_iter_get_pages() to passing maximal number of pages) because FUSE do need maxsize argument that existed before that commit. Signed-off-by: Maxim Patlasov mpatla...@parallels.com --- fs/direct-io.c |2 +- fs/fuse/file.c |4

[PATCH 2/2] fuse: fuse_get_user_pages(): do not pack more data than requested

2014-09-03 Thread Maxim Patlasov
werner.baum...@onlinehome.de Signed-off-by: Maxim Patlasov mpatla...@parallels.com --- fs/fuse/file.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 40ac262..1d2bb70 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -1303,10 +1303,15

Re: [PATCH v1 5/9] block: loop: convert to blk-mq

2014-08-29 Thread Maxim Patlasov
On 08/28/2014 06:06 AM, Ming Lei wrote: On 8/28/14, Maxim Patlasov wrote: On 08/21/2014 09:44 AM, Ming Lei wrote: On Wed, Aug 20, 2014 at 4:50 AM, Jens Axboe wrote: Reworked a bit more: http://git.kernel.dk/?p=linux-block.git;a=commit;h=a323185a761b9a54dc340d383695b4205ea258b6 One big

Re: [PATCH v1 5/9] block: loop: convert to blk-mq

2014-08-29 Thread Maxim Patlasov
On 8/28/14, Zach Brown wrote: On Wed, Aug 27, 2014 at 09:19:36PM +0400, Maxim Patlasov wrote: On 08/27/2014 08:29 PM, Benjamin LaHaise wrote: On Wed, Aug 27, 2014 at 08:08:59PM +0400, Maxim Patlasov wrote: ... 1) /dev/loop0 of 3.17.0-rc1 with Ming's patches applied -- 11K iops 2) the same

Re: [PATCH v1 5/9] block: loop: convert to blk-mq

2014-08-29 Thread Maxim Patlasov
On 8/28/14, Zach Brownz...@zabbo.net wrote: On Wed, Aug 27, 2014 at 09:19:36PM +0400, Maxim Patlasov wrote: On 08/27/2014 08:29 PM, Benjamin LaHaise wrote: On Wed, Aug 27, 2014 at 08:08:59PM +0400, Maxim Patlasov wrote: ... 1) /dev/loop0 of 3.17.0-rc1 with Ming's patches applied -- 11K iops

Re: [PATCH v1 5/9] block: loop: convert to blk-mq

2014-08-29 Thread Maxim Patlasov
On 08/28/2014 06:06 AM, Ming Lei wrote: On 8/28/14, Maxim Patlasov mpatla...@parallels.com wrote: On 08/21/2014 09:44 AM, Ming Lei wrote: On Wed, Aug 20, 2014 at 4:50 AM, Jens Axboe ax...@kernel.dk wrote: Reworked a bit more: http://git.kernel.dk/?p=linux-block.git;a=commit;h

Re: [PATCH v1 5/9] block: loop: convert to blk-mq

2014-08-27 Thread Maxim Patlasov
On 08/27/2014 08:29 PM, Benjamin LaHaise wrote: On Wed, Aug 27, 2014 at 08:08:59PM +0400, Maxim Patlasov wrote: ... 1) /dev/loop0 of 3.17.0-rc1 with Ming's patches applied -- 11K iops 2) the same as above, but call loop_queue_work() directly from loop_queue_rq() -- 270K iops 3) /dev/nullb0

Re: [PATCH v1 5/9] block: loop: convert to blk-mq

2014-08-27 Thread Maxim Patlasov
On 08/21/2014 09:44 AM, Ming Lei wrote: On Wed, Aug 20, 2014 at 4:50 AM, Jens Axboe wrote: Reworked a bit more: http://git.kernel.dk/?p=linux-block.git;a=commit;h=a323185a761b9a54dc340d383695b4205ea258b6 One big problem of the commit is that it is basically a serialized workqueue because

Re: [PATCH v1 5/9] block: loop: convert to blk-mq

2014-08-27 Thread Maxim Patlasov
On 08/21/2014 09:44 AM, Ming Lei wrote: On Wed, Aug 20, 2014 at 4:50 AM, Jens Axboe ax...@kernel.dk wrote: Reworked a bit more: http://git.kernel.dk/?p=linux-block.git;a=commit;h=a323185a761b9a54dc340d383695b4205ea258b6 One big problem of the commit is that it is basically a serialized

Re: [PATCH v1 5/9] block: loop: convert to blk-mq

2014-08-27 Thread Maxim Patlasov
On 08/27/2014 08:29 PM, Benjamin LaHaise wrote: On Wed, Aug 27, 2014 at 08:08:59PM +0400, Maxim Patlasov wrote: ... 1) /dev/loop0 of 3.17.0-rc1 with Ming's patches applied -- 11K iops 2) the same as above, but call loop_queue_work() directly from loop_queue_rq() -- 270K iops 3) /dev/nullb0

[PATCH 3/6] fuse: wait for end of IO on release (v2)

2014-08-26 Thread Maxim Patlasov
ing around __fuse_file_put() Signed-off-by: Maxim Patlasov --- fs/fuse/file.c | 71 1 file changed, 66 insertions(+), 5 deletions(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 7723b3f..8713e62 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c

[PATCH 3/6] fuse: wait for end of IO on release (v2)

2014-08-26 Thread Maxim Patlasov
__fuse_file_put() Signed-off-by: Maxim Patlasov mpatla...@parallels.com --- fs/fuse/file.c | 71 1 file changed, 66 insertions(+), 5 deletions(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 7723b3f..8713e62 100644 --- a/fs/fuse/file.c +++ b/fs

Re: [PATCH 5/6] fuse: fix synchronous case of fuse_file_put()

2014-08-25 Thread Maxim Patlasov
On 08/22/2014 06:08 PM, Miklos Szeredi wrote: On Thu, Aug 21, 2014 at 6:09 PM, Maxim Patlasov wrote: If fuse_file_put() is called with sync==true, the user may be blocked for a while, until userspace ACKs our FUSE_RELEASE request. This blocking must be uninterruptible. Otherwise request could

Re: [PATCH 4/6] fuse: enable close_wait synchronous release

2014-08-25 Thread Maxim Patlasov
On 08/22/2014 06:04 PM, Miklos Szeredi wrote: On Thu, Aug 21, 2014 at 6:09 PM, Maxim Patlasov wrote: The patch enables the feature by passing 'true' to fuse_file_put in fuse_release_common. Previously, this was safe only in special cases when we sure that multi-threaded userspace won't

Re: [PATCH 3/6] fuse: wait for end of IO on release

2014-08-25 Thread Maxim Patlasov
On 08/22/2014 06:00 PM, Miklos Szeredi wrote: On Thu, Aug 21, 2014 at 6:08 PM, Maxim Patlasov wrote: There are two types of I/O activity that can be "in progress" at the time of fuse_release() execution: asynchronous read-ahead and write-back. The patch ensures that they are comple

Re: [PATCH 3/6] fuse: wait for end of IO on release

2014-08-25 Thread Maxim Patlasov
On 08/22/2014 06:00 PM, Miklos Szeredi wrote: On Thu, Aug 21, 2014 at 6:08 PM, Maxim Patlasov mpatla...@parallels.com wrote: There are two types of I/O activity that can be in progress at the time of fuse_release() execution: asynchronous read-ahead and write-back. The patch ensures

Re: [PATCH 4/6] fuse: enable close_wait synchronous release

2014-08-25 Thread Maxim Patlasov
On 08/22/2014 06:04 PM, Miklos Szeredi wrote: On Thu, Aug 21, 2014 at 6:09 PM, Maxim Patlasov mpatla...@parallels.com wrote: The patch enables the feature by passing 'true' to fuse_file_put in fuse_release_common. Previously, this was safe only in special cases when we sure that multi-threaded

Re: [PATCH 5/6] fuse: fix synchronous case of fuse_file_put()

2014-08-25 Thread Maxim Patlasov
On 08/22/2014 06:08 PM, Miklos Szeredi wrote: On Thu, Aug 21, 2014 at 6:09 PM, Maxim Patlasov mpatla...@parallels.com wrote: If fuse_file_put() is called with sync==true, the user may be blocked for a while, until userspace ACKs our FUSE_RELEASE request. This blocking must be uninterruptible

[PATCH 6/6] fuse: add mount option to disable synchronous release

2014-08-21 Thread Maxim Patlasov
is not completed by fuse daemon yet. To make testing such use cases easier, the patch introduces DISABLE_SYNC_RELEASE mount option which effectively mask out FOPEN_SYNC_RELEASE flag. Signed-off-by: Maxim Patlasov --- --- fs/fuse/file.c |3 ++- fs/fuse/fuse_i.h |3 +++ fs/fuse/inode.c |8

[PATCH 5/6] fuse: fix synchronous case of fuse_file_put()

2014-08-21 Thread Maxim Patlasov
If fuse_file_put() is called with sync==true, the user may be blocked for a while, until userspace ACKs our FUSE_RELEASE request. This blocking must be uninterruptible. Otherwise request could be interrupted, but file association in user space remains. Signed-off-by: Maxim Patlasov --- fs/fuse

[PATCH 2/6] fuse: cosmetic rework of fuse_send_readpages

2014-08-21 Thread Maxim Patlasov
The patch change arguments of fuse_send_readpages to give it access to inode (will be used in the next patch of patch-set). The change is cosmetic, no logic changed. Signed-off-by: Maxim Patlasov --- fs/fuse/file.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions

[PATCH 4/6] fuse: enable close_wait synchronous release

2014-08-21 Thread Maxim Patlasov
, it's always safe because callbacks don't send requests to userspace anymore. Signed-off-by: Maxim Patlasov --- fs/fuse/file.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 73bce1b..cd55488 100644 --- a/fs/fuse/file.c +++ b/fs/fuse

[PATCH 3/6] fuse: wait for end of IO on release

2014-08-21 Thread Maxim Patlasov
async I/O, its callbacks (fuse_readpages_end and fuse_writepage_finish) calling fuse_file_put cannot be the last holders of fuse file anymore. To emphasize the fact, the patch replaces fuse_file_put with __fuse_file_put there. Signed-off-by: Maxim Patlasov --- fs/fuse/fil

[PATCH 1/6] fuse: add FOPEN_SYNC_RELEASE flag to ff->open_flags

2014-08-21 Thread Maxim Patlasov
The feature will be governed by fuse file open flag FOPEN_SYNC_RELEASE. Userspace can enable it on per file basis in the same way as for FOPEN_KEEP_CACHE or FOPEN_DIRECT_IO. Signed-off-by: Maxim Patlasov --- include/uapi/linux/fuse.h |3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH 0/6] fuse: handle release synchronously (v3)

2014-08-21 Thread Maxim Patlasov
d of "wait on close") - enabled feature on per file basis (instead of global fuse_conn parameter) - added "disable_sync_release" mount option - rebased on v3.17-rc1 tag of Linus' tree. Thanks, Maxim --- Maxim Patlasov (6): fuse: add FOPEN_SYNC_RELEASE flag to ff-&g

[PATCH 1/6] fuse: add FOPEN_SYNC_RELEASE flag to ff-open_flags

2014-08-21 Thread Maxim Patlasov
The feature will be governed by fuse file open flag FOPEN_SYNC_RELEASE. Userspace can enable it on per file basis in the same way as for FOPEN_KEEP_CACHE or FOPEN_DIRECT_IO. Signed-off-by: Maxim Patlasov mpatla...@parallels.com --- include/uapi/linux/fuse.h |3 +++ 1 file changed, 3

[PATCH 0/6] fuse: handle release synchronously (v3)

2014-08-21 Thread Maxim Patlasov
basis (instead of global fuse_conn parameter) - added disable_sync_release mount option - rebased on v3.17-rc1 tag of Linus' tree. Thanks, Maxim --- Maxim Patlasov (6): fuse: add FOPEN_SYNC_RELEASE flag to ff-open_flags fuse: cosmetic rework of fuse_send_readpages fuse: wait

[PATCH 2/6] fuse: cosmetic rework of fuse_send_readpages

2014-08-21 Thread Maxim Patlasov
The patch change arguments of fuse_send_readpages to give it access to inode (will be used in the next patch of patch-set). The change is cosmetic, no logic changed. Signed-off-by: Maxim Patlasov mpatla...@parallels.com --- fs/fuse/file.c | 22 -- 1 file changed, 12

[PATCH 4/6] fuse: enable close_wait synchronous release

2014-08-21 Thread Maxim Patlasov
, it's always safe because callbacks don't send requests to userspace anymore. Signed-off-by: Maxim Patlasov mpatla...@parallels.com --- fs/fuse/file.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 73bce1b..cd55488 100644 --- a/fs/fuse

[PATCH 3/6] fuse: wait for end of IO on release

2014-08-21 Thread Maxim Patlasov
, its callbacks (fuse_readpages_end and fuse_writepage_finish) calling fuse_file_put cannot be the last holders of fuse file anymore. To emphasize the fact, the patch replaces fuse_file_put with __fuse_file_put there. Signed-off-by: Maxim Patlasov mpatla...@parallels.com --- fs/fuse/file.c | 76

[PATCH 5/6] fuse: fix synchronous case of fuse_file_put()

2014-08-21 Thread Maxim Patlasov
If fuse_file_put() is called with sync==true, the user may be blocked for a while, until userspace ACKs our FUSE_RELEASE request. This blocking must be uninterruptible. Otherwise request could be interrupted, but file association in user space remains. Signed-off-by: Maxim Patlasov mpatla

[PATCH 6/6] fuse: add mount option to disable synchronous release

2014-08-21 Thread Maxim Patlasov
is not completed by fuse daemon yet. To make testing such use cases easier, the patch introduces DISABLE_SYNC_RELEASE mount option which effectively mask out FOPEN_SYNC_RELEASE flag. Signed-off-by: Maxim Patlasov mpatla...@parallels.com --- --- fs/fuse/file.c |3 ++- fs/fuse/fuse_i.h |3 +++ fs

  1   2   3   4   5   6   >