Skip to contentSkip to conversation

vl: disable default cdrom when using explicitely scsi-hd

PATCH Superseded Hervé Poussineau 4 participants 6 messages Dec 31, 2016 – Feb 20, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vl: disable default cdrom when using explicitely scsi-hd

'ide-hd', 'ide-cd' and 'scsi-cd' devices already disable default cdrom. Make it the same for 'scsi-hd'.

That way, we can add/replace the device on lun=2 without using -nodefaults.

---
 vl.c | 1 +
 1 file changed, 1 insertion(+)
vl.c +1 -0
index d77dd86..da97fe2 100644
@@ -223,6 +223,7 @@ static struct {
     { .driver = "ide-hd",               .flag = &default_cdrom     },
     { .driver = "ide-drive",            .flag = &default_cdrom     },
     { .driver = "scsi-cd",              .flag = &default_cdrom     },
+    { .driver = "scsi-hd",              .flag = &default_cdrom     },
     { .driver = "virtio-serial-pci",    .flag = &default_virtcon   },
     { .driver = "virtio-serial",        .flag = &default_virtcon   },
     { .driver = "VGA",                  .flag = &default_vga       },
Signature · 1 line
2.1.4
#1 lore raw
Quoted 4 lines · Hervé Poussineau

'ide-hd', 'ide-cd' and 'scsi-cd' devices already disable default cdrom. Make it the same for 'scsi-hd'.

That way, we can add/replace the device on lun=2 without using -nodefaults.

Yes, but it might upset existing usage that relies on the default CD-ROM. In my opinion, making your needs explicit is better than relying on defaults, but that doesn't mean we can change the defaults unthinkingly. Definitely not qemu-trivial.

Opinions on the change?

Quoted 17 lines
---
 vl.c | 1 +
 1 file changed, 1 insertion(+)
vl.c +1 -0
index d77dd86..da97fe2 100644
@@ -223,6 +223,7 @@ static struct {
     { .driver = "ide-hd",               .flag = &default_cdrom     },
     { .driver = "ide-drive",            .flag = &default_cdrom     },
     { .driver = "scsi-cd",              .flag = &default_cdrom     },
+    { .driver = "scsi-hd",              .flag = &default_cdrom     },
     { .driver = "virtio-serial-pci",    .flag = &default_virtcon   },
     { .driver = "virtio-serial",        .flag = &default_virtcon   },
     { .driver = "VGA",                  .flag = &default_vga       },
#2 lore raw
Quoted 5 lines · Markus Armbruster
Quoted 3 lines · Hervé Poussineau

'ide-hd', 'ide-cd' and 'scsi-cd' devices already disable default cdrom. Make it the same for 'scsi-hd'.

Quoted 8 lines
Quoted 1 line

That way, we can add/replace the device on lun=2 without using -nodefaults.

Yes, but it might upset existing usage that relies on the default CD-ROM. In my opinion, making your needs explicit is better than relying on defaults, but that doesn't mean we can change the defaults unthinkingly. Definitely not qemu-trivial.

Opinions on the change?

The original rationale for the change was "ide-hd has to suppress the default CD-ROM, or else you can't put one on secondary master without -nodefaults" but the same applies for scsi-hd vs. lun=1.

So I'm not sure, but I lean towards accepting the patch.

Paolo

Quoted 19 lines
Quoted 17 lines
---
 vl.c | 1 +
 1 file changed, 1 insertion(+)
vl.c +1 -0
index d77dd86..da97fe2 100644
@@ -223,6 +223,7 @@ static struct {
     { .driver = "ide-hd",               .flag = &default_cdrom     },
     { .driver = "ide-drive",            .flag = &default_cdrom     },
     { .driver = "scsi-cd",              .flag = &default_cdrom     },
+    { .driver = "scsi-hd",              .flag = &default_cdrom     },
     { .driver = "virtio-serial-pci",    .flag = &default_virtcon   },
     { .driver = "virtio-serial",        .flag = &default_virtcon   },
     { .driver = "VGA",                  .flag = &default_vga       },
#3 lore raw

Hi,

Quoted 17 lines · Paolo Bonzini
Quoted 5 lines · Markus Armbruster
Quoted 3 lines · Hervé Poussineau

'ide-hd', 'ide-cd' and 'scsi-cd' devices already disable default cdrom. Make it the same for 'scsi-hd'.

Quoted 8 lines
Quoted 1 line

That way, we can add/replace the device on lun=2 without using -nodefaults.

Yes, but it might upset existing usage that relies on the default CD-ROM. In my opinion, making your needs explicit is better than relying on defaults, but that doesn't mean we can change the defaults unthinkingly. Definitely not qemu-trivial.

Opinions on the change?

Quoted 7 lines

The original rationale for the change was "ide-hd has to suppress the default CD-ROM, or else you can't put one on secondary master without -nodefaults" but the same applies for scsi-hd vs. lun=1.

So I'm not sure, but I lean towards accepting the patch.

Paolo

Paolo, Markus, so what is the conclusion?
Accepting the patch, or refusing it?

Regards,

Hervé

Quoted 21 lines
Quoted 20 lines
Quoted 18 lines
---
 vl.c | 1 +
 1 file changed, 1 insertion(+)
vl.c +1 -0
index d77dd86..da97fe2 100644
@@ -223,6 +223,7 @@ static struct {
     { .driver = "ide-hd",               .flag = &default_cdrom     },
     { .driver = "ide-drive",            .flag = &default_cdrom     },
     { .driver = "scsi-cd",              .flag = &default_cdrom     },
+    { .driver = "scsi-hd",              .flag = &default_cdrom     },
     { .driver = "virtio-serial-pci",    .flag = &default_virtcon   },
     { .driver = "virtio-serial",        .flag = &default_virtcon   },
     { .driver = "VGA",                  .flag = &default_vga       },
#4 lore raw
Quoted 24 lines · Hervé Poussineau

Hi,

Quoted 21 lines · Paolo Bonzini
Quoted 5 lines · Markus Armbruster
Quoted 3 lines · Hervé Poussineau

'ide-hd', 'ide-cd' and 'scsi-cd' devices already disable default cdrom. Make it the same for 'scsi-hd'.

Quoted 8 lines
Quoted 1 line

That way, we can add/replace the device on lun=2 without using -nodefaults.

Yes, but it might upset existing usage that relies on the default CD-ROM. In my opinion, making your needs explicit is better than relying on defaults, but that doesn't mean we can change the defaults unthinkingly. Definitely not qemu-trivial.

Opinions on the change?

The original rationale for the change was "ide-hd has to suppress the default CD-ROM, or else you can't put one on secondary master without -nodefaults" but the same applies for scsi-hd vs. lun=1.

Quoted 6 lines
Quoted 3 lines

So I'm not sure, but I lean towards accepting the patch.

Paolo

Paolo, Markus, so what is the conclusion?
Accepting the patch, or refusing it?

Suggest to repost with the commit message updated to mention the backwards incompatibility, and why you think it's okay.
cc: John Snow <[email protected]>, cc: [email protected]

#5 lore raw
Quoted 28 lines · Markus Armbruster
Quoted 26 lines · Hervé Poussineau

Hi,

Quoted 23 lines · Paolo Bonzini
Quoted 5 lines · Markus Armbruster
Quoted 3 lines · Hervé Poussineau

'ide-hd', 'ide-cd' and 'scsi-cd' devices already disable default cdrom. Make it the same for 'scsi-hd'.

Quoted 8 lines
Quoted 1 line

That way, we can add/replace the device on lun=2 without using -nodefaults.

Yes, but it might upset existing usage that relies on the default CD-ROM. In my opinion, making your needs explicit is better than relying on defaults, but that doesn't mean we can change the defaults unthinkingly. Definitely not qemu-trivial.

Opinions on the change?

The original rationale for the change was "ide-hd has to suppress the default CD-ROM, or else you can't put one on secondary master without -nodefaults" but the same applies for scsi-hd vs. lun=1.

So I'm not sure, but I lean towards accepting the patch.

Quoted 9 lines
Quoted 4 lines
Quoted 1 line

Paolo

Paolo, Markus, so what is the conclusion?
Accepting the patch, or refusing it?

Suggest to repost with the commit message updated to mention the backwards incompatibility, and why you think it's okay.
cc: John Snow <[email protected]>, cc: [email protected]

I don't have a lot of history with the SCSI devices, so I'd be pretty much relying exclusively on a statement on what breaks with the change, and why that breakage would be justified.

No strong feelings for/against right now and am likely to just defer to Paolo, who was leaning towards accepting it.

--js