Red Hat Bugzilla – Bug 1123908
block.c: multiwrite_merge() truncates overlapping requests
Last modified: 2015-03-05 04:48:45 EST
Description of problem: When two write requests overlap, multiwrite_merge() may truncate the longer request. See upstream bug report for details: https://bugs.launchpad.net/qemu/+bug/1343827 Tasks: 1. Write qemu-iotests test case that demonstrates the problem. 2. Develop multiwrite_merge() fix that makes the test pass.
Backport posted.
Fix included in qemu-kvm-rhev-2.1.2-4.el7
Reproduced by git checkout qemu-kvm-rhev-2.1.2-3.el7: 1. git checkout qemu-kvm-rhev-2.1.2-3.el7 ./configure && make cd test/qemu-iotests/ ./check 100 QEMU -- /root/qemu-kvm/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x86_64 QEMU_IMG -- /root/qemu-kvm/tests/qemu-iotests/../../qemu-img QEMU_IO -- /root/qemu-kvm/tests/qemu-iotests/../../qemu-io QEMU_NBD -- /root/qemu-kvm/tests/qemu-iotests/../../qemu-nbd IMGFMT -- raw IMGPROTO -- file PLATFORM -- Linux/x86_64 localhost 3.10.0-187.el7.x86_64 SOCKET_SCM_HELPER -- /root/qemu-kvm/tests/qemu-iotests/socket_scm_helper 100 - output mismatch (see 100.out.bad) --- /root/qemu-kvm/tests/qemu-iotests/100.out 2014-10-29 19:28:03.640004106 +0800 +++ 100.out.bad 2014-10-29 19:28:17.518715688 +0800 @@ -32,6 +32,7 @@ == verify pattern == read 1024/1024 bytes at offset 0 1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +Pattern verification failed at offset 3072, 1024 bytes read 1024/1024 bytes at offset 3072 1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) read 4096/4096 bytes at offset 4096 @@ -45,6 +46,7 @@ == verify pattern == read 1024/1024 bytes at offset 0 1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +Pattern verification failed at offset 3072, 1024 bytes read 1024/1024 bytes at offset 3072 1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) read 4096/4096 bytes at offset 4096 Failures: 100 Failed 1 of 1 tests Verified on qemu-kvm-rhev-2.1.2-5.el7: git checkout qemu-kvm-rhev-2.1.2-5.el7 repeat the above test: # ./check 100 QEMU -- /root/qemu-kvm/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x86_64 QEMU_IMG -- /root/qemu-kvm/tests/qemu-iotests/../../qemu-img QEMU_IO -- /root/qemu-kvm/tests/qemu-iotests/../../qemu-io QEMU_NBD -- /root/qemu-kvm/tests/qemu-iotests/../../qemu-nbd IMGFMT -- raw IMGPROTO -- file PLATFORM -- Linux/x86_64 localhost 3.10.0-187.el7.x86_64 SOCKET_SCM_HELPER -- /root/qemu-kvm/tests/qemu-iotests/socket_scm_helper 100 Passed all 1 tests
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/RHSA-2015-0624.html