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(a)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];