[Qemu-devel] [PATCH v3 0/6] Convert to realize and improve error handling

Mao Zhongyi posted 6 patches 6 years, 7 months ago
Failed in applying to current master (apply log)
Test checkpatch passed
Test docker passed
Test s390x passed
There is a newer version of this series
hw/block/block.c                | 15 ++++---
hw/block/dataplane/virtio-blk.c | 12 +++---
hw/block/dataplane/virtio-blk.h |  2 +-
hw/block/fdc.c                  | 48 +++++++++------------
hw/block/nvme.c                 | 24 +++++------
hw/block/virtio-blk.c           | 17 +++-----
hw/ide/core.c                   |  7 +--
hw/ide/qdev.c                   | 94 +++++++++++++++++++----------------------
hw/scsi/scsi-disk.c             | 13 ++----
hw/usb/dev-storage.c            | 29 ++++++-------
include/hw/block/block.h        |  4 +-
include/hw/ide/internal.h       |  5 ++-
tests/qemu-iotests/051.pc.out   | 10 +----
tests/qemu-iotests/172.out      |  8 ----
14 files changed, 127 insertions(+), 161 deletions(-)
[Qemu-devel] [PATCH v3 0/6] Convert to realize and improve error handling
Posted by Mao Zhongyi 6 years, 7 months ago
This series mainly implements the conversions of ide, floppy and nvme
device to realize. Add some error handling messages and remove the local
variable local_err, use errp to propagate the error directly. Also
fix the unusual function name.

v3:
  -patch1: update the test output in 051  [John Snow] 
  -patch2: update the test putput in 172  [John Snow]

v2:
  -use bool as the return type instead of int. [Markus Armbruster & Stefan Hajnoczi]

Cc: John Snow <jsnow@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>

Mao Zhongyi (6):
  hw/ide: Convert DeviceClass init to realize
  hw/block/fdc: Convert to realize
  hw/block/nvme: Convert to realize
  hw/block: Fix the return type
  hw/block: Use errp directly rather than local_err
  dev-storage: Fix the unusual function name

 hw/block/block.c                | 15 ++++---
 hw/block/dataplane/virtio-blk.c | 12 +++---
 hw/block/dataplane/virtio-blk.h |  2 +-
 hw/block/fdc.c                  | 48 +++++++++------------
 hw/block/nvme.c                 | 24 +++++------
 hw/block/virtio-blk.c           | 17 +++-----
 hw/ide/core.c                   |  7 +--
 hw/ide/qdev.c                   | 94 +++++++++++++++++++----------------------
 hw/scsi/scsi-disk.c             | 13 ++----
 hw/usb/dev-storage.c            | 29 ++++++-------
 include/hw/block/block.h        |  4 +-
 include/hw/ide/internal.h       |  5 ++-
 tests/qemu-iotests/051.pc.out   | 10 +----
 tests/qemu-iotests/172.out      |  8 ----
 14 files changed, 127 insertions(+), 161 deletions(-)

-- 
2.9.4




Re: [Qemu-devel] [PATCH v3 0/6] Convert to realize and improve error handling
Posted by John Snow 6 years, 7 months ago

On 09/18/2017 10:05 AM, Mao Zhongyi wrote:
> This series mainly implements the conversions of ide, floppy and nvme
> device to realize. Add some error handling messages and remove the local
> variable local_err, use errp to propagate the error directly. Also
> fix the unusual function name.
> 
> v3:
>   -patch1: update the test output in 051  [John Snow] 
>   -patch2: update the test putput in 172  [John Snow]
> 
> v2:
>   -use bool as the return type instead of int. [Markus Armbruster & Stefan Hajnoczi]
> 
> Cc: John Snow <jsnow@redhat.com>
> Cc: Kevin Wolf <kwolf@redhat.com>
> Cc: Max Reitz <mreitz@redhat.com>
> Cc: Keith Busch <keith.busch@intel.com>
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Markus Armbruster <armbru@redhat.com>
> 
> Mao Zhongyi (6):
>   hw/ide: Convert DeviceClass init to realize
>   hw/block/fdc: Convert to realize
>   hw/block/nvme: Convert to realize
>   hw/block: Fix the return type
>   hw/block: Use errp directly rather than local_err
>   dev-storage: Fix the unusual function name
> 
>  hw/block/block.c                | 15 ++++---
>  hw/block/dataplane/virtio-blk.c | 12 +++---
>  hw/block/dataplane/virtio-blk.h |  2 +-
>  hw/block/fdc.c                  | 48 +++++++++------------
>  hw/block/nvme.c                 | 24 +++++------
>  hw/block/virtio-blk.c           | 17 +++-----
>  hw/ide/core.c                   |  7 +--
>  hw/ide/qdev.c                   | 94 +++++++++++++++++++----------------------
>  hw/scsi/scsi-disk.c             | 13 ++----
>  hw/usb/dev-storage.c            | 29 ++++++-------
>  include/hw/block/block.h        |  4 +-
>  include/hw/ide/internal.h       |  5 ++-
>  tests/qemu-iotests/051.pc.out   | 10 +----
>  tests/qemu-iotests/172.out      |  8 ----
>  14 files changed, 127 insertions(+), 161 deletions(-)
> 

