]> granicus.if.org Git - zfs/commit
Bug fix in qat_compress.c when compressed size is < 4KB
authorwli5 <weigang.li@intel.com>
Tue, 7 Nov 2017 22:51:30 +0000 (06:51 +0800)
committerTony Hutter <hutter2@llnl.gov>
Mon, 20 Nov 2017 22:48:26 +0000 (16:48 -0600)
commit9add19b37d814918822e3a95bbc4d50a50942749
treee23cfb0a2a59705d6dc959f73cce4944c1ddc970
parentb2d633202d21f7b537c4bc2c8539657da8f61868
Bug fix in qat_compress.c when compressed size is < 4KB

When the 128KB block is compressed to less than 4KB, the pointer
to the Footer is not in the end of the compressed buffer, that's
because the Header offset was added twice for this case. So there
is a gap between the Footer and the compressed buffer.
1. Always compute the Footer pointer address from the start of the
last page.
2. Remove the un-used workaroud code which has been verified fixed
with the latest driver and this fix.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Weigang Li <weigang.li@intel.com>
Closes #6827
module/zfs/qat_compress.c