From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6Mkw-0001za-E8 for qemu-devel@nongnu.org; Tue, 28 Aug 2012 10:27:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T6Mkq-0006Zx-Kt for qemu-devel@nongnu.org; Tue, 28 Aug 2012 10:27:02 -0400 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:35127) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6Mkq-0006Zp-CP for qemu-devel@nongnu.org; Tue, 28 Aug 2012 10:26:56 -0400 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 28 Aug 2012 15:26:54 +0100 Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by b06cxnps3075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q7SEQkVr23265530 for ; Tue, 28 Aug 2012 14:26:46 GMT Received: from d06av12.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q7SEQqct002136 for ; Tue, 28 Aug 2012 08:26:52 -0600 From: Stefan Hajnoczi Date: Tue, 28 Aug 2012 15:26:47 +0100 Message-Id: <1346164009-30648-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v2 for-1.2 0/2] stream: complete early if end of backing file is reached List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Paolo Bonzini , Anthony Liguori , Stefan Hajnoczi Image streaming hangs if the backing image is smaller than the image file. The problem is that the image streaming loop makes no progress when bdrv_co_is_allocated() returns 0 with pnum=0. More details in the actual patch. I have also included a qemu-iotest to check this scenario. It hangs when run against qemu.git/master and passes when the patch is applied. Stefan Hajnoczi (2): stream: complete early if end of backing file is reached qemu-iotests: add backing file smaller than image test case block/stream.c | 6 ++++++ tests/qemu-iotests/030 | 33 +++++++++++++++++++++++++++++++++ tests/qemu-iotests/030.out | 4 ++-- 3 files changed, 41 insertions(+), 2 deletions(-) -- 1.7.10.4