QAT: Fix uninitialized seed in QAT compression
commit60cfd3bbc22cd51a2e7e9c8341d9909cdb5dac85
authornaivekun <naivekun@outlook.com>
Thu, 16 Mar 2023 18:54:10 +0000 (17 02:54 +0800)
committerGitHub <noreply@github.com>
Thu, 16 Mar 2023 18:54:10 +0000 (16 11:54 -0700)
treec9b78d5aaa858c0382eb3a1233faeb2d055931f0
parent480d809703c55f54f2ea8b69d22ea36346cfd5e2
QAT: Fix uninitialized seed in QAT compression

CpaDcRqResults have to be initialized with checksum=1 for adler32.
Otherwise when error CPA_DC_OVERFLOW occurred, the next compress
operation will continue on previously part-compressed data, and write
invalid checksum data. When zfs decompress the compressed data, a
invalid checksum will occurred and lead to #14463

Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Weigang Li <weigang.li@intel.com>
Reviewed-by: Chengfei Zhu <chengfeix.zhu@intel.com>
Signed-off-by: naivekun <naivekun0817@gmail.com>
Closes #14632
Closes #14463
module/os/linux/zfs/qat_compress.c