[Devel] [PATCH rh7 v1] KVM: x86: set TMR when the interrupt is accepted

2016-02-13 Thread Pavel Butsykin
From: Paolo Bonzini <pbonz...@redhat.com> Do not compute TMR in advance. Instead, set the TMR just before the interrupt is accepted into the IRR. This limits the coupling between IOAPIC and LAPIC. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Pavel Buts

[Devel] [PATCH rh7 v1] kvm fail: TMR for ioapic level interrupts

2016-02-13 Thread Pavel Butsykin
https://jira.sw.ru/browse/PSBM-41387 kvm-unit-tests results: before: /usr/libexec/qemu-kvm -enable-kvm -device pc-testdev -device isa-debug-exit, iobase=0xf4,iosize=0x4 -vnc none -serial stdio -device pci-testdev -kernel /root/kvm-unit-tests/x86/ioapic.flat enabling apic paging enabled cr0 =

[Devel] [PATCH 1/2] fs/fuse: move FUSE_SUPER_MAGIC to magic.h

2018-05-17 Thread Pavel Butsykin
Let's define it only once. Signed-off-by: Pavel Butsykin <pbutsy...@virtuozzo.com> --- drivers/block/ploop/dev.c | 1 - drivers/block/ploop/io_kaio.c | 3 --- fs/fuse/inode.c | 2 -- include/uapi/linux/magic.h| 1 + 4 files changed, 1 insertion(+), 6 deletions(-)

[Devel] [PATCH 0/2] kpcs_probe: check fuse_conn args

2018-05-17 Thread Pavel Butsykin
https://jira.sw.ru/browse/HCI-52 Pavel Butsykin (2): fs/fuse: move FUSE_SUPER_MAGIC to magic.h fs/fuse kio_pcs: check fuse_conn args drivers/block/ploop/dev.c | 5 - drivers/block/ploop/io_kaio.c | 3 --- fs/fuse/inode.c| 2 -- fs/fuse/kio/pcs

[Devel] [PATCH 2/2] fs/fuse kio_pcs: check fuse_conn args

2018-05-17 Thread Pavel Butsykin
Allow initialization of kdirect only for vstorage/pstorage. Signed-off-by: Pavel Butsykin <pbutsy...@virtuozzo.com> --- drivers/block/ploop/dev.c | 4 fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 23 +-- include/linux/fs.h | 5 + 3 files c

Re: [Devel] [PATCH 2/2] fs/fuse kio_pcs: check fuse_conn args

2018-05-17 Thread Pavel Butsykin
On 17.05.2018 13:05, Kirill Tkhai wrote: Hi, Pasha, On 17.05.2018 12:40, Pavel Butsykin wrote: Allow initialization of kdirect only for vstorage/pstorage. Signed-off-by: Pavel Butsykin <pbutsy...@virtuozzo.com> --- drivers/block/ploop/dev.c | 4 fs/fuse/k

[Devel] [PATCH v2 0/2] kpcs_probe: check fuse_conn args

2018-05-17 Thread Pavel Butsykin
https://jira.sw.ru/browse/HCI-52 Changes from v1: - drop the extra checks in kpcs_probe() - replace printk(KERN_ERR) on pr_err() Pavel Butsykin (2): fs/fuse: move FUSE_SUPER_MAGIC to magic.h fs/fuse kio_pcs: check fuse_conn args drivers/block/ploop/dev.c | 5 - drivers/block

[Devel] [PATCH v2 1/2] fs/fuse: move FUSE_SUPER_MAGIC to magic.h

2018-05-17 Thread Pavel Butsykin
Let's define it only once. Signed-off-by: Pavel Butsykin <pbutsy...@virtuozzo.com> --- drivers/block/ploop/dev.c | 1 - drivers/block/ploop/io_kaio.c | 3 --- fs/fuse/inode.c | 2 -- include/uapi/linux/magic.h| 1 + 4 files changed, 1 insertion(+), 6 deletions(-)

[Devel] [PATCH v2 2/2] fs/fuse kio_pcs: check fuse_conn args

2018-05-17 Thread Pavel Butsykin
Allow initialization of kdirect only for vstorage/pstorage. Signed-off-by: Pavel Butsykin <pbutsy...@virtuozzo.com> --- drivers/block/ploop/dev.c | 4 fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 9 - include/linux/fs.h | 5 + 3 files changed, 9 insertions

Re: [Devel] [PATCH] fs/fuse: set FATTR_FH flag on mtime file flush

2018-06-06 Thread Pavel Butsykin
On 05.06.2018 12:53, Kirill Tkhai wrote: On 04.06.2018 16:57, Pavel Butsykin wrote: If setattr request is for a file, FATTR_FH flag should be set. In fuse_flush_mtime() that is clearly missed. This fix is present in commit 1e18bda, but it wasn't backported because the commit has a lot

[Devel] [PATCH v2 3/4] fs/fuse: export fuse_release_ff() and fuse_write_file()

2018-06-09 Thread Pavel Butsykin
This allows to use these functions in pcs_fuse_kdirect module and needed for next patch. Signed-off-by: Pavel Butsykin --- fs/fuse/file.c | 5 +++-- fs/fuse/fuse_i.h | 4 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index f9a0da25a9df

[Devel] [PATCH v2 0/4] fuse_kdirect: fsync hungs after unlink fixes

