From 8e6758e973cf907759acdf08bb7ad8f2315b6498 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Nov 11 2019 14:33:46 +0000 Subject: qemu-4.1.0-6.fc32 Fix compressed qcow2 'qemu-img check' errors (bz #1768541) --- diff --git a/0005-qcow2-Fix-QCOW2_COMPRESSED_SECTOR_MASK.patch b/0005-qcow2-Fix-QCOW2_COMPRESSED_SECTOR_MASK.patch new file mode 100644 index 0000000..eb76ab9 --- /dev/null +++ b/0005-qcow2-Fix-QCOW2_COMPRESSED_SECTOR_MASK.patch @@ -0,0 +1,27 @@ +From: Max Reitz +Date: Mon, 28 Oct 2019 17:18:40 +0100 +Subject: [PATCH] qcow2: Fix QCOW2_COMPRESSED_SECTOR_MASK + +Masks for L2 table entries should have 64 bit. + +Fixes: b6c246942b14d3e0dec46a6c5868ed84e7dbea19 +Buglink: https://bugs.launchpad.net/qemu/+bug/1850000 +Cc: qemu-stable@nongnu.org +Signed-off-by: Max Reitz +--- + block/qcow2.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/block/qcow2.h b/block/qcow2.h +index 567375e56c..45f9585c08 100644 +--- a/block/qcow2.h ++++ b/block/qcow2.h +@@ -77,7 +77,7 @@ + + /* Defined in the qcow2 spec (compressed cluster descriptor) */ + #define QCOW2_COMPRESSED_SECTOR_SIZE 512U +-#define QCOW2_COMPRESSED_SECTOR_MASK (~(QCOW2_COMPRESSED_SECTOR_SIZE - 1)) ++#define QCOW2_COMPRESSED_SECTOR_MASK (~(QCOW2_COMPRESSED_SECTOR_SIZE - 1ULL)) + + /* Must be at least 2 to cover COW */ + #define MIN_L2_CACHE_SIZE 2 /* cache entries */ diff --git a/qemu.spec b/qemu.spec index c4b6f75..b523bcd 100644 --- a/qemu.spec +++ b/qemu.spec @@ -148,7 +148,7 @@ Summary: QEMU is a FAST! processor emulator Name: qemu Version: 4.1.0 -Release: 5%{?rcrel}%{?dist} +Release: 6%{?rcrel}%{?dist} Epoch: 2 License: GPLv2 and BSD and MIT and CC-BY URL: http://www.qemu.org/ @@ -179,6 +179,8 @@ Patch0002: 0002-block-posix-Always-allocate-the-first-block.patch Patch0003: 0003-tests-make-filemonitor-test-more-robust-to-event-ord.patch # Workaround for qcow2 triggered XFS corruption (bz #1763519) Patch0004: 0004-Revert-block-avoid-recursive-block_status-call-if-po.patch +# Fix compressed qcow2 'qemu-img check' errors (bz #1768541) +Patch0005: 0005-qcow2-Fix-QCOW2_COMPRESSED_SECTOR_MASK.patch # documentation deps @@ -1865,6 +1867,9 @@ getent passwd qemu >/dev/null || \ %changelog +* Mon Nov 11 2019 Cole Robinson - 2:4.1.0-6 +- Fix compressed qcow2 'qemu-img check' errors (bz #1768541) + * Thu Oct 24 2019 Cole Robinson - 2:4.1.0-5 - Workaround for qcow2 triggered XFS corruption (bz #1763519)