Bug 1123908 - block.c: multiwrite_merge() truncates overlapping requests
Summary: block.c: multiwrite_merge() truncates overlapping requests
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Stefan Hajnoczi
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-28 15:32 UTC by Stefan Hajnoczi
Modified: 2015-03-05 09:48 UTC (History)
7 users (show)

Fixed In Version: qemu-kvm-rhev-2.1.2-4.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 09:48:45 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0624 normal SHIPPED_LIVE Important: qemu-kvm-rhev security, bug fix, and enhancement update 2015-03-05 14:37:36 UTC
Launchpad 1343827 None None None Never

Description Stefan Hajnoczi 2014-07-28 15:32:34 UTC
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.

Comment 2 Stefan Hajnoczi 2014-10-03 15:56:07 UTC
Backport posted.

Comment 5 Miroslav Rezanina 2014-10-20 07:29:38 UTC
Fix included in qemu-kvm-rhev-2.1.2-4.el7

Comment 7 Shaolong Hu 2014-10-29 11:32:55 UTC
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

Comment 9 errata-xmlrpc 2015-03-05 09:48:45 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/RHSA-2015-0624.html


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