File 0167-Don-t-change-total_size-when-creati.patch of Package qemu.8405
From 55b3e3c3f50113bddd8578e4f1fcc2e85aa23ae5 Mon Sep 17 00:00:00 2001
From: Chunyan Liu <cyliu@suse.com>
Date: Fri, 28 Aug 2015 13:16:28 +0800
Subject: [PATCH] Don't change total_size when creating fixed vpc
After upstream commit #3f3f20d... vpc: Fix size in fixed image
creation. Total_sectors is rounded up to match the geometry,
total_size is also changed as well (Total_sectors * BDRV_SECTOR_SIZE).
This brings problem for bnc#943446 - qemu-img convert doesn't create
MB aligned VHDs anymore. Add patch to exclude the change.
Signed-off-by: Chunyan Liu <cyliu@suse.com>
---
block/vpc.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/block/vpc.c b/block/vpc.c
index 844cbcab72..3c9fb97a17 100644
--- a/block/vpc.c
+++ b/block/vpc.c
@@ -785,7 +785,6 @@ static int vpc_create(const char *filename, QEMUOptionParameter *options,
}
} else {
total_sectors = (int64_t)cyls * heads * secs_per_cyl;
- total_size = total_sectors * BDRV_SECTOR_SIZE;
}
/* Prepare the Hard Disk Footer */