Skip to contentSkip to conversation

IDE: Deprecate ide-drive

PATCH In review John Snow 6 participants 12 messages Oct 9, 2019 – Oct 11, 2019

lore
Share & tools
lore

John Snow

author
#0 lore raw

v2 cover IDE: Deprecate ide-drive

V2: Change phrasings and spellings as Markus suggested.

John Snow (1):
IDE: deprecate ide-drive

 qemu-deprecated.texi          | 5 +++++
 hw/ide/qdev.c                 | 3 +++
 tests/qemu-iotests/051.pc.out | 6 ++++--
 3 files changed, 12 insertions(+), 2 deletions(-)
Signature · 1 line
2.21.0
author
#1 lore raw

PATCH v2 1/1 IDE: deprecate ide-drive

It's an old compatibility shim that just delegates to ide-cd or ide-hd. I'd like to refactor these some day, and getting rid of the super-object will make that easier.

Either way, we don't need this.

---
 qemu-deprecated.texi          | 5 +++++
 hw/ide/qdev.c                 | 3 +++
 tests/qemu-iotests/051.pc.out | 6 ++++--
 3 files changed, 12 insertions(+), 2 deletions(-)
qemu-deprecated.texi +5 -0
index 01245e0b1c4..7cd4648df3c 100644
@@ -247,6 +247,11 @@ quite a bit. It will be removed without replacement unless some users speaks
 up at the @email{qemu-devel@@nongnu.org} mailing list with information about
 their usecases.
 
+@subsection ide-drive (since 4.2)
+
+The 'ide-drive' device is deprecated. Users should use 'ide-hd' or
+'ide-cd' as appropriate to get an IDE hard disk or CD-ROM as needed.
+
 @section System emulator machines
 
 @subsection pc-0.12, pc-0.13, pc-0.14 and pc-0.15 (since 4.0)
