* [PATCH] makdumpfile: clean up the in-accurate message printing about mmap
@ 2016-03-16 7:12 Baoquan He
2016-03-17 6:46 ` Atsushi Kumagai
0 siblings, 1 reply; 3+ messages in thread
From: Baoquan He @ 2016-03-16 7:12 UTC (permalink / raw)
To: kexec; +Cc: ats-kumagai, Baoquan He
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 <bhe@redhat.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] makdumpfile: clean up the in-accurate message printing about mmap
2016-03-16 7:12 [PATCH] makdumpfile: clean up the in-accurate message printing about mmap Baoquan He
@ 2016-03-17 6:46 ` Atsushi Kumagai
2016-03-17 6:57 ` Baoquan He
0 siblings, 1 reply; 3+ messages in thread
From: Atsushi Kumagai @ 2016-03-17 6:46 UTC (permalink / raw)
To: Baoquan He; +Cc: kexec@lists.infradead.org
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 <bhe@redhat.com>
Sounds reasonable, thanks.
Acked-by: Atsushi Kumagai <ats-kumagai@wm.jp.nec.com>
>---
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] makdumpfile: clean up the in-accurate message printing about mmap
2016-03-17 6:46 ` Atsushi Kumagai
@ 2016-03-17 6:57 ` Baoquan He
0 siblings, 0 replies; 3+ messages in thread
From: Baoquan He @ 2016-03-17 6:57 UTC (permalink / raw)
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 <bhe@redhat.com>
>
> Sounds reasonable, thanks.
>
> Acked-by: Atsushi Kumagai <ats-kumagai@wm.jp.nec.com>
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-17 6:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-16 7:12 [PATCH] makdumpfile: clean up the in-accurate message printing about mmap Baoquan He
2016-03-17 6:46 ` Atsushi Kumagai
2016-03-17 6:57 ` Baoquan He
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox