From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGhVH-0003V8-7W for qemu-devel@nongnu.org; Mon, 02 Sep 2013 23:42:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGhVB-0000i3-7m for qemu-devel@nongnu.org; Mon, 02 Sep 2013 23:42:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGhVA-0000hx-VW for qemu-devel@nongnu.org; Mon, 02 Sep 2013 23:42:01 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r833fxFg015718 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 2 Sep 2013 23:41:59 -0400 Message-ID: <522556E8.3030001@redhat.com> Date: Tue, 03 Sep 2013 11:26:32 +0800 From: Guannan Ren MIME-Version: 1.0 References: <1378114724-1748-1-git-send-email-gren@redhat.com> <1378114724-1748-4-git-send-email-gren@redhat.com> <20130902125757.GH15704@redhat.com> In-Reply-To: <20130902125757.GH15704@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [libvirt] [PATCH 3/5] qemu: add usb-bot support from disks points of view List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: libvir-list@redhat.com, qemu-devel@nongnu.org On 09/02/2013 08:57 PM, Daniel P. Berrange wrote: > On Mon, Sep 02, 2013 at 05:38:42PM +0800, Guannan Ren wrote: >> usb-bot only supports 16 luns(0~15) and they must be contiguous, >> (using lun 0 and 2 without 1 doesn't work). In this case qemu >> doesn't throw an error, we can not find the lun 2 in guests. So >> Adding a checking function in libvirt to prevent from this case. > Hmm, this seems like a problematic restriction. > > How does this work if we start off a guest with 3 disks > attached to the usb-bot SCSI controller. Then hot-unplug > the 2nd disk. Currently, the qemu will throw out an error when I hot-unplug any of disks attached to usb-bot controller. { "execute": "device_del", "arguments": { "id": "scsi1-0-0-1"}} {"error": {"class": "GenericError", "desc": "Bus 'scsi1.0' does not support hotplugging"}} Libvirt will report an error: # virsh detach-disk rhel64qcow2 sdd --current error: Failed to detach disk error: internal error: unable to execute QEMU command 'device_del': Bus 'scsi1.0' does not support hotplugging > Next time we need will need to start with with LUNs 0 > and 2 populated only, otherwise we have ABI change upon > migrate or save/restore. > > I think this restriction about contiguous luns must be > removed if this device is to be usable with multiple luns. > > Daniel