Received: from eggs.gnu.org ([2001:4830:134:3::10]:56345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VIweN-0006dz-Bv for qemu-devel@nongnu.org; Mon, 09 Sep 2013 04:16:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VIweG-0008L5-D7 for qemu-devel@nongnu.org; Mon, 09 Sep 2013 04:16:47 -0400 Received: from na3sys010aog103.obsmtp.com ([74.125.245.74]:39524) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1VIweG-0008Kw-5K for qemu-devel@nongnu.org; Mon, 09 Sep 2013 04:16:40 -0400 Received: by mail-wi0-f176.google.com with SMTP id cb5so3028169wib.15 for ; Mon, 09 Sep 2013 01:16:37 -0700 (PDT) From: Tal Kain Date: Mon, 9 Sep 2013 11:14:55 +0200 Message-Id: <1378718095-18850-1-git-send-email-tal.kain@ravellosystems.com> Subject: [Qemu-devel] [PATCH] raw-win32.c: Fix incorrect handling behaviour of small block files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, hvx@ravellosystems.com, Tal Kain , stefanha@redhat.com 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 --- 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