2018-06-09 Thread Pavel Butsykin
#VSTOR-10635 Changes from v1: - separate patch for moving pcs_ireq_queue_fail() (1) - add zeroing of di->size.required (2) - move export fuse_release_ff/()fuse_write_file() in a separate patch (3) Pavel Butsykin (4): fs/fuse kio_pcs: move pcs_ireq_queue_fail fs/fuse kio_pcs: handle er

[Devel] [PATCH v2 2/4] fs/fuse kio_pcs: handle error of submit_size_grow()

2018-06-09 Thread Pavel Butsykin
Before continuing write requests, we need to check the procedure size grow was successful. If the size attribute of a file failed to increase, it makes no sense to continue to push write requests because they will not be able to succeed until the file size will match. Signed-off-by: Pavel

[Devel] [PATCH v2 4/4] fs/fuse kio_pcs: pass the file handle for FUSE_SETATTR request

2018-06-09 Thread Pavel Butsykin
Add to pass the file handle (if it is) for FUSE_SETATTR request inside submit_size_grow(). Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 8 1 file changed, 8 insertions(+) diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c

[Devel] [PATCH v2 1/4] fs/fuse kio_pcs: move pcs_ireq_queue_fail()

2018-06-09 Thread Pavel Butsykin
to pcs_req.c and make it exported. Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_map.c | 34 -- fs/fuse/kio/pcs/pcs_req.c | 31 +++ fs/fuse/kio/pcs/pcs_req.h | 2 ++ 3 files changed, 33 insertions(+), 34 deletions(-) diff --git

[Devel] [PATCH 1/2] fs/fuse kio_pcs: handle error of submit_size_grow()

2018-06-07 Thread Pavel Butsykin
Before continuing write requests, we need to check the procedure size grow was successful. If the size attribute of a file failed to increase, it makes no sense to continue to push write requests because they will not be able to succeed until the file size will match. Signed-off-by: Pavel

[Devel] [PATCH 0/2] fuse_kdirect: fsync hungs after unlink fixes

2018-06-07 Thread Pavel Butsykin
#VSTOR-10635 Pavel Butsykin (2): fs/fuse kio_pcs: handle error of submit_size_grow() fs/fuse kio_pcs: pass the file handle for FUSE_SETATTR request fs/fuse/file.c | 5 +++-- fs/fuse/fuse_i.h | 4 fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 22

[Devel] [PATCH 2/2] fs/fuse kio_pcs: pass the file handle for FUSE_SETATTR request

2018-06-07 Thread Pavel Butsykin
Add to pass the file handle (if it is) for FUSE_SETATTR request inside submit_size_grow(). Signed-off-by: Pavel Butsykin --- fs/fuse/file.c | 5 +++-- fs/fuse/fuse_i.h | 4 fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 8 3 files changed, 15 insertions

[Devel] [PATCH V2] fs/fuse: disable optimization fuse and kio_pcs in debug kernel

2018-06-08 Thread Pavel Butsykin
Signed-off-by: Pavel Butsykin --- configs/kernel-3.10.0-x86_64-debug.config | 2 ++ fs/fuse/Kconfig | 6 ++ fs/fuse/Makefile | 22 ++ 3 files changed, 30 insertions(+) diff --git a/configs/kernel-3.10.0-x86_64

Re: [Devel] [PATCH V2] fs/fuse: disable optimization fuse and kio_pcs in debug kernel

2018-06-08 Thread Pavel Butsykin
. After the stabilization of fuse/fuse_kio_pcs, this patch can be reverted. On 08.06.2018 13:01, Pavel Butsykin wrote: Signed-off-by: Pavel Butsykin Reviewed-by: Kirill Tkhai --- configs/kernel-3.10.0-x86_64-debug.config | 2 ++ fs/fuse/Kconfig | 6 ++ fs

[Devel] [PATCH] fs/fuse: disable optimization fuse and kio_pcs in debug kernel

2018-06-08 Thread Pavel Butsykin
Signed-off-by: Pavel Butsykin --- configs/kernel-3.10.0-x86_64-debug.config | 2 ++ fs/fuse/Kconfig | 6 ++ fs/fuse/Makefile | 22 ++ 3 files changed, 30 insertions(+) diff --git a/configs/kernel-3.10.0-x86_64

Re: [Devel] [PATCH] fs/fuse: disable optimization fuse and kio_pcs in debug kernel

2018-06-08 Thread Pavel Butsykin
On 08.06.2018 12:41, Kirill Tkhai wrote: On 08.06.2018 12:34, Pavel Butsykin wrote: Signed-off-by: Pavel Butsykin --- configs/kernel-3.10.0-x86_64-debug.config | 2 ++ fs/fuse/Kconfig | 6 ++ fs/fuse/Makefile | 22

Re: [Devel] [PATCH 1/2] fs/fuse kio_pcs: handle error of submit_size_grow()

2018-06-07 Thread Pavel Butsykin
On 07.06.2018 17:40, Pavel Butsykin wrote: Before continuing write requests, we need to check the procedure size grow was successful. If the size attribute of a file failed to increase, it makes no sense to continue to push write requests because they will not be able to succeed until the file

[Devel] [PATCH] fs/fuse: fix debug build "CFLAGS was changed"

2018-06-09 Thread Pavel Butsykin
build error: Makefile.build:49: *** CFLAGS was changed in "./fs/fuse/Makefile". Fix it to use ccflags-y. Stop. See (Documentation/kbuild/makefiles.txt, section 3.7) for details. --- fs/fuse/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fuse/Makefile

[Devel] [PATCH] fs/fuse kio_pcs: some cleanup ireq_on_error_()

