From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5BFO-0007jj-4D for qemu-devel@nongnu.org; Tue, 24 May 2016 08:15:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5BFH-0000D7-P7 for qemu-devel@nongnu.org; Tue, 24 May 2016 08:15:40 -0400 References: <1463470536-8981-1-git-send-email-famz@redhat.com> <1463470536-8981-3-git-send-email-famz@redhat.com> From: Max Reitz Message-ID: Date: Tue, 24 May 2016 14:15:17 +0200 MIME-Version: 1.0 In-Reply-To: <1463470536-8981-3-git-send-email-famz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BhAGoJBAvk8OkFweb0LjiKU311eLSeOSM" Subject: Re: [Qemu-devel] [PATCH v5 02/27] qapi: Add lock-mode in blockdev-add options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: Kevin Wolf , Jeff Cody , Markus Armbruster , Eric Blake , John Snow , qemu-block@nongnu.org, berrange@redhat.com, pbonzini@redhat.com, den@openvz.org, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BhAGoJBAvk8OkFweb0LjiKU311eLSeOSM From: Max Reitz To: Fam Zheng , qemu-devel@nongnu.org Cc: Kevin Wolf , Jeff Cody , Markus Armbruster , Eric Blake , John Snow , qemu-block@nongnu.org, berrange@redhat.com, pbonzini@redhat.com, den@openvz.org, stefanha@redhat.com Message-ID: Subject: Re: [PATCH v5 02/27] qapi: Add lock-mode in blockdev-add options References: <1463470536-8981-1-git-send-email-famz@redhat.com> <1463470536-8981-3-git-send-email-famz@redhat.com> In-Reply-To: <1463470536-8981-3-git-send-email-famz@redhat.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 17.05.2016 09:35, Fam Zheng wrote: > To allow overriding the default locking behavior when opening the image= =2E >=20 > Signed-off-by: Fam Zheng > --- > qapi/block-core.json | 20 +++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) >=20 > diff --git a/qapi/block-core.json b/qapi/block-core.json > index 98a20d2..3c54f64 100644 > --- a/qapi/block-core.json > +++ b/qapi/block-core.json > @@ -2032,6 +2032,21 @@ > '*read-pattern': 'QuorumReadPattern' } } > =20 > ## > +# @BlockdevLockMode > +# > +# Describes the operation mode for the automatic conversion of plain > +# zero writes by the OS to driver specific optimized zero write comman= ds. I don't think so. ;-) Max > +# > +# @off: Disabled > +# @shared: Use shared lock for both RO and RW images. > +# @exclusive: Use exclusive lock for RW images, and shared lock for RO= images. > +# > +# Since: 2.7 > +## > +{ 'enum': 'BlockdevLockMode', > + 'data': [ 'off', 'shared', 'exclusive' ] } > + > +## > # @BlockdevOptions > # > # Options for creating a block device. Many options are available for= all > @@ -2065,6 +2080,8 @@ > # @detect-zeroes: #optional detect and optimize zero writes (Since 2.1= ) > # (default: off) > # > +# @lock-mode: #optional how to lock the image. (default: exclusive) (S= ince 2.7) > +# > # Remaining options are determined by the block driver. > # > # Since: 1.7 > @@ -2082,7 +2099,8 @@ > '*stats-account-invalid': 'bool', > '*stats-account-failed': 'bool', > '*stats-intervals': ['int'], > - '*detect-zeroes': 'BlockdevDetectZeroesOptions' }, > + '*detect-zeroes': 'BlockdevDetectZeroesOptions', > + '*lock-mode': 'BlockdevLockMode' }, > 'discriminator': 'driver', > 'data': { > 'archipelago':'BlockdevOptionsArchipelago', >=20 --BhAGoJBAvk8OkFweb0LjiKU311eLSeOSM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXREXVAAoJEDuxQgLoOKytyJsH/jKiWBcHJtEZgT6pLEBkNepd AoaWAs7516lxe9a9Qzt9khbgXr1uTMrr+Fmts+Wasu3MOBkfkTdg5539QtDVQ6Gm bObW4AJri7IPjJmU8yYGON6/sGIjQIeJFQXetmq3JkXU9XbvS6eIxWWiH2tfnBVn yPHwpcziKwbMDky2SUWFS8KwJ2tIIG71MgPfUSPQpj8nkcQK8qQXUFHhB3Ra8uZk XKtzb9UG8uHB0xqUm2N8e23EYvmIzhljp4agVJSs7giZXA/qSzxYFwfasRQemE3S G1VwoL70O4E4fVf2EZrXIvTm2ok0opIPFc0lw+PtMuS35MsoYW0+CrKH8cmWjtE= =aqCh -----END PGP SIGNATURE----- --BhAGoJBAvk8OkFweb0LjiKU311eLSeOSM--