Received: from [140.186.70.92] (port=50934 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ppdwi-0005Pr-Hp for qemu-devel@nongnu.org; Wed, 16 Feb 2011 04:45:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ppdwh-0004dE-NY for qemu-devel@nongnu.org; Wed, 16 Feb 2011 04:45:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:64524) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ppdwh-0004dA-Fb for qemu-devel@nongnu.org; Wed, 16 Feb 2011 04:45:15 -0500 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH] uninit drive if drive_init failed References: <4D5B36B0.80804@cn.fujitsu.com> Date: Wed, 16 Feb 2011 10:45:11 +0100 In-Reply-To: <4D5B36B0.80804@cn.fujitsu.com> (Wen Congyang's message of "Wed, 16 Feb 2011 10:30:08 +0800") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wen Congyang Cc: qemu-devel Wen Congyang writes: > steps to reproduce this bug: > 1. virsh attach-disk domain --source imagefile --target sdb --sourcetype file --driver qemu --subdriver qcow2 > error: Failed to attach disk > error: operation failed: adding scsi-disk,bus=scsi0.0,scsi-id=1,drive=drive-scsi0-0-1,id=scsi0-0-1 device failed: Property 'scsi-disk.drive' can't find value 'drive-scsi0-0-1' > > 2. virsh attach-disk domain --source imagefile --target sdb --sourcetype file --driver qemu --subdriver raw > error: Failed to attach disk > error: operation failed: adding scsi-disk,bus=scsi0.0,scsi-id=1,drive=drive-scsi0-0-1,id=scsi0-0-1 device failed: Property 'scsi-disk.drive' can't find value 'drive-scsi0-0-1' > > The format of disk image file is raw. > If we run comand 2 only, we will attach the disk successfully. > > The reason of this bug is that: we do not remove dinfo from drives and dinfo->bdrv from bdrv_states > if we open the disk image file failed. > > Signed-off-by: Wen Congyang Already fixed in Kevin's block tree and 0.14-rc2 (commit 08931947), although not yet in stable. Thanks anyway!