[PATCH v2 makedumpfile 3/3] Add -L option to limit output file size

2021-07-08 Thread Benjamin Poirier
This option can be used to ensure that a certain amount of free space is preserved. It is useful when the output of makedumpfile is on the root filesystem and some services fail to start at boot if there is no space left. Note that in some cases the limit can be triggered before the output file re

[PATCH v2 makedumpfile 1/3] Fix off by one error when checking cache_size

2021-07-08 Thread Benjamin Poirier
Given the test in write_cache(): if (cd->buf_size < cd->cache_size) return TRUE; a write is done if buf_size == cache_size. The test at the beginning of write_kdump_page() intends to detect cases when write_cache() will do a write, however it was missing this boundary condit

[PATCH v2 makedumpfile 0/3] Add option to limit file size

2021-07-08 Thread Benjamin Poirier
See feature description in patch "Add -L option to limit output file size" v1: http://lists.infradead.org/pipermail/kexec/2021-June/022728.html v2: Add patches 1, 2 to support dmesg limit with different kernel versions. Stricter parsing of -L option value.

[PATCH v2 makedumpfile 2/3] Dump dmesg using write_and_check_space()

2021-07-08 Thread Benjamin Poirier
Detect incomplete writes which may happen due to insufficient space on the output filesystem. Signed-off-by: Benjamin Poirier --- makedumpfile.c | 36 makedumpfile.h | 3 ++- printk.c | 24 +++- 3 files changed, 37 insertions(+), 26

Re: Compiling makedumpfile from source

2021-07-08 Thread manty kuma
Sorry. I am not sure how but I completely missed this email. Yes, /tmp was not available in my env. I just did mkdir before executing `makedumpfile` and it is now working well. Thank you very much. On Mon, Jun 28, 2021 at 4:07 PM HAGIO KAZUHITO(萩尾 一仁) wrote: > > -Original Message- > > Hi

Re: Compiling makedumpfile from source

2021-07-08 Thread manty kuma
Hi Kazuhito san, I am looking to better understand the sections being filtering out with each of the following options. Zero page: Pages that are empty. Ignoring these pages won't have any impact on analysis. non-private cache and private cache: What exactly are these sections of memory? Just a