From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W60H9-0003tk-Po for qemu-devel@nongnu.org; Wed, 22 Jan 2014 11:03:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W60H4-0008DH-KR for qemu-devel@nongnu.org; Wed, 22 Jan 2014 11:03:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57256) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W60H4-0008Cr-CP for qemu-devel@nongnu.org; Wed, 22 Jan 2014 11:03:30 -0500 Message-ID: <52DFEBCA.70400@redhat.com> Date: Wed, 22 Jan 2014 17:03:22 +0100 From: Laszlo Ersek MIME-Version: 1.0 References: <1389944779-31899-1-git-send-email-qiaonuohan@cn.fujitsu.com> <1389944779-31899-4-git-send-email-qiaonuohan@cn.fujitsu.com> In-Reply-To: <1389944779-31899-4-git-send-email-qiaonuohan@cn.fujitsu.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 03/13 v7] dump: add API to write header of flatten format List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qiaonuohan Cc: stefanha@gmail.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, anderson@redhat.com, kumagai-atsushi@mxc.nes.nec.co.jp, afaerber@suse.de On 01/17/14 08:46, qiaonuohan wrote: > flatten format will be used when writing kdump-compressed format. The format is > also used by makedumpfile, you can refer to the following URL to get more > detailed information about flatten format of kdump-compressed format: > http://sourceforge.net/projects/makedumpfile/ > > The two functions here are used to write start flat header and end flat header > to vmcore, and they will be called later when flatten format is used. > > struct MakedumpfileHeader stored at the head of vmcore is used to indicate the > vmcore is in flatten format. > > struct MakedumpfileHeader { > char signature[16]; /* = "makedumpfile" */ > int64_t type; /* = 1 */ > int64_t version; /* = 1 */ > }; > > And struct MakedumpfileDataHeader, with offset and buf_size set to -1, is used > to indicate the end of vmcore in flatten format. > > struct MakedumpfileDataHeader { > int64_t offset; /* = -1 */ > int64_t buf_size; /* = -1 */ > }; > > Signed-off-by: Qiao Nuohan > Reviewed-by: Laszlo Ersek > --- > dump.c | 42 ++++++++++++++++++++++++++++++++++++++++++ > include/sysemu/dump.h | 17 +++++++++++++++++ > 2 files changed, 59 insertions(+), 0 deletions(-) OK, comparing this with v6 02/11, I can see that you changed write_start_flat_header(): - element type of "buf" from char to uint8_t, - the array is now dynamically allocated, - it is not leaked even in case of error. My R-b stands. Thanks Laszlo