[Crash-utility] [PATCH] crash: allow also block devices as dump file input

Dave Anderson anderson at redhat.com
Wed Nov 25 20:37:14 UTC 2015



----- Original Message -----
> On s390 we have stand-alone dump tools that write the dump directly to a
> block device partition. It is possible to use the partition device node
> instead of a dump file when running crash. When we do that, everything works
> fine but we get the following (a bit misleading) warning:
> 
>   WARNING: /dev/sda1: may be truncated or incomplete
>   PT_LOAD p_offset: 16384
>   p_filesz: 5497558138880
>   bytes required: 5497558155264
>   dumpfile size: 0
> 
> Fix this and print the following info message for block devices:
> 
>   NOTE: /dev/sda1: No dump complete check for block devices
> 
> Signed-off-by: Michael Holzheu <holzheu at linux.vnet.ibm.com>
> ---
>  netdump.c |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> --- a/netdump.c
> +++ b/netdump.c
> @@ -605,6 +605,11 @@ check_dumpfile_size(char *file)
>  	if (stat64(file, &stat) < 0)
>  		return;
>  
> +	if (S_ISBLK(stat.st_mode)) {
> +		error(NOTE, "%s: No dump complete check for block devices\n",
> +		      file);
> +		return;
> +	}
>  	for (i = 0; i < nd->num_pt_load_segments; i++) {
>  		pls = &nd->pt_load_segments[i];
>  
> 

Thanks Michael -- queued for crash-7.1.4:

  https://github.com/crash-utility/crash/commit/5812f08da54734f1db748c828b36a5452e08a329

Dave




More information about the Crash-utility mailing list