[Devel] [PATCH RHEL7 COMMIT] fs/fuse kio: fix processing order of RDMA works during throttle/unthrottle

Vasily Averin vvs at virtuozzo.com
Tue Nov 10 13:44:14 MSK 2020


The commit is pushed to "branch-rh7-3.10.0-1160.2.2.vz7.170.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1160.2.2.el7
------>
commit 0aa759d3db6c7abce84121c6bdd8447e9967b335
Author: Ildar Ismagilov <ildar.ismagilov at virtuozzo.com>
Date:   Tue Nov 10 13:44:14 2020 +0300

    fs/fuse kio: fix processing order of RDMA works during throttle/unthrottle
    
    To fix it, let's skip processing the RDMA works during throttle and
    add them to rio->pended_rxs list in FIFO order.
    
    This fix helps us to avoid BUG_ON(tx->xid != rack->xid) in userspace.
    
    https://pmc.acronis.com/browse/VSTOR-38354
    
    Signed-off-by: Ildar Ismagilov <ildar.ismagilov at virtuozzo.com>
    Reviewed-by: Andrey Zaitsev <azaitsev at virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_rdma_io.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/fs/fuse/kio/pcs/pcs_rdma_io.c b/fs/fuse/kio/pcs/pcs_rdma_io.c
index 5955716..4622198 100644
--- a/fs/fuse/kio/pcs/pcs_rdma_io.c
+++ b/fs/fuse/kio/pcs/pcs_rdma_io.c
@@ -798,6 +798,11 @@ static int rio_handle_rx_immediate(struct pcs_rdmaio *rio, char *buf, int len,
 	int offset = rio->hdr_size;
 	struct iov_iter it;
 
+	if (rio->throttled) {
+		*throttle = 1;
+		return 0;
+	}
+
 	if (len < rio->hdr_size) {
 		TRACE("rio read short msg: %d < %d, rio: 0x%p\n", len,
 		      rio->hdr_size, rio);
@@ -949,7 +954,7 @@ static void rio_handle_rx(struct pcs_rdmaio *rio, struct rio_rx *rx,
 			return;
 		}
 	} else
-		list_add(&rx->list, &rio->pended_rxs);
+		list_add_tail(&rx->list, &rio->pended_rxs);
 
 	if (!pended)
 		rio->n_peer_credits += credits;


More information about the Devel mailing list