Re: [Qemu-devel] [PATCH v6 06/11] dump: add API to write dump header

2014-01-13 Thread Qiao Nuohan
On 01/14/2014 10:29 AM, Laszlo Ersek wrote: I can't really provide any input to that decision -- I have no clue which tools support which format. The non-flat (ie. random-access, regular file) format appears more space- and computation-efficient, and I thought that would be the "natural" choice.

Re: [Qemu-devel] [PATCH v6 06/11] dump: add API to write dump header

2014-01-13 Thread Laszlo Ersek
On 01/14/14 03:07, Qiao Nuohan wrote: > On 01/13/2014 06:39 PM, Laszlo Ersek wrote: >> >> - When this write_buffer() is directed to a regular file in non-flat >> mode, then the file might become sparse (you jump over a range of >> offsets with lseek() in write_buffer()).

Re: [Qemu-devel] [PATCH v6 06/11] dump: add API to write dump header

2014-01-13 Thread Qiao Nuohan
On 01/13/2014 06:39 PM, Laszlo Ersek wrote: >> >> - When this write_buffer() is directed to a regular file in non-flat >> mode, then the file might become sparse (you jump over a range of >> offsets with lseek() in write_buffer()). If the output has been opened >> by qemu itself (ie."file:...

Re: [Qemu-devel] [PATCH v6 06/11] dump: add API to write dump header

2014-01-13 Thread Laszlo Ersek
On 01/13/14 11:03, Qiao Nuohan wrote: > Sorry for responsing late. > > On 01/07/2014 07:38 PM, Laszlo Ersek wrote: >>> > +kh->offset_note = DISKDUMP_HEADER_BLOCKS * dh->block_size + >>> size; >>> > +kh->note_size = s->note_size; >>> > + >>> > +if (write_buffer(s->fd, s->flag_flatt

Re: [Qemu-devel] [PATCH v6 06/11] dump: add API to write dump header

2014-01-13 Thread Qiao Nuohan
Sorry for responsing late. On 01/07/2014 07:38 PM, Laszlo Ersek wrote: The following fields in "dh" are left zero-filled: - timestamp - total_ram_blocks - device_blocks - written_blocks - current_cpu I guess we'll either overwrite them later or it's OK to leave them all zeroed. Yes, they are

Re: [Qemu-devel] [PATCH v6 06/11] dump: add API to write dump header

2014-01-07 Thread Andreas Färber
Am 07.01.2014 12:38, schrieb Laszlo Ersek: > Also... is it OK to write these fields to the file in host native byte > order? What happens if an i686 / x86_64 target is emulated on a BE host? For the target-s390x implementation Alex required to take care of endianness for the s390x-on-x86 case, so

Re: [Qemu-devel] [PATCH v6 06/11] dump: add API to write dump header

2014-01-07 Thread Laszlo Ersek
comments below On 01/05/14 08:27, Qiao Nuohan wrote: > the functions are used to write header of kdump-compressed format to vmcore. > Header of kdump-compressed format includes: > 1. common header: DiskDumpHeader32 / DiskDumpHeader64 > 2. sub header: KdumpSubHeader32 / KdumpSubHeader64 > 3. extra

[Qemu-devel] [PATCH v6 06/11] dump: add API to write dump header

2014-01-05 Thread Qiao Nuohan
the functions are used to write header of kdump-compressed format to vmcore. Header of kdump-compressed format includes: 1. common header: DiskDumpHeader32 / DiskDumpHeader64 2. sub header: KdumpSubHeader32 / KdumpSubHeader64 3. extra information: only elf notes here Signed-off-by: Qiao Nuohan --