[Devel] [PATCH RHEL8 COMMIT] ploop: RAW image does not have header

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jul 2 22:51:52 MSK 2021


The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.51
------>
commit 7cc10b6b349045e015f2f3e9af13aa2f80c93583
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Fri Jul 2 22:51:52 2021 +0300

    ploop: RAW image does not have header
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
    
    ==========================
    ploop: Stop using kvec
    
    We can't read using kvec from file open with O_DIRECT.
    This makes ploop to stop use it.
    
    Kirill Tkhai (8):
          ploop: Read metadata page-aligned
          ploop: RAW image does not have header
          ploop: Introduce ploop_init_be_iter()
          ploop: Introduce rb_root_for_each_md_page()
          ploop: Introduce md helpers
          ploop: Stop using kvec
          ploop: Kill dead check
          ploop: Shorten delta_bat_entries
---
 drivers/md/dm-ploop-bat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-ploop-bat.c b/drivers/md/dm-ploop-bat.c
index 90ddba88494f..6fb5cdc5c749 100644
--- a/drivers/md/dm-ploop-bat.c
+++ b/drivers/md/dm-ploop-bat.c
@@ -437,7 +437,7 @@ static void apply_delta_mappings(struct ploop *ploop, struct ploop_delta *deltas
 	ploop_for_each_md_page(ploop, md, node) {
 		bat_entries = kmap_atomic(md->page);
 
-		if (is_top_level && md->id == 0) {
+		if (is_top_level && md->id == 0 && !is_raw) {
 			/* bat_entries before PLOOP_MAP_OFFSET is hdr */
 			memcpy(bat_entries, hdr, sizeof(struct ploop_pvd_header));
 		}


More information about the Devel mailing list