All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Max Reitz <mreitz@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <famz@redhat.com>,
	Jeff Cody <jcody@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	John Snow <jsnow@redhat.com>
Subject: Re: [Qemu-devel] [PATCH RESEND 45/50] qmp: Introduce blockdev-change-medium
Date: Wed, 28 Jan 2015 14:01:03 -0700	[thread overview]
Message-ID: <54C94E0F.1080000@redhat.com> (raw)
In-Reply-To: <1422387983-32153-46-git-send-email-mreitz@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3168 bytes --]

On 01/27/2015 12:46 PM, Max Reitz wrote:
> Introduce a new QMP command 'blockdev-change-medium' which is intended
> to replace the 'change' command for block devices. The existing function
> qmp_change_blockdev() is accordingly renamed to
> qmp_blockdev_change_medium().
> 
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
>  blockdev.c                |  7 ++++---
>  include/sysemu/blockdev.h |  2 --
>  qapi-schema.json          |  3 ++-
>  qapi/block-core.json      | 23 +++++++++++++++++++++++
>  qmp-commands.hx           | 31 +++++++++++++++++++++++++++++++
>  qmp.c                     |  2 +-
>  6 files changed, 61 insertions(+), 7 deletions(-)
> 

> +++ b/qapi-schema.json
> @@ -1649,7 +1649,8 @@
>  #          device between when these calls are executed is undefined.
>  #
>  # Notes:  It is strongly recommended that this interface is not used especially
> -#         for changing block devices.
> +#         for changing block devices.  Please use blockdev-change-medium
> +#         instead (for VNC, please use change-vnc-password).

Not grammatically wrong, but still feels a bit awkward.  Maybe better
worded as:

This interface is deprecated, and it is strongly recommended that you
avoid using it.  For changing block devices, use blockdev-change-medium;
for changing VNC parameters, use change-vnc-password.


>  ##
> +# @blockdev-change-medium:
> +#
> +# Changes the medium inserted into a block device by ejecting the current medium
> +# and loading a new image file which is inserted as the new medium (this command
> +# combines blockdev-open-tray, blockdev-remove-medium, blockdev-insert-medium
> +# and blockdev-close-tray).
> +#
> +# @device:      block device name
> +#
> +# @filename:    filename of the new image to be loaded
> +#
> +# @format:      #optional, format to open the new image with (defaults to the
> +#               probed format)
> +#
> +# Since: 2.3
> +##
> +{ 'command': 'blockdev-change-medium',
> +  'data': { 'device': 'str',
> +            'filename': 'str',
> +            '*format': 'str' } }

Intentional that there is no way to specify 'force'?  I can live with
that (force is a sledgehammer; and someone that can justify using it can
just use the lower-level functions themselves.  No need to bloat the
nice wrapper interface with something that is usually not needed).

I'm unclear on whether this command will wait for the tray open to
happen, or if it fails in the middle if the tray was locked and a
request sent to the guest but the guest did not act fast enough to
unlock things.  As such, I'm not quite sure if this interface is missing
any parameters.


