From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGZja-0001Kh-OD for qemu-devel@nongnu.org; Wed, 28 Jan 2015 16:01:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGZjX-0004Q8-J5 for qemu-devel@nongnu.org; Wed, 28 Jan 2015 16:01:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53902) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGZjX-0004Pr-B7 for qemu-devel@nongnu.org; Wed, 28 Jan 2015 16:01:07 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0SL15jb009143 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 28 Jan 2015 16:01:06 -0500 Message-ID: <54C94E0F.1080000@redhat.com> Date: Wed, 28 Jan 2015 14:01:03 -0700 From: Eric Blake MIME-Version: 1.0 References: <1422387983-32153-1-git-send-email-mreitz@redhat.com> <1422387983-32153-46-git-send-email-mreitz@redhat.com> In-Reply-To: <1422387983-32153-46-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PdbMLmBfWvG0SGHreNGUJS4ml87ucguHB" Subject: Re: [Qemu-devel] [PATCH RESEND 45/50] qmp: Introduce blockdev-change-medium List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Fam Zheng , Jeff Cody , Markus Armbruster , Stefan Hajnoczi , John Snow This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PdbMLmBfWvG0SGHreNGUJS4ml87ucguHB Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 functio= n > qmp_change_blockdev() is accordingly renamed to > qmp_blockdev_change_medium(). >=20 > Signed-off-by: Max Reitz > --- > 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(-) >=20 > +++ 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 e= specially > -# for changing block devices. > +# for changing block devices. Please use blockdev-change-medi= um > +# 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 curr= ent medium > +# and loading a new image file which is inserted as the new medium (th= is 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --PdbMLmBfWvG0SGHreNGUJS4ml87ucguHB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJUyU4PAAoJEKeha0olJ0NqKyIH/291Ak16X91tpUYYJVVeseV2 CJtDNsH4DPE71suxTJhoqKfTlyXaINjbi9RZYjj+r/M3rkWNp62xeVvZhH6YBBAb FGqYn8S3w/QmdLzpYXym2ht4JndsREXUewMFJKkyPINNiJuj9j7YO1gjSgMhxwS6 obqXMMlO8Ua7EAsbFZWaWqUd20IywU1wqTjQW6CYz0RTUw6KL5h5wc/j8dFEya66 vQruJVenZg+4A1NEG7T566eDFY5L5dPueKlwEJY7G/iVJhYOEgh5vF2orFTgMPDi D4l6ayohitO9De6GaJ7dUVr+bTO2wURsEaRC8knN6aoJDZCOtptMd5DJRsHUi9g= =RXzu -----END PGP SIGNATURE----- --PdbMLmBfWvG0SGHreNGUJS4ml87ucguHB--