[Devel] test

2022-03-17 Thread Liu Kui
Test ___ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel

[Devel] [PATCH RH9] dm-ploop: port the standby mode feature.

2022-10-03 Thread Liu Kui
error too ploop: move to standby after -ENOTCONN too Signed-off-by: Liu Kui --- drivers/md/dm-ploop-map.c| 25 - drivers/md/dm-ploop-target.c | 4 drivers/md/dm-ploop.h| 2 ++ include/linux/blkdev.h | 2 ++ 4 files changed, 32 insertions(+),

[Devel] [PATCH VZ9 1/2] fs/fuse kio: implement memory region to support zero-copy between userapce and kernel space.

2024-05-16 Thread Liu Kui
buffer allocated from the registered MR, together with returned reference for that MR to kernel to complete data transfer to/from kernel. This feature will be used for implementing pcs_krpc. Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_mr.c | 210 +++ fs

[Devel] [PATCH VZ9 2/2] fs/fuse kio: introduce pcs_krpc - export kernel RPC to userspace

2024-05-16 Thread Liu Kui
ds to the FUSE_IOC_KIO_CALL ioctl for pcs_krpc management. - Kernel RPC ops is changed to demux msgs to pcs_cs or pcs_krpc https://pmc.acronis.work/browse/VSTOR-82613 Signed-off-by: Liu Kui --- fs/fuse/Makefile | 6 +- fs/fuse/dev.c | 19 +- fs/fuse/fus

[Devel] [PATCH VZ9 v2 1/2] fs/fuse kio: implement memory region to support zero-copy between userapce and kernel space.

2024-05-23 Thread Liu Kui
buffer allocated from the registered MR, together with returned reference for that MR to kernel to complete data transfer to/from kernel. This feature will be used for implementing pcs_krpc. Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_mr.c | 210 +++ fs

[Devel] [PATCH VZ9 v2 2/2] fs/fuse kio: introduce pcs_krpc - export kernel RPC to userspace

2024-05-23 Thread Liu Kui
ds to the FUSE_IOC_KIO_CALL ioctl for pcs_krpc management. - Kernel RPC ops is changed to demux msgs to pcs_cs or pcs_krpc https://pmc.acronis.work/browse/VSTOR-82613 Signed-off-by: Liu Kui --- fs/fuse/Makefile | 6 +- fs/fuse/dev.c | 19 +- fs/fuse/fus

Re: [Devel] [PATCH VZ9 v2 2/2] fs/fuse kio: introduce pcs_krpc - export kernel RPC to userspace

2024-05-23 Thread Liu Kui
Resend the patches with comment issues fixed. Thanks Vasily for pointing out the problem. On 23/5/24 6:55 pm, Liu Kui wrote: Currently there are 2 connections for every RPC, one in userspace, one in kernel. This wastes a lot of resources on client hosts in case of a huge cluster. It&#

[Devel] [PATCH VZ9 v2 1/2] fs/fuse kio: implement memory region to support zero-copy between userapce and kernel space.

2024-05-26 Thread Liu Kui
buffer allocated from the registered MR, together with returned reference for that MR to kernel to complete data transfer to/from kernel. This feature will be used for implementing pcs_krpc. Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_mr.c | 212 +++ fs

[Devel] [PATCH VZ9 v2 2/2] fs/fuse kio: introduce pcs_krpc - export kernel RPC to userspace

2024-05-26 Thread Liu Kui
ds to the FUSE_IOC_KIO_CALL ioctl for pcs_krpc management. - Kernel RPC ops is changed to demux msgs to pcs_cs or pcs_krpc https://pmc.acronis.work/browse/VSTOR-82613 Signed-off-by: Liu Kui --- fs/fuse/Makefile | 6 +- fs/fuse/dev.c | 19 +- fs/fuse/fus

Re: [Devel] [PATCH VZ9 v2 1/2] fs/fuse kio: implement memory region to support zero-copy between userapce and kernel space.

2024-05-26 Thread Liu Kui
Actually it's already fixed, but is wrongly included in the next patch [2/2]. Anyway, I just resent v2 patches, please use latest one. Version number is not increased because there's no changed after both patches are applied. On 26/5/24 2:18 am, Vasily Averin wrote: On 5/23/24

[Devel] [PATCH VZ9] fs/fuse kio: advance the iov_iter in the kvec branch in do_recv_one_seg()

2024-06-21 Thread Liu Kui
t;) https://virtuozzo.atlassian.net/browse/PSBM-157056 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_sock_io.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/fuse/kio/pcs/pcs_sock_io.c b/fs/fuse/kio/pcs/pcs_sock_io.c index 189cf5c98c7d..29a5c272d6fe 100644 --- a/fs/fu

[Devel] [PATCH VZ9 0/4] fs/fuse kio: introduce pcs_krpc for merging userspace RPC in vstorage-mount with kernel RPC.

2024-06-28 Thread Liu Kui
Implement pcs_krpc in kio module to support using kernel RPC directly from userspace. https://pmc.acronis.work/browse/VSTOR-82613 Resend in proper way. * Fix issues found from review * Fix bugs found in test due to improper connection state transition. Liu Kui (4): fs/fuse kio: implement

[Devel] [PATCH VZ9 3/4] fs/fuse kio: adapt pcs_rpc to support pcs_krpc.

2024-06-28 Thread Liu Kui
. - pcs_rpc can handle messages belong to pcs_krpc and pcs_cs concurrently. https://pmc.acronis.work/browse/VSTOR-82613 Signed-off-by: Liu Kui --- fs/fuse/Makefile | 6 +- fs/fuse/kio/pcs/pcs_cs.c | 120 - fs/fuse/kio/pcs/pcs_cs.h | 5 +- fs/fuse/kio/pcs

[Devel] [PATCH VZ9 1/4] fs/fuse kio: implement memory region to support zero-copy between userspace and kernel.

2024-06-28 Thread Liu Kui
buffer allocated from the registered MR, together with the returned reference to that MR to kernel to complete data transfer to/from kernel. This feature will be used for implementing pcs_krpc. https://pmc.acronis.work/browse/VSTOR-82613 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_mr.c

[Devel] [PATCH VZ9 2/4] fs/fuse kio: implement pcs_krpc - export kernel RPC to userspace

2024-06-28 Thread Liu Kui
_krpc serves as the glue layer between userspace RPC and kernel RPC. It provides execution context for forwarding messages from/to userspace RPC to/from kernel RPC. It also providee APIs for userspace to send/receive RPC messages. https://pmc.acronis.work/browse/VSTOR-82613 Signed-off-by: Liu Kui --

[Devel] [PATCH VZ9 4/4] fs/fuse kio: integrate pcs_krpc to kio module

2024-06-28 Thread Liu Kui
Enable pcs_krpc in kio module: - add module parameter 'pcs_krpc_support' to indicate whether pcs_krpc is supported. - export APIs to userspace as sub-commands of the FUSE_IOC_KIO_CALL ioctl command on the /dev/fuse device. https://pmc.acronis.work/browse/VSTOR-82613 Signed-off-b

[Devel] [PATCH VZ9 v2 0/4] fs/fuse kio: introduce pcs_krpc for merging userspace RPC in vstorage-mount with kernel RPC.

2024-07-02 Thread Liu Kui
pcs_krpc Liu Kui (4): fs/fuse kio: implement memory region to support zero-copy between userspace and kernel. fs/fuse kio: implement pcs_krpc - export kernel RPC to userspace fs/fuse kio: adapt pcs_rpc to support pcs_krpc. fs/fuse kio: integrate pcs_krpc to kio module fs/fuse/Makefile

[Devel] [PATCH VZ9 v2 1/4] fs/fuse kio: implement memory region to support zero-copy between userspace and kernel.

2024-07-02 Thread Liu Kui
buffer allocated from the registered MR, together with the returned reference to that MR to kernel to complete data transfer to/from kernel. This feature will be used for implementing pcs_krpc. https://pmc.acronis.work/browse/VSTOR-82613 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_mr.c

[Devel] [PATCH VZ9 v2 2/4] fs/fuse kio: implement pcs_krpc - export kernel RPC to userspace

2024-07-02 Thread Liu Kui
_krpc serves as the glue layer between userspace RPC and kernel RPC. It provides execution context for forwarding messages from/to userspace RPC to/from kernel RPC. It also providee APIs for userspace to send/receive RPC messages. https://pmc.acronis.work/browse/VSTOR-82613 Signed-off-by: Liu Kui --

[Devel] [PATCH VZ9 v2 3/4] fs/fuse kio: adapt pcs_rpc to support pcs_krpc.

2024-07-02 Thread Liu Kui
. - pcs_rpc can handle messages belong to pcs_krpc and pcs_cs concurrently. https://pmc.acronis.work/browse/VSTOR-82613 Signed-off-by: Liu Kui --- fs/fuse/Makefile | 6 +- fs/fuse/kio/pcs/pcs_cs.c | 120 - fs/fuse/kio/pcs/pcs_cs.h | 5 +- fs/fuse/kio/pcs

[Devel] [PATCH VZ9 v2 4/4] fs/fuse kio: integrate pcs_krpc to kio module

2024-07-02 Thread Liu Kui
Enable pcs_krpc in kio module: - add module parameter 'pcs_krpc_support' to indicate whether pcs_krpc is supported. - export APIs to userspace as sub-commands of the FUSE_IOC_KIO_CALL ioctl command on the /dev/fuse device. https://pmc.acronis.work/browse/VSTOR-82613 Signed-off-b

[Devel] [PATCH VZ9] fs/fuse kio: skip looking into response to request from userspace

2024-07-26 Thread Liu Kui
Response to userspace requests should not be analyzed and translated to msg->errors. Instead the entire response message should be just passed to userspace and let userspace handle it. Fix the issue that userspace krpcio getting aborted by PCS_RPC_ERROR_RESP response. Signed-off-by: Liu

[Devel] [PATCH VZ9 v2] fs/fuse kio: skip looking into response to request from userspace

2024-07-28 Thread Liu Kui
Response to userspace requests should not be analyzed and translated to msg->errors. Instead the entire response message should be just passed to userspace and let userspace handle it. Fix the issue that userspace krpcio getting aborted by PCS_RPC_ERROR_RESP response. Signed-off-by: Liu

[Devel] [PATCH VZ9 v3] fs/fuse kio: skip looking into response to request from userspace

2024-07-29 Thread Liu Kui
Response to userspace requests should not be analyzed and translated to msg->errors. Instead the entire response message should be just passed to userspace and let userspace handle it. Fix the issue that userspace krpcio getting aborted by PCS_RPC_ERROR_RESP response. Signed-off-by: Liu

[Devel] [PATCH VZ9] fs/fuse kio: fixed krpc abort, implement proper request msg cancellation

2024-07-31 Thread Liu Kui
must wait until IO completes. Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_krpc.c| 74 +++ fs/fuse/kio/pcs/pcs_rpc.c | 46 -- fs/fuse/kio/pcs/pcs_rpc.h | 1 + fs/fuse/kio/pcs/pcs_sock_io.h | 3 +- 4 files changed, 103 insertions

[Devel] [PATCH VZ9] fs/fuse kio: fixed pcs_rpc refcnt leak and pcs_msg leak.

2024-08-22 Thread Liu Kui
https://pmc.acronis.work/browse/VSTOR-9 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_rpc_clnt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/fuse/kio/pcs/pcs_rpc_clnt.c b/fs/fuse/kio/pcs/pcs_rpc_clnt.c index 810aaaf0081d..bd1eec849abc 100644 --- a/fs/fuse/kio

[Devel] [PATCH VZ9] fs/fuse kio: Add kRPC versioning support

2024-10-07 Thread Liu Kui
cs_krpc_version'. Relates to https://virtuozzo.atlassian.net/browse/VSTOR-90183 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 6 +++--- fs/fuse/kio/pcs/pcs_krpc.c | 3 +++ fs/fuse/kio/pcs/pcs_krpc_prot.h| 8 +++- 3 files changed, 13 insertions(+), 4 de

[Devel] [PATCH VZ9] fs/fuse kio: fixed a bug in krpc recv msg

2024-09-24 Thread Liu Kui
An uninitialized local variable is passed to a function and used there, which of course crashes kernel. Fixed here. https://virtuozzo.atlassian.net/browse/VSTOR-92924 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_krpc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/fuse/kio/pcs

[Devel] [PATCH VZ9] fs/fuse kio: fixed a bug in pcs_rpc_cancel_msg

2024-09-24 Thread Liu Kui
Set the error when a msg is cancelled, otherwise it could crash kernel when the cancelled msg has not been sent. Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_rpc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/fuse/kio/pcs/pcs_rpc.c b/fs/fuse/kio/pcs/pcs_rpc.c index 80bbffcb88a8

[Devel] [PATCH VZ9] fs/fuse kio: implement zerocopy read with krpc

2024-09-24 Thread Liu Kui
https://virtuozzo.atlassian.net/browse/VSTOR-90183 Signed-off-by: Liu Kui --- fs/fuse/dev.c | 129 - fs/fuse/fuse_i.h| 8 ++ fs/fuse/kio/pcs/pcs_krpc.c | 141 +++- fs/fuse/kio/pcs/pcs_krpc.h | 10 ++- fs

[Devel] [PATCH VZ9] fs/fuse kio: avoid acquiring rpc's mutex lock in krpc ioctl operation

2024-09-30 Thread Liu Kui
Acquiring rpc's mutex lock in krpc ioctl operation could potentially block the calling userspace process for very long time, thus stall the evloop process in case of vstorage client. https://virtuozzo.atlassian.net/browse/VSTOR-93139 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs

[Devel] [PATCH VZ9] fs/fuse kio: fix krpc state transition on connect

2024-09-30 Thread Liu Kui
ent phrase. https://virtuozzo.atlassian.net/browse/VSTOR-93162 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_krpc.c | 63 ++ fs/fuse/kio/pcs/pcs_krpc.h | 7 + 2 files changed, 64 insertions(+), 6 deletions(-) diff --git a/fs/fuse/kio/pcs/pcs_krpc.c b/fs/fu

[Devel] [PATCH VZ9] fs/fuse kio: fixed a bug in pcs_rpc_cancel_msg()

2024-11-20 Thread Liu Kui
Pass the pointer of pcs_rpc instance from caller because msg->rpc could be NULL when the msg is still in the input_queue. Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_krpc.c | 4 ++-- fs/fuse/kio/pcs/pcs_rpc.c | 5 + fs/fuse/kio/pcs/pcs_rpc.h | 2 +- 3 files changed, 4 insertions(+)

[Devel] [PATCH VZ9 1/2] fs/fuse kio: get refcnt on pages for zero-copy read via krpc.

2024-12-09 Thread Liu Kui
use-after-free issue, krpc need to get extra refcnt on these pages. Related to #VSTOR-95997 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_krpc.c | 68 -- fs/fuse/kio/pcs/pcs_krpc.h | 2 ++ 2 files changed, 45 insertions(+), 25 deletions(-) diff --git a/fs/fuse

[Devel] [PATCH VZ9 2/2] fs/fuse kio: abort all kRPCs on fuse connection abort

2024-12-09 Thread Liu Kui
All kRPCs must be aborted first to remove all potential lingering references to pages belong to fuse read requests that will be completed during fuse connection abort. Related to #VSTOR-95997 Signed-off-by: Liu Kui --- fs/fuse/dev.c | 5 +++-- fs/fuse/kio/pcs

[Devel] [PATCH VZ9] fs/fuse: avoid copying out data to killed requests.

2025-01-07 Thread Liu Kui
complete instead of killing it to avoid freeing its buff pages. Related to #VSTOR-96560 Signed-off-by: Liu Kui --- fs/fuse/dev.c | 19 +-- fs/fuse/inode.c | 6 +- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index

[Devel] [PATCH VZ9] fs/fuse: avoid copying out data to killed requests.

2025-01-07 Thread Liu Kui
complete instead of killing it to avoid freeing its buff pages. Related to #VSTOR-96560 For branch-rh9-5.14.0-427.33.1.vz9.72.x-ovz Signed-off-by: Liu Kui --- fs/fuse/dev.c | 15 ++- fs/fuse/inode.c | 6 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/fs

[Devel] [PATCH VZ9] fs/fuse kio: do not return -EINVAL from fuse_dev_do_write() on killed request.

2025-02-04 Thread Liu Kui
It is a normal scenario that the request may have been killed when a response is returned. So we shouldn't return -EINVAL to the response writer, just need to complete the request with error. Otherwise it breaks the userspace thread. Related to #VSTOR-98704 Signed-off-by: Liu Kui --- fs

[Devel] [PATCH VZ9] fs/fuse kio: introduce a new rpc affinity mode

2025-02-07 Thread Liu Kui
ng to prioritize the affinity to the sender's cpu. Initial test shows quite significant performance improvement for some workloads, however also degradation for some other workloads. However we need to do a comprehensive test to compare the pros and cons. Related to #VSTOR-99387 Signed-off-b

[Devel] [PATCH VZ9] fs/fuse kio: cleanup the input queue of rpc on fatal abort

2024-12-17 Thread Liu Kui
queue triggers the BUG_ON check in pcs_rpc_destroy. So we need clean up the input queue on fatal abort. Related to #VSTOR-96876 https://virtuozzo.atlassian.net/browse/VSTOR-96876 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_rpc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/fs/fuse

[Devel] [PATCH VZ9 2/3] fs/fuse kio: add support for cancelling a request from userspace

2025-01-21 Thread Liu Kui
t and try again later. Related to #VSTOR-97762 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_krpc.c | 34 + fs/fuse/kio/pcs/pcs_krpc_prot.h | 1 + 2 files changed, 35 insertions(+) diff --git a/fs/fuse/kio/pcs/pcs_krpc.c b/fs/fuse/kio/pcs/pcs_krpc.c ind

[Devel] [PATCH VZ9 1/3] fs/fuse kio: return msg completion error properly to userspace on kRPC

2025-01-21 Thread Liu Kui
efore its corresponding request completes in kernel space, thus addressing two issues that could otherwise happen, 1) userspace receives a stale response from kernel. 2) kernel access buffs that have been released in userspace. Related to #VSTOR-97762 Signed-off-by: Liu Kui --- fs/fuse/ki

[Devel] [PATCH VZ9 3/3] fs/fuse kio: check whether the fuse request has been killed

2025-01-21 Thread Liu Kui
a positive error value to represent non-fatal error that pertains to the msg only so that userspace can adapt accordingly. Related to #VSTOR-98219 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_krpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fuse/kio/pcs

[Devel] [PATCH VZ9 v2 2/3] fs/fuse kio: add support for cancelling a request from userspace

2025-01-22 Thread Liu Kui
t and try again later. Related to #VSTOR-97762 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_krpc.c | 33 + fs/fuse/kio/pcs/pcs_krpc_prot.h | 1 + 2 files changed, 34 insertions(+) diff --git a/fs/fuse/kio/pcs/pcs_krpc.c b/fs/fuse/kio/pcs/pcs_krpc.c ind

[Devel] [PATCH VZ9 v2 1/3] fs/fuse kio: return msg completion error properly to userspace on kRPC

2025-01-22 Thread Liu Kui
efore its corresponding request completes in kernel space, thus addressing two issues that could otherwise happen, 1) userspace receives a stale response from kernel. 2) kernel access buffs that have been released in userspace. Related to #VSTOR-97762 Signed-off-by: Liu Kui --- fs/fuse/ki

[Devel] [PATCH VZ9 v2 3/3] fs/fuse kio: check whether the fuse request has been killed

2025-01-22 Thread Liu Kui
a positive error value to represent non-fatal error that pertains to the msg only so that userspace can adapt accordingly. Related to #VSTOR-98219 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_krpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fuse/kio/pcs

[Devel] [PATCH VZ9] fs/fuse kio: get the correct rpc pointer in pcs_rpc_sent_cb().

2025-01-27 Thread Liu Kui
Get the rpc pointer from the original msg instead of the cloned msg. Because it could be NULL in the cloned msg if it is being aborted while still sits in the rpc's input_queue. Related to #VSTOR-98673 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_rpc.c | 4 ++-- 1 file changed, 2 inser

[Devel] [PATCH VZ9] fs/fuse kio: Initialize the cloned msg properly

2025-01-29 Thread Liu Kui
Initialize the kill_link field of cloned msg, so that it won't trigger the BUG_ON in rpc_abort(). Related to #VSTOR-98866 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_rpc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/fuse/kio/pcs/pcs_rpc.c b/fs/fuse/kio/pcs/pcs_rpc.c

[Devel] [PATCH VZ9] fs/fuse kio: add safety check in kpcs_dev_ioctl()

2025-03-20 Thread Liu Kui
Apparently fc->kio.ctx needs to be checked before being used. However the check should be done in a way that can avoid a race condition between kpcs_dev_ioctl() and fuse_conn_destroy() where both can run concurrently Related to #VSTOR-102040 Signed-off-by: Liu Kui --- fs/fuse/inod

[Devel] [PATCH VZ9 2/3] fs/fuse kio: dispatch msgs in correct order from the krpc_send kthread

2025-04-04 Thread Liu Kui
The msgs kept in the llist are in reverse order that must be reversed before traversing. Misordered msgs could hit performance severely. Fixes: VSTOR-103577 https://virtuozzo.atlassian.net/browse/VSTOR-103577 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_krpc.c | 1 + 1 file changed, 1

[Devel] [PATCH VZ9 3/3] fs/fuse kio: refactor code related to the 'krpc_send' kthread

2025-04-04 Thread Liu Kui
This patch is purely for code beautification patch that won't affect any functionality. Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_krpc.c | 66 -- 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/fs/fuse/kio/pcs/pcs_krpc.c b/fs/fuse/ki

[Devel] [PATCH VZ9 1/3] fs/fuse kio: properly attach an address space to the krpc_send kthread

2025-04-04 Thread Liu Kui
igned-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_krpc.c | 28 +++- fs/fuse/kio/pcs/pcs_krpc.h | 1 + 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/fs/fuse/kio/pcs/pcs_krpc.c b/fs/fuse/kio/pcs/pcs_krpc.c index 28c6104d7dc3..eac6ac9c34bd 100644 --- a/fs/fuse/ki

[Devel] [PATCH VZ9] fs/fuse kio: convert BUG_ON check to error handling

2025-03-27 Thread Liu Kui
The BUG_ON condition here is legitimate that can happen during fuse connection teardown. So a fatal error should be returned instead of crash. Fixes #VSTOR-102865 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_krpc.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a

[Devel] [PATCH VZ9] fs/fuse kio: remove BUG_ON() in pcs_mrset_fini()

2025-04-27 Thread Liu Kui
Remove the BUG_ON check as itself is a bug. Fixes: #VSTOR-105104 https://virtuozzo.atlassian.net/browse/VSTOR-105104 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_mr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/fuse/kio/pcs/pcs_mr.c b/fs/fuse/kio/pcs/pcs_mr.c index 9d83782bd915

[Devel] [PATCH VZ9] fs/fuse kio: fix krpc abort

2025-04-16 Thread Liu Kui
y that the PCS_MSG_BUSY flag bit stays set for long time, thus unlikely blocking krpc abort for long time. Fixes: #VSTOR-104248 https://virtuozzo.atlassian.net/browse/VSTOR-104248 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_cs.c | 1 + fs/fuse/kio/pcs/pcs_krpc

[Devel] [PATCH VZ9] fs/fuse kio: fix hang rpc over rdma io

2025-05-07 Thread Liu Kui
cting the stuck msg at underlying rdma io. Apparently pcs_rdma_next_timeout should return the next timeout based on first msg in rio->active_txs. Fixes: #VSTOR-105982 https://virtuozzo.atlassian.net/browse/VSTOR-105982 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_rdma_io.c | 15 ++

[Devel] [PATCH VZ9 for v6.3] fs/fuse: clear splice buffers from response to a killed request

2025-02-28 Thread Liu Kui
normally we just ignore the response to a killed request, however if there are splice buffers returned with the response, we must clear these splice buffers before returning them to userspace. Fixed #VSTOR-100385 Signed-off-by: Liu Kui --- fs/fuse/dev.c | 18 +- 1 file changed

[Devel] [PATCH VZ9] fs/fuse: clear splice buffers from response to a killed request

2025-02-28 Thread Liu Kui
normally we just ignore the response to a killed request, however if there are splice buffers returned with the response, we must clear these splice buffers before returning them to userspace. Fixed #VSTOR-100385 Signed-off-by: Liu Kui --- fs/fuse/dev.c | 23 ++- 1 file

[Devel] [PATCH VZ9] fs/fuse kio: destruct fuse ktrace at the end of kio destruction

2025-02-13 Thread Liu Kui
Apparently ktrace could still be used during kio destruction. An absence of ktrace can trigger the WARN_ON check in pcs_rpc_report_error(). While it's not fatal functionally, it does fail testcases, so fix it here. Related to #VSTOR-99621 Signed-off-by: Liu Kui --- fs/fuse/ki

[Devel] [PATCH VZ9] fs/fuse kio: add debug info to catch unexpected event

2025-05-27 Thread Liu Kui
such event by printing a warn message only, letting userpsace handle such exception. Related to #VSTOR-107235 https://virtuozzo.atlassian.net/browse/VSTOR-107235 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_krpc.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/fs/fuse/kio/pcs/pcs_k

[Devel] [PATCH VZ9] fs/fuse kio: move pcs_mrset_fini() after pcs_rpc_engine_fini()

2025-05-15 Thread Liu Kui
Supplement fix in 19b0babc2ea("fs/fuse kio: remove BUG_ON() in pcs_mrset_fini()") Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_cluster_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fuse/kio/pcs/pcs_cluster_core.c b/fs/fuse/kio/pcs/pcs_cluster_co

[Devel] [PATCH VZ9] fs/fuse kio: fix crash due to race condition in krpc abort

2025-05-15 Thread Liu Kui
e need to kill the connection. The timeout can be set via module parameter 'pcs_krpc_abort_timeout'. Fixes: VSTOR-106209 https://virtuozzo.atlassian.net/browse/VSTOR-106209 Signed-off-by: Liu Kui fix debug --- fs/fuse/kio/pcs/pcs_krpc.c | 44 --

[Devel] [PATCH VZ9] fs/fuse kio: fix bug due to potential memory alloc failure

2025-05-28 Thread Liu Kui
tps://virtuozzo.atlassian.net/browse/VSTOR-107235 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_cs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/fuse/kio/pcs/pcs_cs.c b/fs/fuse/kio/pcs/pcs_cs.c index 6eef58994fef..10d6c860c3f8 100644 --- a/fs/fuse/kio/pcs/pcs_cs.c +++ b/fs/fuse/kio/

[Devel] [PATCH VZ9] fs/fuse kio: set correct accounting weight for FIEMAP request msg.

2025-05-29 Thread Liu Kui
ke cs->in_flight overflow, crashing the kernel. Fixes: #ASUP-1567 https://virtuozzo.atlassian.net/browse/ASUP-1567 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_map.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fs/fuse/kio/pcs/pcs_map.c b/fs/fuse/kio/pcs/pcs_map

[Devel] [PATCH VZ9 v2] fs/fuse kio: do not set RPC affinity from a workequeue worker

2025-07-08 Thread Liu Kui
net/browse/VSTOR-109481 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_rpc.c | 4 1 file changed, 4 insertions(+) diff --git a/fs/fuse/kio/pcs/pcs_rpc.c b/fs/fuse/kio/pcs/pcs_rpc.c index f15d0c3fb7cd..c7d387568b95 100644 --- a/fs/fuse/kio/pcs/pcs_rpc.c +++ b/fs/fuse/kio/pcs/pcs_rpc.c @@ -877

[Devel] [PATCH VZ9] fs/fuse kio: do not set RPC affinity from a workequeue worker

2025-07-07 Thread Liu Kui
A RPC's affinity shouldn't be set from a workqueue worker, otherwise the RPC could be stuck to one cpu forever. When multiple rpcs are stuck to the same cpu overall performance degrades significantly. Fixes: #VSTOR-109481 https://virtuozzo.atlassian.net/browse/VSTOR-109481 Signed-off-b

[Devel] [PATCH VZ9] fs/fuse kio: Refactor pcs_mr to avoid large contiguous memory allocation

2025-08-01 Thread Liu Kui
maintaining functional equivalence. Related to #VSTOR-112413 https://virtuozzo.atlassian.net/browse/VSTOR-112413 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_mr.c | 55 +--- fs/fuse/kio/pcs/pcs_mr.h | 21 ++- 2 files changed, 50 insertions

[Devel] [PATCH VZ9] fs/fuse kio: Use kvcalloc to prevent failure in fragmented systems

2025-08-01 Thread Liu Kui
/browse/VSTOR-112413 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_mr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fuse/kio/pcs/pcs_mr.c b/fs/fuse/kio/pcs/pcs_mr.c index cbd3b440dd1b..28e04d1b2639 100644 --- a/fs/fuse/kio/pcs/pcs_mr.c +++ b/fs/fuse/kio/pcs/pcs_mr.c