From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51922) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGZrE-0006RY-2I for qemu-devel@nongnu.org; Wed, 28 Jan 2015 16:09:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGZrA-00078n-RS for qemu-devel@nongnu.org; Wed, 28 Jan 2015 16:09:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGZrA-00078U-Jn for qemu-devel@nongnu.org; Wed, 28 Jan 2015 16:09:00 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0SL8wle012169 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 28 Jan 2015 16:08:59 -0500 Message-ID: <54C94FE9.30709@redhat.com> Date: Wed, 28 Jan 2015 14:08:57 -0700 From: Eric Blake MIME-Version: 1.0 References: <1422387983-32153-1-git-send-email-mreitz@redhat.com> <1422387983-32153-48-git-send-email-mreitz@redhat.com> In-Reply-To: <1422387983-32153-48-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GDAecRB59H9PUANPOdm4vIOIpKj5SuTkR" Subject: Re: [Qemu-devel] [PATCH RESEND 47/50] blockdev: Add read-only option to 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) --GDAecRB59H9PUANPOdm4vIOIpKj5SuTkR Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/27/2015 12:46 PM, Max Reitz wrote: > Add an option to qmp_blockdev_change_medium() which allows changing the= > read-only status of the block device whose medium is changed. >=20 > Some drives do not have a inherently fixed read-only status; for > instance, floppy disks can be set read-only or writable independently o= f > the drive. Some users may find it useful to be able to therefore change= > the read-only status of a block device when changing the medium. >=20 > Signed-off-by: Max Reitz > --- > blockdev.c | 25 ++++++++++++++++++++++++- > hmp.c | 2 +- > qapi/block-core.json | 24 +++++++++++++++++++++++- > qmp-commands.hx | 24 +++++++++++++++++++++++- > qmp.c | 3 ++- > 5 files changed, 73 insertions(+), 5 deletions(-) >=20 > =20 > ## > +# @BlockdevChangeReadOnlyMode: > +# > +# Specifies the new read-only mode of a block device subject to the > +# @blockdev-change-medium command. > +# > +# @retain: Retains the current read-only mode > +# > +# @ro: Makes the device read-only > +# > +# @rw: Makes the device writable > +# > +# Since: 2.3 > +## > +{ 'enum': 'BlockdevChangeReadOnlyMode', > + 'data': ['retain', 'ro', 'rw'] } Bike-shedding; would 'read-only' and 'read-write' look any better than abbreviations? Doesn't affect functionality, though. > + > + > +## > # @blockdev-change-medium: > # > # Changes the medium inserted into a block device by ejecting the curr= ent medium > @@ -1799,12 +1817,16 @@ > # @format: #optional, format to open the new image with (defaults= to the > # probed format) > # > +# @read-only: #optional, change the read-only mode of the device; de= faults to > +# 'retain' "read-only":"rw" looks weird. Maybe naming this "read-mode" instead of "read-only" would help. Again, bikeshedding that doesn't affect functionality, but worth considering for the interface cleanliness. So functionally, if nothing changes, you can add: Reviewed-by: Eric Blake But if you change the interface on a respin, drop my R-b to make sure I check and still like the new naming conventions. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --GDAecRB59H9PUANPOdm4vIOIpKj5SuTkR 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/ iQEcBAEBCAAGBQJUyU/pAAoJEKeha0olJ0Nq3CAIAKI40QaF8pR3FUbx1mH2TM9B tdSWQnPPP8Fb+qel1JM2BC9Y9Ydxx9s7GOr2DWIXJGAS8N5ci4sZB5Md5g68cS5/ r2G+J3FxyXsmiQEbijGxzlcT8yeBPkFoO1bSOmqgi/QPg+XXJyvFCtkObrAPPoyw qWk05nfEIjg/H9fPO1buB2nEZU1IXMuB3T55ZywdQIBr5Un61wZJhNSIjuwDlIby qLAbiADUDu3/ytfNWnUyk7oiHooAu46HHR15nNeBfep8Pc0YVrlqZcka9/d5hR6G 4TpGEtLjpr4zc2rpWUgvWTOZSRf1dm4UZ8BTTd5rzq5iQ6X+gUeDfAyL4UFpIpM= =Io+V -----END PGP SIGNATURE----- --GDAecRB59H9PUANPOdm4vIOIpKj5SuTkR--