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

Submitted by Konstantin Khorenko on May 28, 2018, 3:37 p.m.


Message ID 201805281537.w4SFbkuA030189@finist_ce7.work
State New
Series "fuse kio: Do not requeue requests when connection is dead"
Headers show

Commit Message

Konstantin Khorenko May 28, 2018, 3:37 p.m.
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@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@virtuozzo.com>
    Acked-by: Alexey Kuznetsov <kuznet@virtuozzo.com>
 fs/fuse/kio/pcs/pcs_cluster.c | 3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

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) &&