2018-06-06 Thread Pavel Butsykin
Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_cluster.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/fs/fuse/kio/pcs/pcs_cluster.c b/fs/fuse/kio/pcs/pcs_cluster.c index 24ec8a5f39a3..5441a357b87d 100644 --- a/fs/fuse/kio/pcs/pcs_cluster.c +++ b/fs/fuse

[Devel] [PATCH] fs/fuse kio_pcs: remove s_subtype check

2018-05-28 Thread Pavel Butsykin
the possibility to mount fuse whith kpcs on any device except vstorage/pstorage, we can remove this check. Signed-off-by: Pavel Butsykin <pbutsy...@virtuozzo.com> --- fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdi

[Devel] [PATCH] fs/fuse: set FATTR_FH flag on mtime file flush

2018-06-04 Thread Pavel Butsykin
. #VSTOR-10676 Signed-off-by: Pavel Butsykin --- fs/fuse/dir.c| 6 +- fs/fuse/file.c | 4 ++-- fs/fuse/fuse_i.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 0ae0344be3c5..b04023bf230a 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse

Re: [Devel] [PATCH 1/2] fuse kio: Do not try to populate fuse_inode::private on second open

2018-10-11 Thread Pavel Butsykin
ple ~0UL), does not > look better, since it makes !fi->private checks > more difficult (also we have a lot free bits > in inode flags). > > Synchronization is "caller owns inode->i_mutex". > > Signed-off-by: Kirill Tkhai Reviewed-by: Pavel Butsykin > --- &

Re: [Devel] [PATCH 2/2] fuse kio: Differ fuse_pcs_kdirect_claim_op() return values

2018-10-11 Thread Pavel Butsykin
On 11.10.2018 18:00, Kirill Tkhai wrote: > Fail open in case of fuse_get_req() was failed, > and leave it successful in case of vstorage-mount > said we can't claim file by kio (e.g., file will > be served by userspace). > > Signed-off-by: Kirill Tkhai Reviewed-by: Pavel Butsy

Re: [Devel] [PATCH] fuse kio: Fix deadlock at pcs_fuse_submit() error path

2018-10-17 Thread Pavel Butsykin
On 17.10.2018 16:57, Kirill Tkhai wrote: > request_end() takes fc->lock, so we in case of error we bump > into deadlock: > > Call Trace: >[] _raw_spin_lock+0x75/0xc0 >[] spin_lock+0x18/0x1b [fuse] >[] request_end+0x265/0x72b [fuse] >[] pcs_fuse_submit+0x9fb/0xaa3 [fuse_kio_pcs]

Re: [Devel] [PATCH] fuse kio: Fix deadlock at pcs_fuse_submit() error path

2018-10-17 Thread Pavel Butsykin
On 17.10.2018 18:43, Kirill Tkhai wrote: > On 17.10.2018 18:06, Pavel Butsykin wrote: >> >> >> On 17.10.2018 16:57, Kirill Tkhai wrote: >>> request_end() takes fc->lock, so we in case of error we bump >>> into deadlock: >>> >>> Call Tra

Re: [Devel] [PATCH] fuse kio: Fix deadlock at pcs_fuse_submit() error path

2018-10-18 Thread Pavel Butsykin
On 18.10.2018 11:55, Pavel Butsykin wrote: > On 18.10.2018 11:35, Kirill Tkhai wrote: >> On 17.10.2018 19:22, Pavel Butsykin wrote: >>> On 17.10.2018 18:43, Kirill Tkhai wrote: >>>> On 17.10.2018 18:06, Pavel Butsykin wrote: >>>>> >&g

Re: [Devel] [PATCH] fuse kio: Fix deadlock at pcs_fuse_submit() error path

2018-10-18 Thread Pavel Butsykin
On 18.10.2018 11:35, Kirill Tkhai wrote: > On 17.10.2018 19:22, Pavel Butsykin wrote: >> On 17.10.2018 18:43, Kirill Tkhai wrote: >>> On 17.10.2018 18:06, Pavel Butsykin wrote: >>>> >>>> >>>> On 17.10.2018 16:57, Kirill Tkhai wrote: >>

Re: [Devel] [PATCH] fuse kio: Fix deadlock at pcs_fuse_submit() error path

2018-10-18 Thread Pavel Butsykin
gt; https://pmc.acronis.com/browse/VSTOR-16246 > > Signed-off-by: Kirill Tkhai Reviewed-by: Pavel Butsykin > --- > fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 10 +++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdir

Re: [Devel] [PATCH RHEL7 COMMIT] fuse kio: Use __maybe_unused

2018-10-16 Thread Pavel Butsykin
dc3e9c04db4 > Author: Kirill Tkhai > Date: Tue Oct 16 18:04:29 2018 +0300 > > fuse kio: Use __maybe_unused > > Signed-off-by: Kirill Tkhai > Reviewed-by: Pavel Butsykin > > = > Patchset description: >

Re: [Devel] [PATCH] fuse kio: Add comment about why we need to wait pending read requests

2018-10-23 Thread Pavel Butsykin
On 23.10.2018 13:01, Kirill Tkhai wrote: > Signed-off-by: Kirill Tkhai > --- > fs/fuse/kio/pcs/pcs_fuse_kdirect.c |7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c > b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c > index

Re: [Devel] [PATCH] fuse kio: Unexport pcs_ioconn_close() and pcs_ioconn_unregister()

2018-10-23 Thread Pavel Butsykin
On 23.10.2018 11:35, Kirill Tkhai wrote: > They are used only in the file they are declared. > > Signed-off-by: Kirill Tkhai Reviewed-by: Pavel Butsykin > --- > fs/fuse/kio/pcs/pcs_sock_io.c |4 ++-- > fs/fuse/kio/pcs/pcs_sock_io.h |5 - > 2 files change