hw/ide/qdev.c +3 -0
index 6fba6b62b87..3666e597211 100644
@@ -279,6 +279,9 @@ static void ide_drive_realize(IDEDevice *dev, Error **errp)
 {
     DriveInfo *dinfo = NULL;
 
+    warn_report("'ide-drive' is deprecated, "
+                "please use 'ide-hd' or 'ide-cd' instead");
+
     if (dev->conf.blk) {
         dinfo = blk_legacy_dinfo(dev->conf.blk);
     }
tests/qemu-iotests/051.pc.out +4 -2
index 000557c7c83..34849dd1720 100644
@@ -158,7 +158,8 @@ QEMU X.Y.Z monitor - type 'help' for more information
 
 Testing: -drive if=none,id=disk -device ide-drive,drive=disk
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -device ide-drive,drive=disk: Device needs media, but drive is empty
+(qemu) QEMU_PROG: -device ide-drive,drive=disk: warning: 'ide-drive' is deprecated, please use 'ide-hd' or 'ide-cd' instead
+QEMU_PROG: -device ide-drive,drive=disk: Device needs media, but drive is empty
 
 Testing: -drive if=none,id=disk -device ide-hd,drive=disk
 QEMU X.Y.Z monitor - type 'help' for more information
@@ -228,7 +229,8 @@ QEMU X.Y.Z monitor - type 'help' for more information
 
 Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-drive,drive=disk
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -device ide-drive,drive=disk: Block node is read-only
+(qemu) QEMU_PROG: -device ide-drive,drive=disk: warning: 'ide-drive' is deprecated, please use 'ide-hd' or 'ide-cd' instead
+QEMU_PROG: -device ide-drive,drive=disk: Block node is read-only
 
 Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-hd,drive=disk
 QEMU X.Y.Z monitor - type 'help' for more information
Signature · 1 line
2.21.0
Reviewed-by on v2 1/1
#2 lore raw

Re: [PATCH v2 1/1] IDE: deprecate ide-drive

Quoted 6 lines · John Snow

It's an old compatibility shim that just delegates to ide-cd or ide-hd. I'd like to refactor these some day, and getting rid of the super-object will make that easier.

Either way, we don't need this.

Quoted 7 lines
---
 qemu-deprecated.texi          | 5 +++++
 hw/ide/qdev.c                 | 3 +++
 tests/qemu-iotests/051.pc.out | 6 ++++--
 3 files changed, 12 insertions(+), 2 deletions(-)
Reviewed-by on v2 1/1
#3 lore raw

Re: [PATCH v2 1/1] IDE: deprecate ide-drive

In reply to John Snow
Quoted 8 lines · John Snow

It's an old compatibility shim that just delegates to ide-cd or ide-hd. I'd like to refactor these some day, and getting rid of the super-object will make that easier.

Either way, we don't need this.

#4 lore raw

Re: [PATCH v2 1/1] IDE: deprecate ide-drive

In reply to John Snow
Quoted 7 lines · John Snow

It's an old compatibility shim that just delegates to ide-cd or ide-hd. I'd like to refactor these some day, and getting rid of the super-object will make that easier.

Either way, we don't need this.

Peter made a comment regarding Laszlo's Regression-tested-by tag:

[...] nobody else is using
this convention (there are exactly 0 instances of "Regression-tested-by" in the project git log as far as I can see), and so in practice people reading the commits won't really know what you meant by it. Everybody else on the project uses "Tested-by" to mean either of the two cases you describe above, without distinction...

It probably applies to 'Libvirt-checked-by' too.

https://www.mail-archive.com/[email protected]/msg632705.html

Quoted 2 lines

---

#5 lore raw

Re: [PATCH v2 1/1] IDE: deprecate ide-drive

Quoted 19 lines · Philippe Mathieu-Daudé
Quoted 7 lines · John Snow

It's an old compatibility shim that just delegates to ide-cd or ide-hd. I'd like to refactor these some day, and getting rid of the super-object will make that easier.

Either way, we don't need this.

Peter made a comment regarding Laszlo's Regression-tested-by tag:

[...] nobody else is using
this convention (there are exactly 0 instances of "Regression-tested-by" in the project git log as far as I can see), and so in practice people reading the commits won't really know what you meant by it. Everybody else on the project uses "Tested-by" to mean either of the two cases you describe above, without distinction...

Quoted 1 line

It probably applies to 'Libvirt-checked-by' too.

I certainly didn't test it. So feel free to drop that line altogether.

#6 lore raw

Re: [PATCH v2 1/1] IDE: deprecate ide-drive

Quoted 20 lines · Peter Krempa
Quoted 19 lines · Philippe Mathieu-Daudé
Quoted 7 lines · John Snow

It's an old compatibility shim that just delegates to ide-cd or ide-hd. I'd like to refactor these some day, and getting rid of the super-object will make that easier.

Either way, we don't need this.

Peter made a comment regarding Laszlo's Regression-tested-by tag:

[...] nobody else is using
this convention (there are exactly 0 instances of "Regression-tested-by" in the project git log as far as I can see), and so in practice people reading the commits won't really know what you meant by it. Everybody else on the project uses "Tested-by" to mean either of the two cases you describe above, without distinction...

Quoted 3 lines
Quoted 1 line

It probably applies to 'Libvirt-checked-by' too.

I certainly didn't test it. So feel free to drop that line altogether.

But you reviewed it, can we use your 'Reviewed-by' instead?

#7 lore raw

Re: [PATCH v2 1/1] IDE: deprecate ide-drive

Quoted 21 lines · Philippe Mathieu-Daudé
Quoted 20 lines · Peter Krempa
Quoted 19 lines · Philippe Mathieu-Daudé
Quoted 7 lines · John Snow

It's an old compatibility shim that just delegates to ide-cd or ide-hd. I'd like to refactor these some day, and getting rid of the super-object will make that easier.

Either way, we don't need this.

Peter made a comment regarding Laszlo's Regression-tested-by tag:

[...] nobody else is using
this convention (there are exactly 0 instances of "Regression-tested-by" in the project git log as far as I can see), and so in practice people reading the commits won't really know what you meant by it. Everybody else on the project uses "Tested-by" to mean either of the two cases you describe above, without distinction...

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

It probably applies to 'Libvirt-checked-by' too.

I certainly didn't test it. So feel free to drop that line altogether.

But you reviewed it, can we use your 'Reviewed-by' instead?

To be honest, I didn't really review the code nor the documentation. I actually reviewed only the idea itself in the context of integration with libvirt and that's why I didn't go for 'Reviewed-by:'.

The gist of the citation above is that we should stick to well known tags with their well known meanings and I think that considering this a 'review' would be a stretch of the definiton.

#8 lore raw

Re: [PATCH v2 1/1] IDE: deprecate ide-drive

Am 10.10.2019 um 13:54 hat Peter Krempa geschrieben:

Quoted 28 lines · Philippe Mathieu-Daudé
Quoted 21 lines · Peter Krempa
Quoted 20 lines · Philippe Mathieu-Daudé
Quoted 19 lines · John Snow
Quoted 7 lines

It's an old compatibility shim that just delegates to ide-cd or ide-hd. I'd like to refactor these some day, and getting rid of the super-object will make that easier.

Either way, we don't need this.

Peter made a comment regarding Laszlo's Regression-tested-by tag:

[...] nobody else is using
this convention (there are exactly 0 instances of "Regression-tested-by" in the project git log as far as I can see), and so in practice people reading the commits won't really know what you meant by it. Everybody else on the project uses "Tested-by" to mean either of the two cases you describe above, without distinction...

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

It probably applies to 'Libvirt-checked-by' too.

I certainly didn't test it. So feel free to drop that line altogether.

But you reviewed it, can we use your 'Reviewed-by' instead?

Quoted 7 lines

To be honest, I didn't really review the code nor the documentation. I actually reviewed only the idea itself in the context of integration with libvirt and that's why I didn't go for 'Reviewed-by:'.

The gist of the citation above is that we should stick to well known tags with their well known meanings and I think that considering this a 'review' would be a stretch of the definiton.

I think Acked-by works well for instances like this (i.e. you're just saying that you agree and the intended change is fine from libvirt's POV, not that you made any effort to check that the patches are correct or anything).

Kevin

author
#9 lore raw

Re: [PATCH v2 1/1] IDE: deprecate ide-drive

In reply to Peter Krempa
Quoted 28 lines · Peter Krempa
Quoted 21 lines · Philippe Mathieu-Daudé
Quoted 20 lines · Peter Krempa
Quoted 19 lines · Philippe Mathieu-Daudé
Quoted 7 lines · John Snow

It's an old compatibility shim that just delegates to ide-cd or ide-hd. I'd like to refactor these some day, and getting rid of the super-object will make that easier.

Either way, we don't need this.

Peter made a comment regarding Laszlo's Regression-tested-by tag:

[...] nobody else is using
this convention (there are exactly 0 instances of "Regression-tested-by" in the project git log as far as I can see), and so in practice people reading the commits won't really know what you meant by it. Everybody else on the project uses "Tested-by" to mean either of the two cases you describe above, without distinction...

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

It probably applies to 'Libvirt-checked-by' too.

I certainly didn't test it. So feel free to drop that line altogether.

But you reviewed it, can we use your 'Reviewed-by' instead?

Quoted 8 lines

To be honest, I didn't really review the code nor the documentation. I actually reviewed only the idea itself in the context of integration with libvirt and that's why I didn't go for 'Reviewed-by:'.

The gist of the citation above is that we should stick to well known tags with their well known meanings and I think that considering this a 'review' would be a stretch of the definiton.

I wasn't aware that PMM wanted to avoid non-standard tags; I consider them to be for human use, but I can change that behavior.

Peter, I'll change it to an ACK (as suggested by Kevin) is that's OK by you.

--js

Acked-by
#10 lore raw

Re: [PATCH v2 1/1] IDE: deprecate ide-drive

Quoted 3 lines · John Snow
Quoted 2 lines · Peter Krempa
Quoted 1 line · Philippe Mathieu-Daudé

On 10/10/19 1:26 PM, Peter Krempa wrote:

[...]

Quoted 9 lines
Quoted 8 lines

To be honest, I didn't really review the code nor the documentation. I actually reviewed only the idea itself in the context of integration with libvirt and that's why I didn't go for 'Reviewed-by:'.

The gist of the citation above is that we should stick to well known tags with their well known meanings and I think that considering this a 'review' would be a stretch of the definiton.

Quoted 4 lines

I wasn't aware that PMM wanted to avoid non-standard tags; I consider them to be for human use, but I can change that behavior.

Peter, I'll change it to an ACK (as suggested by Kevin) is that's OK by you.

Sure! I'll spell it out even for compliance:

author Applied
#11 lore raw

Re: [PATCH v2 1/1] IDE: deprecate ide-drive

Quoted 16 lines · Peter Krempa
Quoted 3 lines · John Snow
Quoted 2 lines · Peter Krempa
Quoted 1 line · Philippe Mathieu-Daudé

On 10/10/19 1:26 PM, Peter Krempa wrote:

[...]

Quoted 9 lines
Quoted 8 lines

To be honest, I didn't really review the code nor the documentation. I actually reviewed only the idea itself in the context of integration with libvirt and that's why I didn't go for 'Reviewed-by:'.

The gist of the citation above is that we should stick to well known tags with their well known meanings and I think that considering this a 'review' would be a stretch of the definiton.

Quoted 9 lines
Quoted 4 lines

I wasn't aware that PMM wanted to avoid non-standard tags; I consider them to be for human use, but I can change that behavior.

Peter, I'll change it to an ACK (as suggested by Kevin) is that's OK by you.

Sure! I'll spell it out even for compliance:

Thanks, applied to my IDE tree:

https://github.com/jnsnow/qemu/commits/ide
https://github.com/jnsnow/qemu.git

--js