qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH +stable] block: don't attempt to merge overlapping requests
@ 2010-05-18 17:18 Avi Kivity
  2010-05-18 19:22 ` [Qemu-devel] " Stefan Hajnoczi
  0 siblings, 1 reply; 10+ messages in thread
From: Avi Kivity @ 2010-05-18 17:18 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel, kvm

The block multiwrite code pretends to be able to merge overlapping requests,
but doesn't do so in fact.  This leads to I/O errors (for example on mkfs
of a large virtio disk).

Signed-off-by: Avi Kivity <avi@redhat.com>
---
 block.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/block.c b/block.c
index 48305b7..0e44e26 100644
--- a/block.c
+++ b/block.c
@@ -1956,8 +1956,8 @@ static int multiwrite_merge(BlockDriverState *bs, BlockRequest *reqs,
         int64_t oldreq_last = reqs[outidx].sector + reqs[outidx].nb_sectors;
 
         // This handles the cases that are valid for all block drivers, namely
-        // exactly sequential writes and overlapping writes.
-        if (reqs[i].sector <= oldreq_last) {
+        // exactly sequential writes
+        if (reqs[i].sector == oldreq_last) {
             merge = 1;
         }
 
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-05-19  9:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-18 17:18 [Qemu-devel] [PATCH +stable] block: don't attempt to merge overlapping requests Avi Kivity
2010-05-18 19:22 ` [Qemu-devel] " Stefan Hajnoczi
2010-05-18 19:37   ` Stefan Hajnoczi
2010-05-18 19:41     ` Michael Tokarev
2010-05-18 20:19       ` Stefan Hajnoczi
2010-05-19  8:09   ` Avi Kivity
2010-05-19  9:01     ` Stefan Hajnoczi
2010-05-19  9:06       ` Avi Kivity
2010-05-19  9:23         ` Stefan Hajnoczi
2010-05-19  9:31           ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).