From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mx1.redhat.com ([209.132.183.28]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1agRsX-00017y-4M for kexec@lists.infradead.org; Thu, 17 Mar 2016 06:57:54 +0000 Date: Thu, 17 Mar 2016 14:57:28 +0800 From: Baoquan He Subject: Re: [PATCH] makdumpfile: clean up the in-accurate message printing about mmap Message-ID: <20160317065728.GC29484@x1.redhat.com> References: <1458112379-10969-1-git-send-email-bhe@redhat.com> <0910DD04CBD6DE4193FCF86B9C00BE9701E32706@BPXM01GP.gisp.nec.co.jp> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <0910DD04CBD6DE4193FCF86B9C00BE9701E32706@BPXM01GP.gisp.nec.co.jp> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=twosheds.infradead.org@lists.infradead.org To: Atsushi Kumagai Cc: "kexec@lists.infradead.org" On 03/17/16 at 06:46am, Atsushi Kumagai wrote: > Hello Baoquan, > > >mmap() is not used either caused by failure of mmap() in initialize_mmap(), > >or because user explictly specify '--non-mmap'. So the message need be changed > >according these different cases. > > > >Signed-off-by: Baoquan He > > Sounds reasonable, thanks. > > Acked-by: Atsushi Kumagai Thanks! > > >--- > > makedumpfile.c | 19 +++++++++++-------- > > 1 file changed, 11 insertions(+), 8 deletions(-) > > > >diff --git a/makedumpfile.c b/makedumpfile.c > >index fa0b779..5703369 100644 > >--- a/makedumpfile.c > >+++ b/makedumpfile.c > >@@ -3949,14 +3949,17 @@ out: > > if (info->dump_level & DL_EXCLUDE_FREE) > > setup_page_is_buddy(); > > > >- if (info->flag_usemmap == MMAP_TRY && initialize_mmap()) { > >- DEBUG_MSG("mmap() is available on the kernel.\n"); > >- info->flag_usemmap = MMAP_ENABLE; > >- } else { > >- DEBUG_MSG("The kernel doesn't support mmap(),"); > >- DEBUG_MSG("read() will be used instead.\n"); > >- info->flag_usemmap = MMAP_DISABLE; > >- } > >+ if (info->flag_usemmap == MMAP_TRY ) { > >+ if (initialize_mmap()) { > >+ DEBUG_MSG("mmap() is available on the kernel.\n"); > >+ info->flag_usemmap = MMAP_ENABLE; > >+ } else { > >+ DEBUG_MSG("The kernel doesn't support mmap(),"); > >+ DEBUG_MSG("read() will be used instead.\n"); > >+ info->flag_usemmap = MMAP_DISABLE; > >+ } > >+ } else if (info->flag_usemmap == MMAP_DISABLE) > >+ DEBUG_MSG("mmap() is disabled by specified option '--non-mmap'.\n"); > > > > return TRUE; > > } > >-- > >2.5.0 > _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec