Test
___
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
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(+),
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
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
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
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
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
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
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
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
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
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
.
- 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
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
_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
--
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
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
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
_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
--
.
- 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
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
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
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
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
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
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
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
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
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
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
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
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
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(+)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 ++
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
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
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
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
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
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 --
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/
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
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
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
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
/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
68 matches
Mail list logo