qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] raw-win32.c: Fix incorrect handling behaviour of small block files
@ 2013-09-09  9:14 Tal Kain
  2013-09-09  9:31 ` Kevin Wolf
  0 siblings, 1 reply; 2+ messages in thread
From: Tal Kain @ 2013-09-09  9:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, hvx, Tal Kain, stefanha

It is a valid case that the read data's size is smaller than the
requested size since there could be files that are smaller than
the minimum block size (For ex. when a VMDK disk descriptor file)

Signed-off-by: Tal Kain <tal.kain@ravellosystems.com>
---
 block/raw-win32.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/block/raw-win32.c b/block/raw-win32.c
index 9b5b2af..bffbee8 100644
--- a/block/raw-win32.c
+++ b/block/raw-win32.c
@@ -85,6 +85,7 @@ static size_t handle_aiocb_rw(RawWin32AIOData *aiocb)
             ret_count = 0;
         }
         if (ret_count != len) {
+            offset += ret_count;
             break;
         }
         offset += len;
-- 
1.7.9.5

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

end of thread, other threads:[~2013-09-09  9:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-09  9:14 [Qemu-devel] [PATCH] raw-win32.c: Fix incorrect handling behaviour of small block files Tal Kain
2013-09-09  9:31 ` Kevin Wolf

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).