raw-win32.c: Fix incorrect handling behaviour of small block files
authorTal Kain <tal.kain@ravellosystems.com>
Mon, 9 Sep 2013 09:14:55 +0000 (11:14 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 12 Sep 2013 08:12:46 +0000 (10:12 +0200)
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>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/raw-win32.c

index d2d2d9f4d41eda66a406548aca39e9c211d0a8aa..ff3c5ea0d7135f208c95598ef11e73d285cb309a 100644 (file)
@@ -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;