From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaJRm-0003mD-RE for qemu-devel@nongnu.org; Thu, 09 May 2013 01:31:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UaJRk-0003lO-IO for qemu-devel@nongnu.org; Thu, 09 May 2013 01:31:18 -0400 Received: from [222.73.24.84] (port=35087 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaJRk-0003ik-5s for qemu-devel@nongnu.org; Thu, 09 May 2013 01:31:16 -0400 Message-ID: <518B33BB.9010906@cn.fujitsu.com> Date: Thu, 09 May 2013 13:27:23 +0800 From: Zhang Xiaohe MIME-Version: 1.0 References: <1367911007-13990-1-git-send-email-qiaonuohan@cn.fujitsu.com> <1367911007-13990-10-git-send-email-qiaonuohan@cn.fujitsu.com> <5189362E.3030707@redhat.com> <004301ce4bc9$11040970$330c1c50$@cn.fujitsu.com> <518A886D.6080105@redhat.com> In-Reply-To: <518A886D.6080105@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 9/9] Make monitor command 'dump-guest-memory' dump in kdump-compressed format List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qiaonuohan , qemu-devel@nongnu.org =E4=BA=8E 2013=E5=B9=B405=E6=9C=8809=E6=97=A5 01:16, Eric Blake =E5=86=99= =E9=81=93: > On 05/08/2013 02:50 AM, qiaonuohan wrote: >> >> Thanks for your suggestion. I will fix it like: >> >> { 'enum': 'DumpCompressionFormat', >> 'data': [ 'zlib', 'lzo', 'snappy' ] } >> >> For zlib is treated as the default compression format, and >> 'uncompressed' won't be an option. > > No, I was serious that you need to provide 'uncompressed' as an explicit > enum value. It is very annoying to toggle between four states (three > compression formats and a fourth state of no compression) when the > fourth is available only by omitting a parameter. The default MUST be > 'uncompressed' for backwards-compatibility, not 'zlib'. > We'd like to make sure that we understand you precisely. The definion is like below: { 'enum': 'DumpGuestMemoryFormat', 'data': [ 'uncompressed', 'zlib', 'lzo', 'snappy' ] } { 'command': 'dump-guest-memory', 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int', '*length': 'int', '*format': 'DumpCompressionFormat' } } 'format' is optional: 1. when 'format' is not specified, vmcore will be in ELF format. 2. when 'format' is specified and its parameter is 'uncompressed', vmcore will be in ELF format as well. 3. when 'format' is specified and its parameter is 'zlib/lzo/snappy', vmcore will be in kdump-compressed format. If this is what you suggest, then I don't think it is necessary to add 'uncompressed'. The backwards-compatibility is assured by case 1, in which the interface is exactly the same as before. So why do we add another parameter to do the same thing again? =