Re: [Devel] [PATCH] fuse kio: Add comment about why we need to wait pending read requests

2018-10-23 Thread Pavel Butsykin
On 23.10.2018 13:19, Kirill Tkhai wrote: > On 23.10.2018 13:15, Pavel Butsykin wrote: >> >> >> On 23.10.2018 13:01, Kirill Tkhai wrote: >>> Signed-off-by: Kirill Tkhai >>> --- >>>fs/fuse/kio/pcs/pcs_fuse_kdirect.c |7 ++- &g

Re: [Devel] [PATCH] fuse kio: Add comment about why we need to wait pending read requests

2018-10-23 Thread Pavel Butsykin
On 23.10.2018 16:38, Kirill Tkhai wrote: > On 23.10.2018 16:08, Pavel Butsykin wrote: >> >> >> On 23.10.2018 13:19, Kirill Tkhai wrote: >>> On 23.10.2018 13:15, Pavel Butsykin wrote: >>>> >>>> >>>> On 23.10.2018 13:01, Kirill Tkha

Re: [Devel] [PATCH 1/3] fuse: Fix parse_fuse_opt() return values wrong interpretation

2018-10-30 Thread Pavel Butsykin
able parameters. > > Signed-off-by: Kirill Tkhai Reviewed-by: Pavel Butsykin > --- > fs/fuse/inode.c |8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c > index ca9a146d39fa..0695b79c4c50 100644 > ---

Re: [Devel] [PATCH 2/3] fuse: Prohibit kio engine from containers

2018-10-30 Thread Pavel Butsykin
acronis.com/browse/VSTOR-16325 > > Signed-off-by: Kirill Tkhai Reviewed-by: Pavel Butsykin > --- > fs/fuse/inode.c |2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c > index 0695b79c4c50..34e52262d37e 100644 > --- a/fs/fus

Re: [Devel] [PATCH 3/3] fuse: Switch unused engines off in Kconfig

2018-10-30 Thread Pavel Butsykin
ch disables > them by default. Some time later, if there is no at least > a single using of them in any purpose, we'll completely > drop them. > > https://pmc.acronis.com/browse/VSTOR-16325 > > Signed-off-by: Kirill Tkhai Reviewed-by: Pavel Butsykin > --- > confi

Re: [Devel] [PATCH] fuse kio: Fix deadlock in kpcs_req_send()

2018-10-09 Thread Pavel Butsykin
hould go on top of "[PATCH RFC] fs/fuse kio_pcs: fix double free of synchronous requests"] https://pmc.acronis.com/browse/VSTOR-15924 Signed-off-by: Kirill Tkhai Reviewed-by: Pavel Butsykin Actually FUSE_SETATTR can't be async, but extra precaution won't hurt.. --- fs/fuse/kio/pcs/

Re: [Devel] [PATCH] fuse kio: Return possibility to handle files served in userspace

2018-10-10 Thread Pavel Butsykin
On 10.10.2018 19:43, Kirill Tkhai wrote: > Fallback to old behavior, when !fi->private files are > served in userspace. > > https://pmc.acronis.com/browse/VSTOR-15947 > > Signed-off-by: Kirill Tkhai Acked-by: Pavel Butsykin > --- > fs/fuse/kio/pc

[Devel] [PATCH] fs/fuse kio: invalidate files for kio

2019-01-18 Thread Pavel Butsykin
and fuse_abort_conn() for kio. #VSTOR-19620 Signed-off-by: Pavel Butsykin --- fs/fuse/fuse_i.h | 4 fs/fuse/inode.c| 8 ++-- fs/fuse/kio/pcs/fuse_io.c | 5 + fs/fuse/kio/pcs/pcs_cluster.c | 2 ++ fs/fuse/kio/pcs/pcs_cluster.h

Re: [Devel] [PATCH] fs/fuse kio: invalidate files for kio

2019-01-21 Thread Pavel Butsykin
ones. > It is exactly why it was not made in the first place. > > On Fri, Jan 18, 2019 at 4:44 PM Pavel Butsykin > wrote: >> >> Make fuse_invalidate_files() work for kio. This is necessary to maintain >> vstorage revoke in FPath mode. To do this, let's add a li

Re: [Devel] [PATCH] fs/fuse kio: invalidate files for kio

2019-01-21 Thread Pavel Butsykin
/git/mszeredi/fuse.git/log/?h=for-next > > I'm going to backport them to us next week. > > On 21.01.2019 19:27, Pavel Butsykin wrote: >> I agree fc->lock is evil, but fc->lock is not a necessary condition for >> implementation kio queue, so let's look at my second tr

[Devel] [PATCH v2] fs/fuse kio: invalidate files for kio

2019-01-21 Thread Pavel Butsykin
and fuse_abort_conn() for kio. #VSTOR-19620 Signed-off-by: Pavel Butsykin --- fs/fuse/fuse_i.h | 4 fs/fuse/inode.c| 8 ++-- fs/fuse/kio/pcs/fuse_io.c | 5 + fs/fuse/kio/pcs/pcs_client_types.h | 2 ++ fs/fuse/kio/pcs/pcs_cluster.h

Re: [Devel] [PATCH] fs/fuse: move FUSE_S_FAIL_IMMEDIATELY check before kio req send

