Re: [Qemu-devel] [PATCH 0/2] v7 Decouple block device removal from device removal

2010-11-12 Thread Markus Armbruster
Kevin Wolf  writes:

> I have to admit that I didn't follow your discussion very closely any
> more after a few versions, so just to confirm: You came to the
> conclusion that we want to add drive_del to QMP and not only the human
> monitor, even though there is no drive_add in QMP?

Fair question.

-drive and drive_add conflate host and guest part.  They were hacked up
to work with -device, and it shows.  I'd rather not copy the mess to
QMP.

Maybe it's best to leave out the QMP part for now, i.e. drop PATCH 2/2.
If we can't get blockdev_add, blockdev_del done in time, we reconsider.

> The HMP help text doesn't seem to be completely right (sent a comment),
> but once that's fixed, I'm going to merge the series based on Markus's ACK.



Re: [Qemu-devel] [PATCH 0/2] v7 Decouple block device removal from device removal

2010-11-12 Thread Kevin Wolf
Am 12.11.2010 17:28, schrieb Markus Armbruster:
> Ryan Harper  writes:
> 
>> Once more dear friends, v7
>>
>> This patch series decouples the detachment of a block device from the
>> removal of the backing pci-device.  Removal of a hotplugged pci device
>> requires the guest to respond before qemu tears down the block device.
>> In some cases, the guest may not respond leaving the guest with
>> continued access to the block device.  Mgmt layer doesn't have a
>> reliable method to force a disconnect.  
>>
>> The new monitor command, drive_del, will revoke a guests access to the
>> block device independently of the removal of the pci device.
>>
>> The first patch implements drive_del, the second patch implements the
>> qmp version of the monitor command.
>>
>> Changes since v6:
>> - Updated patch description
>> - Dropped bdrv_unplug and inlined in drive_del
>> - Explicitly invoke drive_uninit()
>> Changes since v5:
>> - Removed dangling pointers in guest and host state.  This ensures things 
>> like 
>>   info block no longer displays the deleted drive; though info pci will
>>   continue to display the pci device until the guest responds to the removal
>>   request.
>> - Renamed drive_unplug -> drive_del
>> Changes since v4:
>> - Droppped drive_get_by_id patch and use bdrv_find() instead
>> - Added additional details about drive_unplug to hmp/qmp interface
>>
>> Changes since v3:
>> - Moved QMP command for drive_unplug() to separate patch
>>
>> Changes since v2:
>> - Added QMP command for drive_unplug()
>>
>> Changes since v1:
>> - CodingStyle fixes
>> - Added qemu_aio_flush() to bdrv_unplug()
>>
>> Signed-off-by: Ryan Harper 
> 
> ACK series

I have to admit that I didn't follow your discussion very closely any
more after a few versions, so just to confirm: You came to the
conclusion that we want to add drive_del to QMP and not only the human
monitor, even though there is no drive_add in QMP?

The HMP help text doesn't seem to be completely right (sent a comment),
but once that's fixed, I'm going to merge the series based on Markus's ACK.

Kevin



Re: [Qemu-devel] [PATCH 0/2] v7 Decouple block device removal from device removal

2010-11-12 Thread Markus Armbruster
Ryan Harper  writes:

> Once more dear friends, v7
>
> This patch series decouples the detachment of a block device from the
> removal of the backing pci-device.  Removal of a hotplugged pci device
> requires the guest to respond before qemu tears down the block device.
> In some cases, the guest may not respond leaving the guest with
> continued access to the block device.  Mgmt layer doesn't have a
> reliable method to force a disconnect.  
>
> The new monitor command, drive_del, will revoke a guests access to the
> block device independently of the removal of the pci device.
>
> The first patch implements drive_del, the second patch implements the
> qmp version of the monitor command.
>
> Changes since v6:
> - Updated patch description
> - Dropped bdrv_unplug and inlined in drive_del
> - Explicitly invoke drive_uninit()
> Changes since v5:
> - Removed dangling pointers in guest and host state.  This ensures things 
> like 
>   info block no longer displays the deleted drive; though info pci will
>   continue to display the pci device until the guest responds to the removal
>   request.
> - Renamed drive_unplug -> drive_del
> Changes since v4:
> - Droppped drive_get_by_id patch and use bdrv_find() instead
> - Added additional details about drive_unplug to hmp/qmp interface
>
> Changes since v3:
> - Moved QMP command for drive_unplug() to separate patch
>
> Changes since v2:
> - Added QMP command for drive_unplug()
>
> Changes since v1:
> - CodingStyle fixes
> - Added qemu_aio_flush() to bdrv_unplug()
>
> Signed-off-by: Ryan Harper 

ACK series



[Qemu-devel] [PATCH 0/2] v7 Decouple block device removal from device removal

2010-11-12 Thread Ryan Harper
Once more dear friends, v7

This patch series decouples the detachment of a block device from the
removal of the backing pci-device.  Removal of a hotplugged pci device
requires the guest to respond before qemu tears down the block device.
In some cases, the guest may not respond leaving the guest with
continued access to the block device.  Mgmt layer doesn't have a
reliable method to force a disconnect.  

The new monitor command, drive_del, will revoke a guests access to the
block device independently of the removal of the pci device.

The first patch implements drive_del, the second patch implements the
qmp version of the monitor command.

Changes since v6:
- Updated patch description
- Dropped bdrv_unplug and inlined in drive_del
- Explicitly invoke drive_uninit()
Changes since v5:
- Removed dangling pointers in guest and host state.  This ensures things like 
  info block no longer displays the deleted drive; though info pci will
  continue to display the pci device until the guest responds to the removal
  request.
- Renamed drive_unplug -> drive_del
Changes since v4:
- Droppped drive_get_by_id patch and use bdrv_find() instead
- Added additional details about drive_unplug to hmp/qmp interface

Changes since v3:
- Moved QMP command for drive_unplug() to separate patch

Changes since v2:
- Added QMP command for drive_unplug()

Changes since v1:
- CodingStyle fixes
- Added qemu_aio_flush() to bdrv_unplug()

Signed-off-by: Ryan Harper