[Devel] [PATCH RHEL8 COMMIT] fs/fuse kio: missing ireq's completion_data initialization

Konstantin Khorenko khorenko at virtuozzo.com
Thu Sep 24 11:44:57 MSK 2020


The commit is pushed to "branch-rh8-4.18.0-193.6.3.vz8.4.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-193.6.3.vz8.4.7
------>
commit c83cc877cf576940623ce7eafb394b2d16b31717
Author: Ildar Ismagilov <ildar.ismagilov at virtuozzo.com>
Date:   Thu Feb 27 15:36:14 2020 +0300

    fs/fuse kio: missing ireq's completion_data initialization
    
    In case of fiemap request the completion_data field isn't initalized
    and because of it the ireq_retry_inc (which is called from
    pcs_sreq_complete) works incorrect.
    
    https://jira.sw.ru/browse/PSBM-100294
    
    Signed-off-by: Ildar Ismagilov <ildar.ismagilov at virtuozzo.com>
    (cherry picked from commit decd95b5d52fd4aa99e677954d44bdc5043decd2)
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_cluster.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/fuse/kio/pcs/pcs_cluster.c b/fs/fuse/kio/pcs/pcs_cluster.c
index b15a9cb170d8..65d9288cb88d 100644
--- a/fs/fuse/kio/pcs/pcs_cluster.c
+++ b/fs/fuse/kio/pcs/pcs_cluster.c
@@ -289,6 +289,8 @@ static void process_ireq_fiemap(struct pcs_int_request *orig_ireq)
 	fiter->ireq.type = PCS_IREQ_API;
 	fiter->ireq.apireq.req = &fiter->apireq;
 	fiter->ireq.completion_data.parent = NULL;
+	fiter->ireq.completion_data.ctx = orig_ireq->completion_data.ctx;
+	fiter->ireq.completion_data.priv = orig_ireq->completion_data.priv;
 	fiter->ireq.complete_cb = fiemap_iter_done;
 	fiter->apireq.datasource = fiter;
 	fiter->apireq.get_iter = fiemap_get_iter;


More information about the Devel mailing list