From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKBiw-0002Su-HG for qemu-devel@nongnu.org; Wed, 20 Aug 2014 15:39:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XKBiq-0001Tc-Di for qemu-devel@nongnu.org; Wed, 20 Aug 2014 15:39:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKBiq-0001TH-5h for qemu-devel@nongnu.org; Wed, 20 Aug 2014 15:39:04 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7KJd3TU031354 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 20 Aug 2014 15:39:03 -0400 Message-ID: <53F4F94E.1050909@redhat.com> Date: Wed, 20 Aug 2014 21:38:54 +0200 From: Max Reitz MIME-Version: 1.0 References: <1408557576-14574-1-git-send-email-mreitz@redhat.com> <1408557576-14574-5-git-send-email-mreitz@redhat.com> <53F4F8BB.8050105@redhat.com> In-Reply-To: <53F4F8BB.8050105@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/4] qapi/block-core: Add "new" qcow2 options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi On 20.08.2014 21:36, Eric Blake wrote: > On 08/20/2014 11:59 AM, Max Reitz wrote: >> qcow2 supports more than four options by now, add the new options >> (overlap check mode and metadata cache size) >> >> Signed-off-by: Max Reitz >> --- >> qapi/block-core.json | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++- >> 1 file changed, 78 insertions(+), 1 deletion(-) >> >> +## >> +# @Qcow2OverlapCheckFlags >> +# >> +# Structure of flags for each metadata structure. Setting a field to 'true' >> +# makes qemu guard that structure against unintended overwriting. The default >> +# value is chosen according to the template given. >> +# >> +# @template: Specifies a template mode which can be adjusted using the other >> +# flags, defaults to 'cached' >> +# > Might be worth mentioning the other fields by name, but that's minor. Well, there were so many and it would've just been "X: Prevent unintended writes to X". >> +{ 'union': 'Qcow2OverlapChecks', >> + 'discriminator': {}, >> + 'data': { 'flags': 'Qcow2OverlapCheckFlags', >> + 'mode': 'Qcow2OverlapCheckMode' } } >> + > Slick :) So patch 3/4 added a new commandline option > overlap-check.template=str which behaves identically to > overlap-check=str; the short form is the enum branch of this union, the > long form is the struct form. The command line parser has to deal with > both options being given (and errors out if they don't match), while QMP > does not. > > Reviewed-by: Eric Blake Thank you! Max