* [Qemu-devel] [PATCH] Fix backcompat for hotplug of SCSI controllers
@ 2009-12-07 20:51 Daniel P. Berrange
2009-12-07 21:54 ` Anthony Liguori
0 siblings, 1 reply; 3+ messages in thread
From: Daniel P. Berrange @ 2009-12-07 20:51 UTC (permalink / raw)
To: qemu-devel
SCSI controllers have no trouble existing without any attached
disks. This could be achieved with the (legacy) monitor syntax
pci_add pci_addr=auto storage if=scsi
This is now denied with
scsi requires a backing file/device.
failed to add if=scsi
There is no need for this denial and it breaks compatability
with existing QEMU usage, so remove the check for presence
of a drive.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
hw/pci-hotplug.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index 081d6d1..616435a 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -182,14 +182,10 @@ static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon,
switch (type) {
case IF_SCSI:
- if (!dinfo) {
- monitor_printf(mon, "scsi requires a backing file/device.\n");
- return NULL;
- }
dev = pci_create(bus, devfn, "lsi53c895a");
if (qdev_init(&dev->qdev) < 0)
dev = NULL;
- if (dev) {
+ if (dev && dinfo) {
if (scsi_hot_add(&dev->qdev, dinfo, 0) != 0) {
qdev_unplug(&dev->qdev);
dev = NULL;
--
1.6.5.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix backcompat for hotplug of SCSI controllers
2009-12-07 20:51 [Qemu-devel] [PATCH] Fix backcompat for hotplug of SCSI controllers Daniel P. Berrange
@ 2009-12-07 21:54 ` Anthony Liguori
2009-12-08 10:49 ` Gerd Hoffmann
0 siblings, 1 reply; 3+ messages in thread
From: Anthony Liguori @ 2009-12-07 21:54 UTC (permalink / raw)
To: Daniel P. Berrange; +Cc: qemu-devel
Daniel P. Berrange wrote:
> SCSI controllers have no trouble existing without any attached
> disks. This could be achieved with the (legacy) monitor syntax
>
> pci_add pci_addr=auto storage if=scsi
>
> This is now denied with
>
> scsi requires a backing file/device.
> failed to add if=scsi
>
> There is no need for this denial and it breaks compatability
> with existing QEMU usage, so remove the check for presence
> of a drive.
>
Gerd, care to comment? This bit of code seems pretty intentional:
commit 5b684b5a56e81f6f88234952fe8ed68010c36e19
Author: Gerd Hoffmann <kraxel@redhat.com>
Date: Tue Oct 13 13:59:55 2009 +0200
hotplug: fix "pci_add storage if=scsi"
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
> hw/pci-hotplug.c | 6 +-----
> 1 files changed, 1 insertions(+), 5 deletions(-)
>
> diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
> index 081d6d1..616435a 100644
> --- a/hw/pci-hotplug.c
> +++ b/hw/pci-hotplug.c
> @@ -182,14 +182,10 @@ static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon,
>
> switch (type) {
> case IF_SCSI:
> - if (!dinfo) {
> - monitor_printf(mon, "scsi requires a backing file/device.\n");
> - return NULL;
> - }
> dev = pci_create(bus, devfn, "lsi53c895a");
> if (qdev_init(&dev->qdev) < 0)
> dev = NULL;
> - if (dev) {
> + if (dev && dinfo) {
> if (scsi_hot_add(&dev->qdev, dinfo, 0) != 0) {
> qdev_unplug(&dev->qdev);
> dev = NULL;
>
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix backcompat for hotplug of SCSI controllers
2009-12-07 21:54 ` Anthony Liguori
@ 2009-12-08 10:49 ` Gerd Hoffmann
0 siblings, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2009-12-08 10:49 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel
On 12/07/09 22:54, Anthony Liguori wrote:
> Daniel P. Berrange wrote:
>> SCSI controllers have no trouble existing without any attached
>> disks. This could be achieved with the (legacy) monitor syntax
>>
>> pci_add pci_addr=auto storage if=scsi
>>
>> This is now denied with
>>
>> scsi requires a backing file/device.
>> failed to add if=scsi
>>
>> There is no need for this denial and it breaks compatability
>> with existing QEMU usage, so remove the check for presence
>> of a drive.
>
> Gerd, care to comment? This bit of code seems pretty intentional:
Looks fine to me. If older qemu versions allow creating disk-less scsi
adapters this way we should keep that behavior for compatibility reasons.
> commit 5b684b5a56e81f6f88234952fe8ed68010c36e19
> Author: Gerd Hoffmann <kraxel@redhat.com>
> Date: Tue Oct 13 13:59:55 2009 +0200
>
> hotplug: fix "pci_add storage if=scsi"
There is no conflict with this bugfix.
cheers,
Gerd
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-12-08 10:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-07 20:51 [Qemu-devel] [PATCH] Fix backcompat for hotplug of SCSI controllers Daniel P. Berrange
2009-12-07 21:54 ` Anthony Liguori
2009-12-08 10:49 ` Gerd Hoffmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).