Blob Blame History Raw
Return-Path: yishimat@redhat.com
Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
 zmta02.collab.prod.int.phx2.redhat.com) (10.5.81.9) by
 zmail24.collab.prod.int.phx2.redhat.com with LMTP; Thu, 2 Jul 2015 01:16:42
 -0400 (EDT)
Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27])
	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 9997C122359;
	Thu,  2 Jul 2015 01:16:42 -0400 (EDT)
Received: from [10.3.112.13] ([10.3.112.13])
	by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t625Geo3028836;
	Thu, 2 Jul 2015 01:16:41 -0400
Subject: [RHEL7.2 PATCH resend v3 4/4] Fix reassemble_kdump_header().
To: kexec-kdump-list@redhat.com
References: <55929BD5.7050709@redhat.com> <5594C856.6050503@redhat.com>
Cc: Minfei Huang <mhuang@redhat.com>, bhe@redhat.com, yishimat@redhat.com
From: Yasuaki Ishimatsu <yishimat@redhat.com>
Message-ID: <5594C937.2060303@redhat.com>
Date: Thu, 2 Jul 2015 01:16:39 -0400
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101
 Thunderbird/38.0.1
MIME-Version: 1.0
In-Reply-To: <5594C856.6050503@redhat.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27
Content-Length: 1349

https://bugzilla.redhat.com/show_bug.cgi?id=1182377

The patch is back ported directory from the following upstream commit:

commit 45a1885e747c3833d5df770d0f2c5571a838f55a
Author: Zhou Wenjian <zhouwj-fnst@cn.fujitsu.com>
Date:   Mon Oct 20 13:40:10 2014 +0900

    [PATCH v4 4/4] Fix reassemble_kdump_header().

    Fix it to take over incomplete flags of all dump file.

    Singed-of-by: Zhou Wenjian <zhouwj-fnst@cn.fujitsu.com>

Resolves: rhbz#1182377
Signed-off-by: Yasuaki Ishimatsu <yishimat@redhat.com>
Acked-by: Minfei Huang <mhuang@redhat.com>

---
 makedumpfile-1.5.7/makedumpfile.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/makedumpfile-1.5.7/makedumpfile.c b/makedumpfile-1.5.7/makedumpfile.c
index 4dba83e..f072069 100644
--- a/makedumpfile-1.5.7/makedumpfile.c
+++ b/makedumpfile-1.5.7/makedumpfile.c
@@ -8695,8 +8695,14 @@ reassemble_kdump_header(void)
 	/*
 	 * Write common header.
 	 */
-	if (!read_disk_dump_header(&dh, SPLITTING_DUMPFILE(0)))
-		return FALSE;
+	int i;
+	for ( i = 0; i < info->num_dumpfile; i++){
+		if (!read_disk_dump_header(&dh, SPLITTING_DUMPFILE(i)))
+			return FALSE;
+		int status = dh.status & DUMP_DH_COMPRESSED_INCOMPLETE;
+		if (status)
+			break;
+	}

 	if (lseek(info->fd_dumpfile, 0x0, SEEK_SET) < 0) {
 		ERRMSG("Can't seek a file(%s). %s\n",
-- 
1.7.1