[Devel] [PATCH RHEL7 COMMIT] fs/fuse kio_pcs: mapped requests have map version preinitialized

Konstantin Khorenko khorenko at virtuozzo.com
Mon Jun 25 19:08:20 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.15
------>
commit 30979baf08c90ff4a018437782140349ba4dc1cb
Author: Pavel Butsykin <pbutsykin at virtuozzo.com>
Date:   Thu Jun 21 20:16:43 2018 +0300

    fs/fuse kio_pcs: mapped requests have map version preinitialized
    
    It is recently introduced bug. New kind of corruptions is possible.
    
    (Backport from user-space 2d136eac).
    
    Signed-off-by: Alexey Kuznetsov <kuznet at virtuozzo.com>
    Signed-off-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
    
    Note from kuznet@:
    Would not hurt to have texts in sync.
    But still IREQ_F_MAPPED is not used by kio, it is raid6 thing.
---
 fs/fuse/kio/pcs/pcs_map.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fuse/kio/pcs/pcs_map.c b/fs/fuse/kio/pcs/pcs_map.c
index a3bf48a8ea93..f2ae087d5286 100644
--- a/fs/fuse/kio/pcs/pcs_map.c
+++ b/fs/fuse/kio/pcs/pcs_map.c
@@ -2308,7 +2308,7 @@ void map_submit(struct pcs_map_entry * m, struct pcs_int_request *ireq)
 		struct pcs_cs_list *csl = NULL;
 
 		spin_lock(&m->lock);
-		if (ireq->type == PCS_IREQ_IOCHUNK) {
+		if (ireq->type == PCS_IREQ_IOCHUNK && !(ireq->flags & IREQ_F_MAPPED)) {
 			ireq->iochunk.hbuf.map_version = m->version;
 			ireq->iochunk.hbuf.uid = ireq->iochunk.map->id;
 		}


More information about the Devel mailing list