2019-01-23 Thread Pavel Butsykin
23.01.2019 16:55, Kirill Tkhai пишет: > On 23.01.2019 14:49, Pavel Butsykin wrote: >> Fuse file with FUSE_S_FAIL_IMMEDIATELY state should not allow to execute new >> requests. But in case of kio requests it doesn't work because the status >> check >> is located behind

[Devel] [PATCH] fs/fuse: move FUSE_S_FAIL_IMMEDIATELY check before kio req send

2019-01-23 Thread Pavel Butsykin
q->end(fc, req) in __fuse_request_send() because it was only needed to clenup kio setattr request after pcs_kio_setattr_handle(). Signed-off-by: Pavel Butsykin --- fs/fuse/dev.c | 40 +++- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/fs/f

[Devel] [PATCH] fs/fuse kio: fix mapping dereference in a dead map

2018-12-21 Thread Pavel Butsykin
MAP_ARGS() contains reference to struct pcs_map_entry::mapping, which can be NULL if map is dead. #VSTOR-19267 Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_map.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/fuse/kio/pcs/pcs_map.c b/fs/fuse/kio/pcs/pcs_map.c

[Devel] [PATCH v2] fs/fuse kio: deny unavailable ioctl's in kio

2018-12-26 Thread Pavel Butsykin
in kio. Signed-off-by: Pavel Butsykin --- fs/fuse/fuse_i.h | 2 ++ fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 27 --- fs/fuse/kio/pcs/pcs_ioctl.h| 5 + 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/fs/fuse/fuse_i.h b/fs/fuse

[Devel] [PATCH] fs/fuse kio: missed cleanup for interrupted shrink request

2018-12-17 Thread Pavel Butsykin
t be interrupted in order to avoid racing with request_end(). But it's still possible race with req->end callback, so let's also fix the wait condition. #VSTOR-19074 Signed-off-by: Pavel Butsykin --- fs/fuse/dev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/fuse/dev.c b/

[Devel] [PATCH] fs/fuse kio: satisfy pure FALLOC_FL_KEEP_SIZE immediately

2018-12-24 Thread Pavel Butsykin
mutex_is_locked, since all other mode combinations either have to be under mutex or not valid. #VSTOR-19317 Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c b/fs/fuse

[Devel] [PATCH 1/2] fs/fuse kio: backport immediate-write attribute handle

2018-12-24 Thread Pavel Butsykin
This patch provides support PCS_FATTR_IMMEDIATE_WRITE attribute for KIO module. #VSTOR-19324 Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_cs.c | 3 ++- fs/fuse/kio/pcs/pcs_prot_types.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/fuse/kio/pcs

[Devel] [PATCH 2/2] fs/fuse kio: add support PCS_CS_IO_SYNC flag

2018-12-24 Thread Pavel Butsykin
In case PCS_FATTR_IMMEDIATE_WRITE attribute is set, all write operations must be synchronous, although now it's not and there is only PCS_CS_WRITE_SYNC_REQ for PCS_REQ_T_WRITE. Adding PCS_CS_IO_SYNC flag makes it possible to handle any write request synchronously. Signed-off-by: Pavel Butsykin

[Devel] [PATCH 0/2] backport immediate-write attribute for Fast-path

2018-12-24 Thread Pavel Butsykin
#VSTOR-19324 Pavel Butsykin (2): fs/fuse kio: backport immediate-write attribute handle fs/fuse kio: add support PCS_CS_IO_SYNC flag fs/fuse/kio/pcs/pcs_cs.c | 6 +- fs/fuse/kio/pcs/pcs_cs_prot.h| 4 fs/fuse/kio/pcs/pcs_prot_types.h | 3 +++ 3 files changed, 12

Re: [Devel] [PATCH] fs/fuse kio: satisfy pure FALLOC_FL_KEEP_SIZE immediately

2018-12-25 Thread Pavel Butsykin
On 25.12.2018 12:28, Kirill Tkhai wrote: > On 24.12.2018 15:54, Pavel Butsykin wrote: >> Fallocate without mutex lock can race with setattr size request, as a result, >> may be various problems, including incorrectly changed file size. At the same >> time pure FALLOC_FL_K

Re: [Devel] [PATCH] fs/fuse kio: satisfy pure FALLOC_FL_KEEP_SIZE immediately

2018-12-25 Thread Pavel Butsykin
On 25.12.2018 12:28, Kirill Tkhai wrote: > On 24.12.2018 15:54, Pavel Butsykin wrote: >> Fallocate without mutex lock can race with setattr size request, as a result, >> may be various problems, including incorrectly changed file size. At the same >> time pure FALLOC_FL_K

Re: [Devel] [PATCH] fs/fuse kio: deny unavailable ioctl's in kio

2018-12-25 Thread Pavel Butsykin
pls ignore this. On 25.12.2018 18:11, Pavel Butsykin wrote: > There are some ioctl's that were made to service the kio module, and they > should not be available to user app. > > Also there are two ioctls PCS_IOC_NOCSUMONREAD and PCS_IOC_NOWRITEDELAY that > must be handled in

[Devel] [PATCH] fs/fuse kio: deny unavailable ioctl's in kio

2018-12-25 Thread Pavel Butsykin
in kio. #VSTOR-19332 Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 19 --- fs/fuse/kio/pcs/pcs_ioctl.h| 5 + 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c b/fs/fuse/kio/pcs

Re: [Devel] [PATCH 0/3] Fuse KIO: clanup fuse ktrace messages

