From 37afcd52ac5dd276a51af51cbee9531b91911bfa Mon Sep 17 00:00:00 2001 From: HATAYAMA Daisuke Date: Fri, 20 Feb 2015 10:18:41 +0900 Subject: [PATCH] sadump: Support more than 16TB physical memory space. This patch makes sadump format support more than 16TB physical memory space. The limitation is caused by several members of dump_header structure: max_mapnr and the others. They have 4 byte length only. In particular, max_mapnr member gets overflow if more than 16TB physical memory space is given. To support more than 16TB physical memory space, this patch adds new 4 64-bit length members in dump_header structure: - max_mapnr_64 - total_ram_blocks_64 - device_blocks_64 - written_blocks_64 Next table shows correspondence between the 32-bit version and the 64-bit version members: | 32-bit version | 64-bit version | |------------------------+---------------------------| | max_mapnr | max_mapnr_64 | | total_ram_blocks | total_ram_blocks_64 | | device_blocks | device_blocks_64 | | written_blocks | written_blocks_64 | In addition, header_version member of dump_header structure is increased to 1 in this extended new format. Old makedumpfile can access the new sadump format under 16TB correctly. Current implementation treats vmcore with kernel version 2 or later as kernel version 1, assuming backward compatibility. Signed-off-by: HATAYAMA Daisuke --- sadump_mod.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sadump_mod.h') diff --git a/sadump_mod.h b/sadump_mod.h index afeead8..0dd5bb5 100644 --- a/sadump_mod.h +++ b/sadump_mod.h @@ -106,6 +106,14 @@ struct sadump_header { uint32_t written_blocks; /* Number of written blocks */ uint32_t current_cpu; /* CPU# which handles dump */ uint32_t nr_cpus; /* Number of CPUs */ + /* + * The members from below are supported in header version 1 + * and later. + */ + uint64_t max_mapnr_64; + uint64_t total_ram_blocks_64; + uint64_t device_blocks_64; + uint64_t written_blocks_64; }; struct sadump_apic_state { -- cgit v1.2.3