[Devel] [PATCH RH9 2/2] fuse: Add a new fuse inode state FUSE_I_INVAL_FILES

2022-03-16 Thread Kui Liu
There are many places where it is critical to know if invalidate files operation is in progress, otherwise deadlock would happen. Currently this can be done by checking the FUSE_S_FAIL_IMMEDIATELY flag bit from fuse_file state. However this is inconvenient in case where a fuse_file is not directl

Re: [Devel] [PATCH RH9 2/2] fuse: Add a new fuse inode state FUSE_I_INVAL_FILES

2022-03-16 Thread Kui Liu
Attached the original patch file. From: on behalf of Kui Liu Date: Wednesday, 16 March 2022 at 8:07 PM To: "devel@openvz.org" Subject: [Devel] [PATCH RH9 2/2] fuse: Add a new fuse inode state FUSE_I_INVAL_FILES There are many places where it is critical to know if invalidate files

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

2022-10-13 Thread Kui Liu
, while ploop devices are backed by files stored in vstorage filesystem. With this background info, please see my comments below. -Original Message- From: Konstantin Khorenko Date: Thursday, 13 October 2022 at 5:23 PM To: Kui Liu , Alexey Kuznetsov Cc: Devel , Alexander Atanasov

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

2022-10-13 Thread Kui Liu
-Original Message- From: Alexander Atanasov Date: Thursday, 13 October 2022 at 11:26 PM To: Kui Liu , Konstantin Khorenko , Alexey Kuznetsov Cc: Devel , Alexander Mikhalitsyn Subject: Re: [Devel] [PATCH RH9] dm-ploop: port the standby mode feature. On 13.10.22 16:33, Kui Liu

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

2022-10-17 Thread Kui Liu
ementation? Regards, Liu Kui -Original Message- From: Konstantin Khorenko Date: Tuesday, 18 October 2022 at 1:57 AM To: Kui Liu , Alexey Kuznetsov Cc: Devel , Alexander Mikhalitsyn , Alexander Atanasov Subject: Re: [Devel] [PATCH RH9] dm-ploop: port the standby mode feature. Hi L

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

2022-10-18 Thread Kui Liu
Hello, Regarding the QUEUE_FLAG_STANDBY_EN flag, it is like what you added. However I find some problems with the code, see my comments below. -Original Message- From: Alexander Atanasov Date: Tuesday, 18 October 2022 at 5:41 PM To: Kui Liu , Konstantin Khorenko , Alexey

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

2022-10-18 Thread Kui Liu
Hello, -Original Message- From: Alexander Atanasov Date: Tuesday, 18 October 2022 at 7:40 PM To: Kui Liu , Konstantin Khorenko , Alexey Kuznetsov Cc: Devel Subject: Re: [Devel] [PATCH RH9] dm-ploop: port the standby mode feature. On 18.10.22 13:57, Kui Liu wrote: > He

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

2022-10-19 Thread Kui Liu
-Original Message- From: Alexander Atanasov Date: Tuesday, 18 October 2022 at 9:12 PM To: Kui Liu , Konstantin Khorenko , Alexey Kuznetsov Cc: Devel Subject: Re: [Devel] [PATCH RH9] dm-ploop: port the standby mode feature. On 18.10.22 15:47, Kui Liu wrote: > He

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

2022-10-19 Thread Kui Liu
-Original Message- From: Alexander Atanasov Date: Wednesday, 19 October 2022 at 4:02 PM To: Kui Liu , Konstantin Khorenko , Alexey Kuznetsov Cc: Devel Subject: Re: [Devel] [PATCH RH9] dm-ploop: port the standby mode feature. On 19.10.22 9:58, Kui Liu wrote

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

2022-10-21 Thread Kui Liu
-Original Message- From: Alexander Atanasov Date: Friday, 21 October 2022 at 6:08 PM To: Kui Liu , Konstantin Khorenko , Alexey Kuznetsov Cc: Devel Subject: Re: [Devel] [PATCH RH9] dm-ploop: port the standby mode feature. On 19.10.22 11:25, Kui Liu wrote

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

2022-10-21 Thread Kui Liu
-Original Message- From: Alexander Atanasov Date: Friday, 21 October 2022 at 7:35 PM To: Kui Liu , Konstantin Khorenko , Alexey Kuznetsov Cc: Devel Subject: Re: [Devel] [PATCH RH9] dm-ploop: port the standby mode feature. On 21.10.22 14:28, Kui Liu wrote

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

2022-10-26 Thread Kui Liu
-Original Message- From: Alexander Atanasov Date: Wednesday, 26 October 2022 at 5:14 PM To: Kui Liu , Konstantin Khorenko , Alexey Kuznetsov Cc: Devel Subject: Re: [Devel] [PATCH RH9] dm-ploop: port the standby mode feature. Hi, On 21.10.22 16:28, Kui Liu wrote

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