2018-12-21 Thread Pavel Butsykin
ping On 05.12.2018 21:03, Pavel Butsykin wrote: > #VSTOR-18383 > > Pavel Butsykin (3): >fs/fuse kio: bring fuse ktraces to a common view >fs/fuse kio: disable duplication FUSE_K* messages to debugfs by > default >fs/fuse kio: make it possible t

[Devel] [PATCH] fs/fuse kio: missed clean di->size.op in failed shrink request

2018-12-14 Thread Pavel Butsykin
#VSTOR-18947 Signed-off-by: Pavel Butsykin --- fs/fuse/dev.c | 4 fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index ce75d218025b..6fcbb117aa9c 100644 --- a/fs/fuse/dev.c +++ b/f

Re: [Devel] [PATCH] kio_pcs: Compact the logs and make eyes happy

2018-12-05 Thread Pavel Butsykin
On 04.12.2018 23:13, Pavel Emelianov wrote: > On 12/04/2018 10:28 PM, Pavel Emelyanov wrote: >> On 12/03/2018 05:20 PM, Pavel Butsykin wrote: >>> On 30.11.2018 19:44, Pavel Emelianov wrote: >>>> On 11/30/2018 05:57 PM, Pavel Butsykin wrote: >>>>> Hmm,

[Devel] [PATCH 2/3] fs/fuse kio: fix sreq and msg leak in prepare_map_flush_ireq()

2018-12-03 Thread Pavel Butsykin
Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_map.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/fuse/kio/pcs/pcs_map.c b/fs/fuse/kio/pcs/pcs_map.c index 4bd18c5224ab..1e700dff2043 100644 --- a/fs/fuse/kio/pcs/pcs_map.c +++ b/fs/fuse/kio/pcs/pcs_map.c @@ -3016,6 +3016,8

Re: [Devel] [PATCH 1/3] fs/fuse kio: fix loss of FUSE_FSYNC/FUSE_FLUSH reqs

2018-12-03 Thread Pavel Butsykin
sorry, Not there XD pls, don't ignore this. On 03.12.2018 16:04, Pavel Butsykin wrote: > pls ignore this. > > On 03.12.2018 16:02, Pavel Butsykin wrote: >> Fast-Path can loss fsync/flush requests, because PCS_REQ_T_SYNC >> request set up >> PCS_MAP_FLUSHING flag, bu

Re: [Devel] [PATCH 1/3] fs/fuse kio: fix loss of FUSE_FSYNC/FUSE_FLUSH reqs

2018-12-03 Thread Pavel Butsykin
pls ignore this. On 03.12.2018 16:02, Pavel Butsykin wrote: > Fast-Path can loss fsync/flush requests, because PCS_REQ_T_SYNC request set up > PCS_MAP_FLUSHING flag, but never cleans it. Although initially > PCS_MAP_FLUSHING > flag was created for sync timer, so PCS_REQ_T_SYNC re

Re: [Devel] [PATCH] kio_pcs: Compact the logs and make eyes happy

2018-12-03 Thread Pavel Butsykin
On 30.11.2018 19:44, Pavel Emelianov wrote: > On 11/30/2018 05:57 PM, Pavel Butsykin wrote: >> Hmm, __kfuse_trace() duplicates message to debugfs trace, without '\n' > > Yes, and AFAIS most of the existing messages already come w/o it. More likely logs without '\n' are present m

[Devel] [PATCH 1/3] fs/fuse kio: fix loss of FUSE_FSYNC/FUSE_FLUSH reqs

2018-12-03 Thread Pavel Butsykin
timer_sync flag in prepare_map_flush_ireq() to ignore all sync timer stuff on PCS_REQ_T_SYNC way. Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_map.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/fs/fuse/kio/pcs/pcs_map.c b/fs/fuse/kio/pcs

[Devel] [PATCH 3/3] fs/fuse kio: retry allocation PCS_IREQ_FLUSH request

2018-12-03 Thread Pavel Butsykin
If cslist has changed during request allocation, that is no reason not to run PCS_IREQ_FLUSH. In the case when cslist has changed let's re-allocate the request with new cslist and try it again to fix possible loss of fsync/flush request. Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs

[Devel] [PATCH 0/3] Fuse KIO: fix fsync/flush loss

2018-12-03 Thread Pavel Butsykin
#VSTOR-18475 Pavel Butsykin (3): fs/fuse kio: fix loss of FUSE_FSYNC/FUSE_FLUSH reqs fs/fuse kio: fix sreq and msg leak in prepare_map_flush_ireq() fs/fuse kio: retry allocation PCS_IREQ_FLUSH request fs/fuse/kio/pcs/pcs_map.c | 37 + 1 file changed, 25

Re: [Devel] [PATCH] kio_pcs: Compact the logs and make eyes happy

2018-11-30 Thread Pavel Butsykin
Would you like to fix all FUSE_KTRACE's in the kernel? I see a few more FUSE_KTRACE with '\n'. On 30.11.2018 17:23, Pavel Emelianov wrote: > After a recent (b)log (re)work it was noticed that some extra \n-s crept > into the classical log files. Indeed, the pstorage TRACE() call appends a > \n at

[Devel] [PATCH 1/3] fs/fuse kio: bring fuse ktraces to a common view

2018-12-05 Thread Pavel Butsykin
Since the fuse client adds \n to each message and allows only a single message view, let's bring these to a common view and remove all \n in FUSE_K* messages. https://pmc.acronis.com/browse/VSTOR-18383 Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_cs.c | 2 +- fs/fuse/kio

[Devel] [PATCH 3/3] fs/fuse kio: make it possible to enable TRACE/DTRACE in the release kernel

