HomeFreeBSD

QAT: Fix uninitialized seed in QAT compression

Description

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

Details

Provenance
naivekun <naivekun@outlook.com>Authored on Mar 16 2023, 6:54 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Mar 17 2023, 6:09 PM
Parents
rGa5c469c5f380: Fix for mountpoint=legacy
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG345f8beb5835: QAT: Fix uninitialized seed in QAT compression (authored by naivekun <naivekun@outlook.com>).Mar 17 2023, 6:09 PM