Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zlib may not be able to decompress some data compressed using QAT #12317

Closed
hedongzhang opened this issue Jul 2, 2021 · 1 comment
Closed
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@hedongzhang
Copy link
Contributor

System information

Type Version/Name
Distribution Name redhat
Distribution Version 7.8
Linux Kernel any
Architecture x86
ZFS Version zfs-2.1
SPL Version

Describe the problem you're observing

We used QAT compression data blocks. When we did not use QAT cards, we found that several data blocks could not be decompressed using zlib. At first, we thought the data was corrupted. But the test found that the QAT card can be normally decompressed, the data seems to be no problem, the problem is the checksum(ADLER32) of last four byte. Then we queried the QAT API and found that the CpaDcGeneratefooter function that calculates the checksum code does not support the CPA_DC_STATELESS mode. ZFS uses the CPA_DC_STATELESS mode of the QAT card. So we think that might be a problem.

//qat_compress.c 195 line
		sd.sessState = CPA_DC_STATELESS;
		sd.deflateWindowSize = 7;
		sd.checksum = CPA_DC_ADLER32;

//qat_compress.c 440 line
		status = cpaDcGenerateFooter(session_handle,
		    flat_buf_dst, &dc_results);
		if (status != CPA_STATUS_SUCCESS)
			goto fail;

QAT Data Compression API page:61)

Describe how to reproduce the problem

Include any warning/errors/backtraces from the system logs

@hedongzhang hedongzhang added Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang) labels Jul 2, 2021
@cfzhu
Copy link
Contributor

cfzhu commented Jul 15, 2021

Hi Hedong @hedongzhang , As we discussed offline, this was a know issue, and was fixed by PR #7338, Could you close this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

2 participants