2022-10-26 Thread Kui Liu
-Original Message- From: Alexander Atanasov Date: Wednesday, 26 October 2022 at 9:32 PM To: Kui Liu , Konstantin Khorenko , Alexey Kuznetsov Cc: Devel Subject: Re: [Devel] [PATCH RH9] dm-ploop: port the standby mode feature. On 26.10.22 16:15, Kui Liu wrote

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

2022-10-27 Thread Kui Liu
-Original Message- From: Alexander Atanasov Date: Thursday, 27 October 2022 at 4:28 PM To: Kui Liu , Konstantin Khorenko , Alexey Kuznetsov , "Denis V. Lunev" Cc: Devel Subject: Re: [Devel] [PATCH RH9] dm-ploop: port the standby mode feature. On 26.10.22 17:42, Kui

Re: [Devel] [PATCH vz9 v2] ploop: port and fix the standby mode feature.

2022-11-01 Thread Kui Liu
-Original Message- From: Alexander Atanasov Date: Tuesday, 1 November 2022 at 11:57 PM To: Konstantin Khorenko , "Denis V. Lunev" , Devel Cc: Kui Liu , Alexey Kuznetsov Subject: Re: [PATCH vz9 v2] ploop: port and fix the standby mode feature. On 1.11.22 17:27,

Re: [Devel] [PATCH vz9 v3] ploop: port and fix the standby mode feature.

2022-11-16 Thread Kui Liu
Hello, This patch looks good, no further questions from me. Regards, LIU KUI -Original Message- From: Alexander Atanasov Date: Friday, 4 November 2022 at 8:49 PM To: Devel Cc: Konstantin Khorenko , Alexander Atanasov , "Denis V . Lunev" , Kui Liu , Alexey Kuznetso

Re: [Devel] [PATCH RH9] fuse: pcs: do not use sendpage on pages which cannot be sendpaged

2023-04-18 Thread Kui Liu
:31 PM To: Devel mailto:devel@openvz.org>>, Konstantin Khorenko mailto:khore...@virtuozzo.com>>, Kui Liu mailto:kui@acronis.com>> Subject: [PATCH RH9] fuse: pcs: do not use sendpage on pages which cannot be sendpaged Use the same approach as in iscsi iscsi_tcp_segment_map() which m

Re: [Devel] [PATCH RH9] fuse: pcs: do not use sendpage on pages which cannot be sendpaged

2023-04-19 Thread Kui Liu
lexey Kuznetsov mailto:kuz...@acronis.com>> Date: Wednesday, 19 April 2023 at 12:09 AM To: Kui Liu mailto:kui@acronis.com>> Cc: Devel mailto:devel@openvz.org>>, Konstantin Khorenko mailto:khore...@virtuozzo.com>> Subject: Re: [Devel] [PATCH RH9] fuse: pcs: do not use sendp

[Devel] [PATCH RH9 v2] fuse/kio: do not use sendpage on pages which cannot be sendpaged

2023-04-19 Thread Kui Liu
It looks like the new API iov_iter_get_pages is not safe for use when trying to get a page from a bvec to be sent by kernel_sendpage(). So just revert back our own implentation where we check the page before making get_page(), if the page can't be sendpage, fall back to copy mode. Affects: #PSBM-1

[Devel] [PATCH RH7] fs/fuse kio: adjust rdma connection parameters

2023-08-17 Thread Kui Liu
In RoCE network, packet loss and dealy due to congestion can happen quite often. We need to tolerate such event. So increase retry_count and rnr_retry_count to 7 to allow NIC to retry operations when an error happens, instead of returning the error directly which causes the connection to be aborte

Re: [Devel] [PATCH RH7] fs/fuse kio: adjust rdma connection parameters

2023-08-17 Thread Kui Liu
can at least have stable connection in such RoCE network. -Original Message- From: Alexey Kuznetsov mailto:kuz...@acronis.com>> Date: Thursday, 17 August 2023 at 11:52 PM To: Kui Liu mailto:kui@acronis.com>> Cc: Devel mailto:devel@openvz.org>> Subject: Re: [Devel] [

Re: [Devel] [PATCH RH7] fs/fuse kio: adjust rdma connection parameters

2023-08-17 Thread Kui Liu
Yes, I think we need it for vz9, the patch can be applied directly to vz9. -Original Message- From: Konstantin Khorenko mailto:khore...@virtuozzo.com>> Date: Friday, 18 August 2023 at 1:40 AM To: Kui Liu mailto:kui@acronis.com>>, Devel mailto:devel@openvz.org&

[Devel] Subject: [PATCH RHEL9] fs/fuse kio: fix deadlock in establishing rdma connection

2023-08-20 Thread Kui Liu
rdma_connect() now can't be called directly in cm event handler, as it will cause deadlock. Use rdma_connect_locked() instead https://pmc.acronis.work/browse/VSTOR-73616 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_rdma_conn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --gi

[Devel] [PATCH RHEL9] fs/fuse: fix broken 'fuse_invalidate_files()'

2023-09-28 Thread Kui Liu
Use correct lock to protect the kill_requests operation on all request queues. Test of the FUSE_S_FAIL_IMMEDIATELY bit needs to be done with corresponding lock to prevent new requests being added to a queue after it has been killed. Adjust the order of queues that kill_request operation is perform

[Devel] [PATCH RHEL9] fs/fuse: fix flush_bg_queue()

2023-09-29 Thread Kui Liu
Currently flush_bg_queue() takes an input paramenter fiq, to which requests in the bg_queue will be dispatched without respect to what's been set to req->args->fiq. This behaviour totally breaks purpose of the request dispatching algorithm when there are multiple input queues. So instead we need to

Re: [Devel] fuse: call proper fiemap_prep as it is required by new kernel api

2023-10-16 Thread Kui Liu
October 2023 at 5:23 PM To: "Denis V. Lunev" , Alexey Kuznetsov , Devel , "khore...@virtuozzo.com" , Kui Liu Subject: Re: fuse: call proper fiemap_prep as it is required by new kernel api ok for me From: Denis V. Lunev Sent: Sunday, October

Re: [Devel] fuse: call proper fiemap_prep as it is required by new kernel api

2023-10-16 Thread Kui Liu
Then ok for me. -Original Message- From: Alexey Kuznetsov mailto:kuz...@virtuozzo.com>> Date: Monday, 16 October 2023 at 6:34 PM To: Kui Liu mailto:kui@acronis.com>> Cc: Devel mailto:devel@openvz.org>>, Andrey Zaitsev mailto:andrey.zait...@acronis.com>>, &q

[Devel] [PATCH RHEL9] fs/fuse: make size of qhash and limit of each bucket module parameters

2023-11-16 Thread Kui Liu
Both size of qhash and limit of each bucket can affect performance of certain workload significantly. There is no single set of value that'd be the best for all workload, we may need to choose a value based on workload, so it'd be better make them configurable. Here we choose the default value to

[Devel] [PATCH RHEL9] fs/fuse kio: always ack RIO_MSG_RDMA_READ_REQ received from csd.

2023-11-22 Thread Kui Liu
In our userspace RDMA implementation, it is required that every RIO_MSG_RDMA_READ_REQ msg must be acked strictly in order. However this rule can be broken due to a bug in kio, which though is triggered by very abnormal hardware behaviour that it can take very long time(>10s) for a WR to complete.

Re: [Devel] [PATCH RHEL9] fs/fuse kio: always ack RIO_MSG_RDMA_READ_REQ received from csd.

2023-11-23 Thread Kui Liu
Sure, will do next time. Thanks for reminding me. -Original Message- From: Konstantin Khorenko mailto:khore...@virtuozzo.com>> Date: Thursday, 23 November 2023 at 7:06 PM To: Kui Liu mailto:kui@acronis.com>>, Devel mailto:devel@openvz.org>> Cc: Alexey Ku

[Devel] [PATCH RHEL9] fs/fuse kio: destroy rdma_cm_id immediately in case cm fails during connection establishment

2024-01-02 Thread Kui Liu
Previously, if cm fails after the rio has been created, the rdma_cm_id would not be destroyed immediately. However the cm_id->context could still point to rc->id which would no longer be valid. This dealy create a window during which cm_id->context holds an illegal pointer. If an RMDA cm event arri

Re: [Devel] [PATCH VZ9 3/3] fs/fuse: enhanced splice support

2024-01-18 Thread Kui Liu
On 9 Jan 2024, at 9:40 PM, Alexey Kuznetsov wrote: Unfortunately, existing support of splice in fuse is completely useless, it has many flaws, each of them is fatal, even taken separately. - it passes only single splice, which requires of user space to prepare one more splice to merge header.

Re: [Devel] [PATCH VZ9 3/3] fs/fuse: enhanced splice support

2024-01-18 Thread Kui Liu
> On 18 Jan 2024, at 5:08 PM, Alexey Kuznetsov wrote: > >> Is it difficult to separate the verification of inputs, such as fds, size of >> src buffs against dest buffs etc, from the process of copying data? Similar >> to what’s been done in ‘copy_out_args()’. > > I am not sure I understand w

Re: [Devel] [PATCH VZ9 3/3] fs/fuse: enhanced splice support

2024-01-18 Thread Kui Liu
e can just use stored fds from the first loop and do data copy. In the out path, we can just do fdput on all stored fds. However I’m not sure if there is any risk of holding multiple fds at the same time, or holding one fd longer than necessary. > On Thu, Jan 18, 2024 a

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

2025-08-01 Thread Kui Liu
; Andrey Zaitsev ; Konstantin Khorenko ; Kui Liu Subject: [PATCH VZ9] fs/fuse kio: Use kvcalloc to prevent failure in fragmented systems Address large memory allocation failure by replacing kcalloc with kvcalloc. This allows fallback to vmalloc for large allocations, as virtually contiguous meomory