> +Examples:
> +
> +1. Change a removable medium
> +
> +-> { "execute": "blockdev-change-medium",
> +             "arguments": { "device": "ide1-cd0",
> +                            "filename": "/srv/images/Fedora-12-x86_64-DVD.iso",

Wow - you're still testing a Fedora 12 image?

I'm a bit reluctant to mark this one reviewed, without more discussion.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2015-01-28 21:01 UTC|newest]

Thread overview: 107+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27 19:45 [Qemu-devel] [PATCH RESEND 00/50] blockdev: BlockBackend and media Max Reitz
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 01/50] blockdev: Allow creation of BDS trees without BB Max Reitz
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 02/50] iotests: Only create BB if necessary Max Reitz
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 03/50] hw/block/fdc: Implement tray status Max Reitz
2015-01-30 21:04   ` John Snow
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 04/50] hw/usb-storage: Check whether BB is inserted Max Reitz
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 05/50] block: Fix BB AIOCB AioContext without BDS Max Reitz
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 06/50] block: Add blk_is_available() Max Reitz
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 07/50] block: Make bdrv_is_inserted() recursive Max Reitz
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 08/50] block/quorum: Implement bdrv_is_inserted() Max Reitz
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 09/50] block: Move guest_block_size into BlockBackend Max Reitz
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 10/50] block: Remove wr_highest_offset from BlockAcctStats Max Reitz
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 11/50] block: Move BlockAcctStats into BlockBackend Max Reitz
2015-01-27 20:31   ` Eric Blake
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 12/50] block: Move I/O status and error actions into BB Max Reitz
2015-01-27 20:51   ` Eric Blake
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 13/50] block: Add BlockBackendRootState Max Reitz
2015-01-27 21:03   ` Eric Blake
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 14/50] block: Make some BB functions fall back to BBRS Max Reitz
2015-01-27 21:15   ` Eric Blake
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 15/50] block: Fail requests to empty BlockBackend Max Reitz
2015-01-27 21:24   ` Eric Blake
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 16/50] block: Prepare remaining BB functions for NULL BDS Max Reitz
2015-01-27 21:36   ` Eric Blake
2015-01-27 21:39     ` Max Reitz
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 17/50] block: Respect empty BB in bdrv_lookup_bs() Max Reitz
2015-01-27 21:56   ` Eric Blake
2015-01-28 18:31   ` John Snow
2015-01-28 18:35     ` Max Reitz
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 18/50] block: Respect empty BB in bdrv_query_info() Max Reitz
2015-01-27 21:57   ` Eric Blake
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 19/50] blockdev: Use BlockBackend for blockdev-backup TA Max Reitz
2015-01-27 21:59   ` Eric Blake
2015-01-27 22:13     ` Max Reitz
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 20/50] blockdev: Check blk_is_available() in sn-del-int-sync Max Reitz
2015-01-27 22:10   ` Eric Blake
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 21/50] blockdev: Check BB validity in internal snapshot TA Max Reitz
2015-01-27 23:02   ` Eric Blake
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 22/50] blockdev: Check BB validity in drive-backup TA Max Reitz
2015-01-27 23:44   ` Eric Blake
2015-01-28 16:27     ` Max Reitz
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 23/50] blockdev: Catch NULL BDS in block_set_io_throttle Max Reitz
2015-01-28 15:26   ` Eric Blake
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 24/50] blockdev: Check BB validity in block-stream Max Reitz
2015-01-28 15:28   ` Eric Blake
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 25/50] blockdev: Check BB validity in block-commit Max Reitz
2015-01-28 16:09   ` Eric Blake
2015-01-27 19:45 ` [Qemu-devel] [PATCH RESEND 26/50] blockdev: Check BB validity in drive-backup Max Reitz
2015-01-28 16:20   ` Eric Blake
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 27/50] blockdev: Check BB validity in blockdev-backup Max Reitz
2015-01-28 16:42   ` Eric Blake
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 28/50] blockdev: Check BB validity in drive-mirror Max Reitz
2015-01-28 16:43   ` Eric Blake
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 29/50] blockdev: Check BB validity in find_block_job() Max Reitz
2015-01-28 16:44   ` Eric Blake
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 30/50] blockdev: Check BB validity in change-backing-file Max Reitz
2015-01-28 16:50   ` Eric Blake
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 31/50] block: Add blk_insert_bs() Max Reitz
2015-01-28 16:52   ` Eric Blake
2015-01-28 16:58     ` Max Reitz
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 32/50] blockdev: Check BB validity in eject and change Max Reitz
2015-01-28 17:42   ` Eric Blake
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 33/50] blockdev: Respect NULL BDS in do_drive_del() Max Reitz
2015-01-28 17:45   ` Eric Blake
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 34/50] blockdev: Do not create BDS for empty drive Max Reitz
2015-01-28 17:50   ` Eric Blake
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 35/50] blockdev: Pull out blockdev option extraction Max Reitz
2015-01-28 19:23   ` Eric Blake
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 36/50] blockdev: Allow more options for BB-less BDS tree Max Reitz
2015-01-28 19:26   ` Eric Blake
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 37/50] block: Add blk_remove_bs() Max Reitz
2015-01-28 19:49   ` Eric Blake
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 38/50] blockdev: Add blockdev-open-tray Max Reitz
2015-01-28 19:56   ` Eric Blake
2015-01-28 19:59     ` Max Reitz
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 39/50] blockdev: Add blockdev-close-tray Max Reitz
2015-01-28 19:58   ` Eric Blake
2015-01-28 20:00     ` Max Reitz
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 40/50] blockdev: Add blockdev-remove-medium Max Reitz
2015-01-28 20:11   ` Eric Blake
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 41/50] blockdev: Add blockdev-insert-medium Max Reitz
2015-01-28 20:18   ` Eric Blake
2015-01-28 20:20     ` Max Reitz
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 42/50] blockdev: Implement eject with basic operations Max Reitz
2015-01-28 20:26   ` Eric Blake
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 43/50] blockdev: Implement change " Max Reitz
2015-01-28 20:30   ` Eric Blake
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 44/50] block: Inquire tray state before tray-moved events Max Reitz
2015-01-28 20:37   ` Eric Blake
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 45/50] qmp: Introduce blockdev-change-medium Max Reitz
2015-01-28 21:01   ` Eric Blake [this message]
2015-01-28 21:19     ` Max Reitz
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 46/50] hmp: Use blockdev-change-medium for change command Max Reitz
2015-01-28 21:02   ` Eric Blake
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 47/50] blockdev: Add read-only option to blockdev-change-medium Max Reitz
2015-01-28 21:08   ` Eric Blake
2015-01-28 21:22     ` Max Reitz
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 48/50] hmp: Add read-only option to change command Max Reitz
2015-01-28 21:22   ` Eric Blake
2015-01-28 21:26     ` Max Reitz
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 49/50] iotests: More options for VM.add_drive() Max Reitz
2015-01-28 21:27   ` Eric Blake
2015-01-28 21:28     ` Max Reitz
2015-01-28 21:58       ` Eric Blake
2015-01-27 19:46 ` [Qemu-devel] [PATCH RESEND 50/50] iotests: Add test for change-related QMP commands Max Reitz
2015-01-28 21:57   ` Eric Blake
2015-01-28 22:02     ` Max Reitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54C94E0F.1080000@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=famz@redhat.com \
    --cc=jcody@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.