From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51607 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OYhob-0006Kb-0l for qemu-devel@nongnu.org; Tue, 13 Jul 2010 11:54:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OYhoZ-0001Z1-C6 for qemu-devel@nongnu.org; Tue, 13 Jul 2010 11:54:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17858) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OYhoZ-0001Yl-5o for qemu-devel@nongnu.org; Tue, 13 Jul 2010 11:54:35 -0400 From: Kevin Wolf Date: Tue, 13 Jul 2010 17:54:23 +0200 Message-Id: <1279036466-19934-3-git-send-email-kwolf@redhat.com> In-Reply-To: <1279036466-19934-1-git-send-email-kwolf@redhat.com> References: <1279036466-19934-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 2/5] Block migration fail, ignore error from bdrv_getlength List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Shahar Havivi When there is no block driver associate with BlockDriverState bdrv_getlength returns -ENOMEDIUM that cause block migration to fail Signed-off-by: Shahar Havivi Signed-off-by: Kevin Wolf --- block-migration.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/block-migration.c b/block-migration.c index 7db6f02..a77106e 100644 --- a/block-migration.c +++ b/block-migration.c @@ -238,7 +238,7 @@ static void init_blk_migration_it(void *opaque, BlockDriverState *bs) if (!bdrv_is_read_only(bs)) { sectors = bdrv_getlength(bs) >> BDRV_SECTOR_BITS; - if (sectors == 0) { + if (sectors <= 0) { return; } -- 1.7.1.1