Bug 1226996 - qcow2: Fix minimum L2 cache size
Summary: qcow2: Fix minimum L2 cache size
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Max Reitz
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-01 15:37 UTC by Kevin Wolf
Modified: 2015-12-04 16:43 UTC (History)
5 users (show)

Fixed In Version: qemu-kvm-rhev-2.3.0-3.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-04 16:43:32 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2546 normal SHIPPED_LIVE qemu-kvm-rhev bug fix and enhancement update 2015-12-04 21:11:56 UTC

Description Kevin Wolf 2015-06-01 15:37:36 UTC
The minimum L2 table cache size for qcow2 is incorrectly defined as 1. It needs
to be at least 2 for COW operations on L2 tables to work (this happens with
internal snapshots); otherwise an abort() is triggered.

The problem can be reproduced as follows:

$ qemu-img create -f qcow2 /tmp/test.qcow2 -o cluster_size=1M 64M
Formatting '/tmp/test.qcow2', fmt=qcow2 size=67108864 encryption=off cluster_size=1048576 lazy_refcounts=off refcount_bits=16
$ qemu-io -c 'write 0 1M' /tmp/test.qcow2
wrote 1048576/1048576 bytes at offset 0
1 MiB, 1 ops; 0.0836 sec (11.952 MiB/sec and 11.9524 ops/sec)
$ qemu-img snapshot -c test /tmp/test.qcow2
$ qemu-io -c 'write 0 1M' /tmp/test.qcow2
Aborted (core dumped)

Comment 1 Miroslav Rezanina 2015-06-19 11:09:13 UTC
Fix included in qemu-kvm-rhev-2.3.0-3.el7

Comment 3 Xiaoqing Wei 2015-07-03 05:42:49 UTC
on qemu-kvm-rhev-2.3.0-7.el7
[root@dhcp-11-50 ~]# qemu-img create -f qcow2 /tmp/test.qcow2 -o cluster_size=1M 64M
Formatting '/tmp/test.qcow2', fmt=qcow2 size=67108864 encryption=off cluster_size=1048576 lazy_refcounts=off refcount_bits=16
[root@dhcp-11-50 ~]# qemu-io -c 'write 0 1M' /tmp/test.qcow2
wrote 1048576/1048576 bytes at offset 0
1 MiB, 1 ops; 0.1905 sec (5.248 MiB/sec and 5.2480 ops/sec)
[root@dhcp-11-50 ~]# qemu-img snapshot -c test /tmp/test.qcow2
[root@dhcp-11-50 ~]# qemu-io -c 'write 0 1M' /tmp/test.qcow2
wrote 1048576/1048576 bytes at offset 0
1 MiB, 1 ops; 0.2569 sec (3.892 MiB/sec and 3.8915 ops/sec)


 downgrade to qemu-kvm-rhev-2.3.0-2.el7

[root@dhcp-11-50 ~]# qemu-img create -f qcow2 /tmp/test.qcow2 -o cluster_size=1M 64M
Formatting '/tmp/test.qcow2', fmt=qcow2 size=67108864 encryption=off cluster_size=1048576 lazy_refcounts=off refcount_bits=16
[root@dhcp-11-50 ~]# qemu-io -c 'write 0 1M' /tmp/test.qcow2
wrote 1048576/1048576 bytes at offset 0
1 MiB, 1 ops; 0.3554 sec (2.813 MiB/sec and 2.8131 ops/sec)
[root@dhcp-11-50 ~]# qemu-img snapshot -c test /tmp/test.qcow2
[root@dhcp-11-50 ~]# qemu-io -c 'write 0 1M' /tmp/test.qcow2
Aborted (core dumped)



move to VERIFIED

Comment 5 errata-xmlrpc 2015-12-04 16:43:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2546.html


Note You need to log in before you can comment on or make changes to this bug.