[PATCH 1/2] Move scrubbing process from reader to writer.

Mahesh Jagannath Salgaonkar mahesh at linux.vnet.ibm.com
Fri Apr 12 09:29:49 EDT 2013


On 04/12/2013 11:47 AM, Atsushi Kumagai wrote:
> From: Atsushi Kumagai <kumagai-atsushi at mxc.nes.nec.co.jp>
> Date: Thu, 11 Apr 2013 09:36:36 +0900
> Subject: [PATCH 1/2] Move scrubbing process from reader to writer.
> 
> When create a dumpfile in the kdump-compressed format, scrubbing
> process is done in reading process via read_pfn(). But it would be
> better to do it just before actually writing the data like the
> case of ELF.
> 
> Signed-off-by: Atsushi Kumagai <kumagai-atsushi at mxc.nes.nec.co.jp>

Hi Atsushi,

Changes looks good to me.

Thanks,
-Mahesh.

> ---
>  makedumpfile.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/makedumpfile.c b/makedumpfile.c
> index 9cf907c..725100b 100644
> --- a/makedumpfile.c
> +++ b/makedumpfile.c
> @@ -5337,7 +5337,6 @@ read_pfn(unsigned long long pfn, unsigned char *buf)
>  			ERRMSG("Can't get the page data.\n");
>  			return FALSE;
>  		}
> -		filter_data_buffer(buf, paddr, info->page_size);
>  		return TRUE;
>  	}
> 
> @@ -5360,7 +5359,6 @@ read_pfn(unsigned long long pfn, unsigned char *buf)
>  		ERRMSG("Can't get the page data.\n");
>  		return FALSE;
>  	}
> -	filter_data_buffer(buf, paddr, size1);
>  	if (size1 != info->page_size) {
>  		size2 = info->page_size - size1;
>  		if (!offset2) {
> @@ -5370,7 +5368,6 @@ read_pfn(unsigned long long pfn, unsigned char *buf)
>  				ERRMSG("Can't get the page data.\n");
>  				return FALSE;
>  			}
> -			filter_data_buffer(buf + size1, paddr + size1, size2);
>  		}
>  	}
>  	return TRUE;
> @@ -5805,6 +5802,7 @@ write_kdump_pages(struct cache_data *cd_header, struct cache_data *cd_page)
> 
>  		if (!read_pfn(pfn, buf))
>  			goto out;
> +		filter_data_buffer(buf, pfn_to_paddr(pfn), info->page_size);
> 
>  		/*
>  		 * Exclude the page filled with zeros.
> @@ -5983,6 +5981,7 @@ write_kdump_pages_cyclic(struct cache_data *cd_header, struct cache_data *cd_pag
> 
>  		if (!read_pfn(pfn, buf))
>  			goto out;
> +		filter_data_buffer(buf, pfn_to_paddr(pfn), info->page_size);
> 
>  		/*
>  		 * Exclude the page filled with zeros.
> 




More information about the kexec mailing list