Hi Mao Zhongyi:

I've staged patches one and two here for my IDE pull request.

I think patches 3-6 here would belong to Kevin.

Thanks,
John

Re: [Qemu-devel] [PATCH v3 0/6] Convert to realize and improve error handling
Posted by Mao Zhongyi 6 years, 7 months ago

On 09/19/2017 07:59 AM, John Snow wrote:
>
>
> On 09/18/2017 10:05 AM, Mao Zhongyi wrote:
>> This series mainly implements the conversions of ide, floppy and nvme
>> device to realize. Add some error handling messages and remove the local
>> variable local_err, use errp to propagate the error directly. Also
>> fix the unusual function name.
>>
>> v3:
>>   -patch1: update the test output in 051  [John Snow]
>>   -patch2: update the test putput in 172  [John Snow]
>>
>> v2:
>>   -use bool as the return type instead of int. [Markus Armbruster & Stefan Hajnoczi]
>>
>> Cc: John Snow <jsnow@redhat.com>
>> Cc: Kevin Wolf <kwolf@redhat.com>
>> Cc: Max Reitz <mreitz@redhat.com>
>> Cc: Keith Busch <keith.busch@intel.com>
>> Cc: Stefan Hajnoczi <stefanha@redhat.com>
>> Cc: "Michael S. Tsirkin" <mst@redhat.com>
>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>> Cc: Markus Armbruster <armbru@redhat.com>
>>
>> Mao Zhongyi (6):
>>   hw/ide: Convert DeviceClass init to realize
>>   hw/block/fdc: Convert to realize
>>   hw/block/nvme: Convert to realize
>>   hw/block: Fix the return type
>>   hw/block: Use errp directly rather than local_err
>>   dev-storage: Fix the unusual function name
>>
>>  hw/block/block.c                | 15 ++++---
>>  hw/block/dataplane/virtio-blk.c | 12 +++---
>>  hw/block/dataplane/virtio-blk.h |  2 +-
>>  hw/block/fdc.c                  | 48 +++++++++------------
>>  hw/block/nvme.c                 | 24 +++++------
>>  hw/block/virtio-blk.c           | 17 +++-----
>>  hw/ide/core.c                   |  7 +--
>>  hw/ide/qdev.c                   | 94 +++++++++++++++++++----------------------
>>  hw/scsi/scsi-disk.c             | 13 ++----
>>  hw/usb/dev-storage.c            | 29 ++++++-------
>>  include/hw/block/block.h        |  4 +-
>>  include/hw/ide/internal.h       |  5 ++-
>>  tests/qemu-iotests/051.pc.out   | 10 +----
>>  tests/qemu-iotests/172.out      |  8 ----
>>  14 files changed, 127 insertions(+), 161 deletions(-)
>>
>
> Hi Mao Zhongyi:
>
> I've staged patches one and two here for my IDE pull request.
>
> I think patches 3-6 here would belong to Kevin.
>
> Thanks,
> John
>

Hi, John

OK, I see.

Thanks for the quick review. :)
--
Mao






Re: [Qemu-devel] [PATCH v3 0/6] Convert to realize and improve error handling
Posted by Mao Zhongyi 6 years, 6 months ago
Hi,

Long time no news. Ping...

Thanks,
Mao