2018-12-05 Thread Pavel Butsykin
Sometimes it can be very convenient to enable detailed tracing on the release kernel too. Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/fuse_ktrace.h | 6 ++ fs/fuse/kio/pcs/log.h | 10 +++--- fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 2 +- 3 files changed, 10

[Devel] [PATCH 2/3] fs/fuse kio: disable duplication FUSE_K* messages to debugfs by default

2018-12-05 Thread Pavel Butsykin
It's not very polite to put trace messages to debugfs without asking the user, while they are only used for easier debugging fuse_kio_pcs module. This patch disables debugfs tracing by default and makes it possible to enable this traces via debugfs_tracing option. Signed-off-by: Pavel Butsykin

[Devel] [PATCH 0/3] Fuse KIO: clanup fuse ktrace messages

2018-12-05 Thread Pavel Butsykin
#VSTOR-18383 Pavel Butsykin (3): fs/fuse kio: bring fuse ktraces to a common view fs/fuse kio: disable duplication FUSE_K* messages to debugfs by default fs/fuse kio: make it possible to enable TRACE/DTRACE in the release kernel fs/fuse/kio/pcs/fuse_ktrace.h | 6 ++ fs

[Devel] [PATCH] fs/fuse kio: fix getting a non-existent pcs inode in kpcs_kill_requests()

2019-03-26 Thread Pavel Butsykin
Some files may not have pcs inode, so it will be safer to check for !fi->private before using it. Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c b/fs/fuse/kio/

[Devel] [PATCH 1/3] Revert "fs/fuse kio: add warning about jumbo chunks"

2019-03-26 Thread Pavel Butsykin
This reverts commit afb8d534110dbe203e4ae6385cef79b38c9e4771. Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 3 --- fs/fuse/kio/pcs/pcs_mds_prot.h | 2 -- 2 files changed, 5 deletions(-) diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c b/fs/fuse/kio/pcs

[Devel] [PATCH 2/3] fs/fuse kio: sync pcs_mds_sys_info struct

2019-03-26 Thread Pavel Butsykin
For some reason pcs_mds_sys_info structure is different in the kernel and userspace. Let's synchronize it to avoid inaccuracies and discrepancies in the future. Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_client_types.h | 6 +++--- fs/fuse/kio/pcs/pcs_cluster.c | 8 fs

[Devel] [PATCH 0/3] fix jumbo chunk warning

2019-03-26 Thread Pavel Butsykin
Initially the warning was added incorrectly due to unsynchronization of pcs_mds_sys_info structure with the userspace client. Let's sync the structure and fix that. Pavel Butsykin (3): Revert "fs/fuse kio: add warning about jumbo chunks" fs/fuse kio: sync pcs_mds_sys_info struct f

[Devel] [PATCH 3/3] fs/fuse kio: add warning about jumbo chunks

2019-03-26 Thread Pavel Butsykin
KIO doesn't support jumbo chunks yet, so all requests to jumbo chunks are silently redirected to user-space. It will be useful to see a message about this until support has been added to KIO. Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 3 +++ 1 file changed, 3

Re: [Devel] [PATCH] fs/fuse kio: add warning about jumbo chunks

2019-02-12 Thread Pavel Butsykin
pls, ignore this. On 12.02.2019 17:20, Pavel Butsykin wrote: > KIO doesn't support jumbo chunks yet, so all requests to jumbo chunks are > silently redirected to user-space. It will be useful to see a message about > this until support has been added to KIO. > > #VSTOR-20372

[Devel] [PATCH] fs/fuse kio: add warning about jumbo chunks

2019-02-12 Thread Pavel Butsykin
KIO doesn't support jumbo chunks yet, so all requests to jumbo chunks are silently redirected to user-space. It will be useful to see a message about this until support has been added to KIO. #VSTOR-20372 Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 3 +++ fs/fuse/kio

[Devel] [PATCH] fs/fuse kio: add warning about jumbo chunks

2019-02-12 Thread Pavel Butsykin
KIO doesn't support jumbo chunks yet, so all requests to jumbo chunks are silently redirected to user-space. It will be useful to see a message about this until support has been added to KIO. #VSTOR-20372 Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 3 +++ fs/fuse/kio

Re: [Devel] [PATCH] fs/fuse: move FUSE_S_FAIL_IMMEDIATELY check before kio req send

2019-01-24 Thread Pavel Butsykin
Yes, I missed this synchronization idea, the check and list_add should be together, will fix. On 24.01.2019 11:45, Kirill Tkhai wrote: > On 23.01.2019 20:22, Pavel Butsykin wrote: >> >> 23.01.2019 16:55, Kirill Tkhai пишет: >>> On 23.01.2019 14:49, Pavel Butsyk

Re: [Devel] [PATCH] fs/fuse: move FUSE_S_FAIL_IMMEDIATELY check before kio req send

2019-01-24 Thread Pavel Butsykin
On 24.01.2019 12:21, Kirill Tkhai wrote: > On 24.01.2019 12:17, Pavel Butsykin wrote: >> Yes, I missed this synchronization idea, the check and list_add should >> be together, will fix. > > Also, __fuse_request_send() may need to be fixed, since it does not look &g

[Devel] [PATCH 2/2] fs/fuse: fix unsafe killing fiq->pending requests

2019-01-24 Thread Pavel Butsykin
k(>lock); queue_request(fiq, req);<-- add a new request after fuse_invalidate_files(), spin_unlock(>waitq.lock); that's wrong. The patch fixes both problems. Signed-off-by: Pavel Butsykin --- fs/fuse/inode.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/fuse/in

