[Devel] [PATCH RH8 2/8] ploop: RAW image does not have header

Kirill Tkhai ktkhai at virtuozzo.com
Thu Jul 1 18:14:25 MSK 2021


Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 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