On 09/19/2017 09:25 AM, Mao Zhongyi wrote:
>
>
> On 09/19/2017 07:59 AM, John Snow wrote:
>>
>>
>> On 09/18/2017 10:05 AM, Mao Zhongyi wrote:
>>> This series mainly implements the conversions of ide, floppy and nvme
>>> device to realize. Add some error handling messages and remove the local
>>> variable local_err, use errp to propagate the error directly. Also
>>> fix the unusual function name.
>>>
>>> v3:
>>>   -patch1: update the test output in 051  [John Snow]
>>>   -patch2: update the test putput in 172  [John Snow]
>>>
>>> v2:
>>>   -use bool as the return type instead of int. [Markus Armbruster & Stefan Hajnoczi]
>>>
>>> Cc: John Snow <jsnow@redhat.com>
>>> Cc: Kevin Wolf <kwolf@redhat.com>
>>> Cc: Max Reitz <mreitz@redhat.com>
>>> Cc: Keith Busch <keith.busch@intel.com>
>>> Cc: Stefan Hajnoczi <stefanha@redhat.com>
>>> Cc: "Michael S. Tsirkin" <mst@redhat.com>
>>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>>> Cc: Markus Armbruster <armbru@redhat.com>
>>>
>>> Mao Zhongyi (6):
>>>   hw/ide: Convert DeviceClass init to realize
>>>   hw/block/fdc: Convert to realize
>>>   hw/block/nvme: Convert to realize
>>>   hw/block: Fix the return type
>>>   hw/block: Use errp directly rather than local_err
>>>   dev-storage: Fix the unusual function name
>>>
>>>  hw/block/block.c                | 15 ++++---
>>>  hw/block/dataplane/virtio-blk.c | 12 +++---
>>>  hw/block/dataplane/virtio-blk.h |  2 +-
>>>  hw/block/fdc.c                  | 48 +++++++++------------
>>>  hw/block/nvme.c                 | 24 +++++------
>>>  hw/block/virtio-blk.c           | 17 +++-----
>>>  hw/ide/core.c                   |  7 +--
>>>  hw/ide/qdev.c                   | 94 +++++++++++++++++++----------------------
>>>  hw/scsi/scsi-disk.c             | 13 ++----
>>>  hw/usb/dev-storage.c            | 29 ++++++-------
>>>  include/hw/block/block.h        |  4 +-
>>>  include/hw/ide/internal.h       |  5 ++-
>>>  tests/qemu-iotests/051.pc.out   | 10 +----
>>>  tests/qemu-iotests/172.out      |  8 ----
>>>  14 files changed, 127 insertions(+), 161 deletions(-)
>>>
>>
>> Hi Mao Zhongyi:
>>
>> I've staged patches one and two here for my IDE pull request.
>>
>> I think patches 3-6 here would belong to Kevin.
>>
>> Thanks,
>> John
>>
>
> Hi, John
>
> OK, I see.
>
> Thanks for the quick review. :)
> --
> Mao
>
>
>
>
>
>
>



Re: [Qemu-devel] [PATCH v3 0/6] Convert to realize and improve error handling
Posted by Kevin Wolf 6 years, 5 months ago
Am 19.09.2017 um 01:59 hat John Snow geschrieben:
> On 09/18/2017 10:05 AM, Mao Zhongyi wrote:
> > This series mainly implements the conversions of ide, floppy and nvme
> > device to realize. Add some error handling messages and remove the local
> > variable local_err, use errp to propagate the error directly. Also
> > fix the unusual function name.
> 
> I've staged patches one and two here for my IDE pull request.
> 
> I think patches 3-6 here would belong to Kevin.

Sorry, I completely missed this.

Thanks, applied patch 3 (nvme) to the block-next branch. I did not take
patches 4 and 5 because patch 5 doesn't apply cleanly any more, and
honestly I think the result is uglier than before.

Patch 6 is for Gerd.

Kevin

Re: [Qemu-devel] [PATCH v3 0/6] Convert to realize and improve error handling
Posted by Mao Zhongyi 6 years, 5 months ago
Hi, Kevin

On 11/10/2017 10:25 PM, Kevin Wolf wrote:
> Am 19.09.2017 um 01:59 hat John Snow geschrieben:
>> On 09/18/2017 10:05 AM, Mao Zhongyi wrote:
>>> This series mainly implements the conversions of ide, floppy and nvme
>>> device to realize. Add some error handling messages and remove the local
>>> variable local_err, use errp to propagate the error directly. Also
>>> fix the unusual function name.
>>
>> I've staged patches one and two here for my IDE pull request.
>>
>> I think patches 3-6 here would belong to Kevin.
>
> Sorry, I completely missed this.

That's all right.

> Thanks, applied patch 3 (nvme) to the block-next branch. I did not take
> patches 4 and 5 because patch 5 doesn't apply cleanly any more, and
> honestly I think the result is uglier than before.

I will rebase the patches right away.

Thanks,
Mao

> Patch 6 is for Gerd.
> Kevin
>