From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40395) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKRuA-0006Ly-CI for qemu-devel@nongnu.org; Fri, 13 Sep 2013 07:51:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VKRu5-0001NY-95 for qemu-devel@nongnu.org; Fri, 13 Sep 2013 07:51:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47411) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKRu5-0001NL-0u for qemu-devel@nongnu.org; Fri, 13 Sep 2013 07:51:13 -0400 From: Kevin Wolf Date: Fri, 13 Sep 2013 13:50:33 +0200 Message-Id: <1379073063-14963-4-git-send-email-kwolf@redhat.com> In-Reply-To: <1379073063-14963-1-git-send-email-kwolf@redhat.com> References: <1379073063-14963-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PULL 03/33] raw-win32.c: Fix incorrect handling behaviour of small block files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Tal Kain 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 Signed-off-by: Kevin Wolf --- block/raw-win32.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/raw-win32.c b/block/raw-win32.c index d2d2d9f..ff3c5ea 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.8.1.4