Signed-off-by: Tao Liu <ltao@xxxxxxxxxx> --- makedumpfile.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/makedumpfile.c b/makedumpfile.c index e70d882..2514eb6 100644 --- a/makedumpfile.c +++ b/makedumpfile.c @@ -919,7 +919,7 @@ readpage_kdump_compressed_parallel(int fd_memory, unsigned long long paddr, * Read page data */ rdbuf = pd.flags & (DUMP_DH_COMPRESSED_ZLIB | DUMP_DH_COMPRESSED_LZO | - DUMP_DH_COMPRESSED_SNAPPY) ? buf : bufptr; + DUMP_DH_COMPRESSED_SNAPPY | DUMP_DH_COMPRESSED_ZSTD) ? buf : bufptr; if (read(fd_memory, rdbuf, pd.size) != pd.size) { ERRMSG("Can't read %s. %s\n", info->name_memory, strerror(errno)); @@ -960,6 +960,14 @@ readpage_kdump_compressed_parallel(int fd_memory, unsigned long long paddr, ERRMSG("Uncompress failed: %d\n", ret); return FALSE; } +#endif +#ifdef USEZSTD + } else if ((pd.flags & DUMP_DH_COMPRESSED_ZSTD)) { + ret = ZSTD_decompress(bufptr, info->page_size, buf, pd.size); + if (ZSTD_isError(ret) || (ret != info->page_size)) { + ERRMSG("Uncompress failed: %d\n", ret); + return FALSE; + } #endif } -- 2.29.2 _______________________________________________ kexec mailing list kexec@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/kexec