[Devel] [PATCH 1/2] fs/fuse kio: add FUSE_S_FAIL_IMMEDIATELY check in pcs_fuse_submit()

2019-01-24 Thread Pavel Butsykin
Fuse file with FUSE_S_FAIL_IMMEDIATELY state should not allow to execute new requests. But in case of kio requests it doesn't work because the status check is located behind kio.op->req_send(). To fix this let's add the status check in pcs_fuse_submit(). Signed-off-by: Pavel Butsykin --- N

Re: [Devel] [PATCH 1/2] fs/fuse kio: add FUSE_S_FAIL_IMMEDIATELY check in pcs_fuse_submit()

2019-02-01 Thread Pavel Butsykin
On 01.02.2019 17:24, Kirill Tkhai wrote: > On 24.01.2019 16:12, Pavel Butsykin wrote: >> Fuse file with FUSE_S_FAIL_IMMEDIATELY state should not allow to execute new >> requests. But in case of kio requests it doesn't work because the status >> check >> is loca

Re: [Devel] [PATCH 1/2] fs/fuse kio: add FUSE_S_FAIL_IMMEDIATELY check in pcs_fuse_submit()

2019-02-01 Thread Pavel Butsykin
On 01.02.2019 18:13, Pavel Butsykin wrote: > > > On 01.02.2019 17:24, Kirill Tkhai wrote: >> On 24.01.2019 16:12, Pavel Butsykin wrote: >>> Fuse file with FUSE_S_FAIL_IMMEDIATELY state should not allow to >>> execute new >>> requests. But in ca

[Devel] [PATCH] fs/fuse kio: export fastpath protocol version

2019-04-11 Thread Pavel Butsykin
In order to transfer the logic of the fallback decision to user-space, let's add export fastpath version. #PSBM-93637 Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 6 ++ fs/fuse/kio/pcs/pcs_ioctl.h| 2 +- fs/fuse/kio/pcs/pcs_prot_types.h | 9 ++--- 3

[Devel] [PATCH 4/4] fs/fuse kio: export io_locality

2019-04-15 Thread Pavel Butsykin
We will need this option for performance analysis. Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_cluster_core.c | 1 - fs/fuse/kio/pcs/pcs_map.c | 7 ++- fs/fuse/kio/pcs/pcs_req.h | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/fuse/kio/pcs

[Devel] [PATCH 0/4] KIO performance fixes

2019-04-15 Thread Pavel Butsykin
#VSTOR-11050 This patch-set aims to fix the performance issue with single-thread sequential async reads. Pavel Butsykin (4): fs/fuse kio: fix a typo in worth_to_grow() fs/fuse kio: relax congestion avoidance limits (backport from usermode) fs/fuse kio: add missed sock write

[Devel] [PATCH 1/4] fs/fuse kio: fix a typo in worth_to_grow()

2019-04-15 Thread Pavel Butsykin
It was supposed the function returns true if time has passed less than netlat_cutoff since the request was sent. Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fuse/kio/pcs/pcs_map.c b/fs/fuse/kio/pcs/pcs_map.c

[Devel] [PATCH v2 1/2] fs/fuse kio: sync pcs_mds_sys_info struct

2019-04-15 Thread Pavel Butsykin
For some reason pcs_mds_sys_info structure is different in the kernel and userspace. Let's synchronize it to avoid inaccuracies and discrepancies in the future. Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_client_types.h | 6 +++--- fs/fuse/kio/pcs/pcs_cluster.c | 8 fs

[Devel] [PATCH v2 2/2] fs/fuse kio: add warning about jumbo chunks

2019-04-15 Thread Pavel Butsykin
KIO doesn't support jumbo chunks yet, so all requests to jumbo chunks are silently redirected to user-space. It will be useful to see a message about this until support has been added to KIO. Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 6 ++ 1 file changed, 6

[Devel] [PATCH 3/4] fs/fuse kio: add missed sock write in pcs_sock_sendmsg()

2019-04-15 Thread Pavel Butsykin
We need to write the ready data to socket, in case write_queue list is empty, instead of rescheduling it. This will help maintain a balance between recv and send, because after rescheduling the receive will be called first. Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_sock_io.c | 6

[Devel] [PATCH 2/4] fs/fuse kio: relax congestion avoidance limits (backport from usermode)

2019-04-15 Thread Pavel Butsykin
aggressively. Further observations will show. Signed-off-by: Pavel Butsykin --- fs/fuse/kio/pcs/pcs_cs.c | 26 +- fs/fuse/kio/pcs/pcs_cs.h | 1 + fs/fuse/kio/pcs/pcs_map.c | 7 ++- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/fs/fuse/kio/pcs

[Devel] [PATCH v2 0/2] fix jumbo chunk warning

2019-04-15 Thread Pavel Butsykin
Initially the warning was added incorrectly due to unsynchronization of pcs_mds_sys_info structure with the userspace client. Let's sync the structure and fix that. Pavel Butsykin (2): fs/fuse kio: sync pcs_mds_sys_info struct fs/fuse kio: add warning about jumbo chunks fs/fuse/kio/pcs

[Devel] [PATCH 02/15] fs/fuse kio: create sysfs stat directory

2019-05-17 Thread Pavel Butsykin
This patch implements the interfaces for initialize/finalize kio stat subsystem and adds the creation of stat directory. The sysfs directory will be created separately for each point. Signed-off-by: Pavel Butsykin --- fs/fuse/Makefile | 3 +- fs/fuse/control.c

  1   2   >