[Devel] [PATCH RHEL7 COMMIT] fuse kio: Do not requeue requests when connection is dead

Konstantin Khorenko khorenko at virtuozzo.com
Mon May 28 18:37:46 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-693.21.1.vz7.50.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.21.1.vz7.50.2
------>
commit 08a10aaca24b6df19e1ca5b571ded3e0d4ff4cac
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Mon May 28 18:37:46 2018 +0300

    fuse kio: Do not requeue requests when connection is dead
    
    In case of connection is broken (e.g., pstorage-mount process
    is dead), we should not requeue a request since it never ends.
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
    Acked-by: Alexey Kuznetsov <kuznet at virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_cluster.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/fuse/kio/pcs/pcs_cluster.c b/fs/fuse/kio/pcs/pcs_cluster.c
index 24ec8a5f39a3..84d109df9002 100644
--- a/fs/fuse/kio/pcs/pcs_cluster.c
+++ b/fs/fuse/kio/pcs/pcs_cluster.c
@@ -514,10 +514,13 @@ static void ireq_on_error_(struct pcs_int_request *ireq)
 
 static int ireq_check_redo_(struct pcs_int_request *ireq)
 {
+	struct fuse_conn *fc = container_of(ireq->cc, struct pcs_fuse_cluster, cc)->fc;
 	pcs_error_t *err = &ireq->error;
 
 	if (ireq->flags & IREQ_F_FATAL)
 		return 0;
+	if (!fc->connected || fc->conn_error)
+		return 0;
 
 	if (ireq->completion_data.parent &&
 	    pcs_if_error(&ireq->completion_data.parent->error) &&


More information about the Devel mailing list