[Devel] [PATCH RHEL8 COMMIT] ploop: Initialize is_raw on snapshot creation

Konstantin Khorenko khorenko at virtuozzo.com
Tue Dec 10 18:44:27 MSK 2019


The commit is pushed to "branch-rh8-4.18.0-80.1.2.vz8.2.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-80.1.2.vz8.2.6
------>
commit 32e7f7fbbd20973052efb71719a684fcf0f38f71
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Tue Dec 10 18:44:25 2019 +0300

    ploop: Initialize is_raw on snapshot creation
    
    Here is missed initialization of is_raw, so it may
    contain 1, since we use simple kmalloc.
    
    Fixes: 1e2ff6152061 ("ploop: Save info about ploop->deltas[0]
    (base image) is raw")
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/md/dm-ploop-cmd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/md/dm-ploop-cmd.c b/drivers/md/dm-ploop-cmd.c
index 590edbfeb132..30cb4f7fbfc4 100644
--- a/drivers/md/dm-ploop-cmd.c
+++ b/drivers/md/dm-ploop-cmd.c
@@ -1037,6 +1037,7 @@ static int ploop_switch_top_delta(struct ploop *ploop, int new_ro_fd,
 	size -= sizeof(struct ploop_delta);
 	memcpy(cmd.switch_top_delta.deltas, ploop->deltas, size);
 	cmd.switch_top_delta.deltas[ploop->nr_deltas].file = file;
+	cmd.switch_top_delta.deltas[ploop->nr_deltas].is_raw = false;
 
 	init_completion(&cmd.comp);
 	ploop_queue_deferred_cmd(ploop, &cmd);



More information about the Devel mailing list