Compare commits

..

No commits in common. "c8s" and "c10s" have entirely different histories.
c8s ... c10s

5 changed files with 27 additions and 102 deletions

1
.gitignore vendored
View File

@ -1,2 +1 @@
SOURCES/qatzip-*.tar.gz
/qatzip-*.tar.gz /qatzip-*.tar.gz

View File

@ -1,6 +1,6 @@
--- !Policy --- !Policy
product_versions: product_versions:
- rhel-8 - rhel-10
decision_context: osci_compose_gate decision_context: osci_compose_gate
rules: rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -1,63 +0,0 @@
From 906ff19a0bc4d770d0d8cd484bdce8d5fbb1843f Mon Sep 17 00:00:00 2001
From: Xinghong Chen <xinghong.chen@intel.com>
Date: Wed, 31 Jul 2024 22:57:09 -0400
Subject: [PATCH] QATAPP-32528: Fixed the qzip decompress large file issue
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-type: text/plain
* The “bytes_processed” only updated when “DATA_ERROR/BUF_ERROR”
happened. Its OK if during each “src buffer”, it would run into
“DATA_ERROR/BUF_ERROR” (This is the majority of cases, for 512M
src buffer, it almost always have “incomplete source buffer”
return). Its also ok, if for each “src buffer”, it never run into
“DATA_ERROR/BUF_ERROR”, so it wouldnt call “fseek”,
then bytes_processed is useless. But, if we mix those tow scenarios,
For some “src buffer” run into “DATA_ERROR/BUF_ERROR” and
others dont. Then “bytes_processed” will miss some process
source for which complete decompression without error issue.
It cause the “fseek” set to incorrect file stream position.
Signed-off-by: Xinghong Chen <xinghong.chen@intel.com>
Signed-off-by: David Qian <david.qian@intel.com>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
---
utils/qzip.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/utils/qzip.c b/utils/qzip.c
index bd69858..63d3702 100644
--- a/utils/qzip.c
+++ b/utils/qzip.c
@@ -255,7 +255,8 @@ void doProcessFile(QzSession_T *sess, const char *src_file_name,
FILE *src_file = NULL;
FILE *dst_file = NULL;
unsigned int bytes_read = 0;
- unsigned long bytes_processed = 0;
+ unsigned int bytes_lookahead = 0;
+ long offset_revert = 0;
unsigned int ratio_idx = 0;
const unsigned int ratio_limit =
sizeof(g_bufsz_expansion_ratio) / sizeof(unsigned int);
@@ -326,14 +327,15 @@ void doProcessFile(QzSession_T *sess, const char *src_file_name,
puts((is_compress) ? "Compressing..." : "Decompressing...");
+ bytes_lookahead = bytes_read;
ret = doProcessBuffer(sess, src_buffer, &bytes_read, dst_buffer,
dst_buffer_size, time_list_head, dst_file,
&dst_file_size, is_compress);
if (QZ_DATA_ERROR == ret || QZ_BUF_ERROR == ret) {
- bytes_processed += bytes_read;
if (0 != bytes_read) {
- if (-1 == fseek(src_file, bytes_processed, SEEK_SET)) {
+ offset_revert = (long)bytes_read - (long)bytes_lookahead;
+ if (-1 == fseek(src_file, offset_revert, SEEK_CUR)) {
ret = ERROR;
goto exit;
}
--
2.49.0

View File

@ -4,8 +4,8 @@
%global libqatzip_soversion 3 %global libqatzip_soversion 3
Name: qatzip Name: qatzip
Version: 1.1.2 Version: 1.3.1
Release: 3%{?dist} Release: 1%{?dist}
Summary: Intel QuickAssist Technology (QAT) QATzip Library Summary: Intel QuickAssist Technology (QAT) QATzip Library
License: BSD-3-Clause License: BSD-3-Clause
URL: https://github.com/intel/%{githubname} URL: https://github.com/intel/%{githubname}
@ -14,13 +14,11 @@ Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: gcc >= 4.8.5 BuildRequires: gcc >= 4.8.5
BuildRequires: zlib-devel >= 1.2.7 BuildRequires: zlib-devel >= 1.2.7
BuildRequires: qatlib-devel >= 23.08.0 BuildRequires: qatlib-devel >= 23.08.0
BuildRequires: autoconf automake libtool make lz4-devel BuildRequires: autoconf automake libtool make lz4-devel numactl-devel
# The purpose of the package is to support hardware that only exists on x86_64 platforms # The purpose of the package is to support hardware that only exists on x86_64 platforms
# https://bugzilla.redhat.com/show_bug.cgi?id=1987280 # https://bugzilla.redhat.com/show_bug.cgi?id=1987280
ExclusiveArch: x86_64 ExclusiveArch: x86_64
Patch1: qatapp-32528-fix-large-files.patch
%description %description
QATzip is a user space library which builds on top of the Intel QATzip is a user space library which builds on top of the Intel
QuickAssist Technology user space library, to provide extended QuickAssist Technology user space library, to provide extended
@ -48,7 +46,7 @@ This package contains headers and libraries required to build
applications that use the QATzip APIs. applications that use the QATzip APIs.
%prep %prep
%autosetup -p1 -n %{githubname}-%{version} %autosetup -n %{githubname}-%{version}
%build %build
%set_build_flags %set_build_flags
@ -76,6 +74,7 @@ rm -vf %{buildroot}%{_mandir}/*.pdf
%license LICENSE* %license LICENSE*
%{_mandir}/man1/qzip.1* %{_mandir}/man1/qzip.1*
%{_bindir}/qzip %{_bindir}/qzip
%{_bindir}/qatzip-test
%files libs %files libs
%license LICENSE* %license LICENSE*
@ -88,39 +87,29 @@ rm -vf %{buildroot}%{_mandir}/*.pdf
%{_libdir}/pkgconfig/*.pc %{_libdir}/pkgconfig/*.pc
%changelog %changelog
* Mon Apr 07 2025 Vladis Dronov <vdronov@redhat.com> - 1.1.2-3 * Tue Apr 29 2025 Vladis Dronov <vdronov@redhat.com> - 1.3.1-1
- Fix large files decompression bug QATAPP-32528 (RHEL-35325) - Update to qatzip 1.3.1 @ 10dbadba (RHEL-73092, RHEL-50462)
- Fix qatzip docker file build broken issue
* Mon Nov 20 2023 Vladis Dronov <vdronov@redhat.com> - 1.1.2-2 - Support Latency sensitive mode for qatzip
- Rebuild qatzip 1.1.2 for qatlib 23.11 (RHEL-15637) - Add a suit of comp/decomp API to support Async offloading
- Support zlib format and end of stream flag
* Wed Mar 29 2023 Vladis Dronov <vdronov@redhat.com> - 1.1.2-1
- Update to qatzip 1.1.2 (bz 2082439)
- Update README, update driver configure files
- Fix some bugs - Fix some bugs
- Add support for pkgconfig
* Mon Aug 08 2022 Vladis Dronov <vdronov@redhat.com> - 1.0.9-1 * Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.2.0-4
- Rebuild for qatzip v1.0.9 (bz 2048039) - Bump release for October 2024 mass rebuild:
- Update to require qatlib-devel >= 22.07.0 due to soversion bump Resolves: RHEL-64018
* Wed Oct 13 2021 Vladis Dronov <vdronov@redhat.com> - 1.0.6-5 * Wed Jun 26 2024 Vladis Dronov <vdronov@redhat.com> - 1.2.0-3
- Add OSCI testing harness (bz 1747500) - Add self-tests and an OSCI harness (RHEL-20179)
* Mon Sep 13 2021 zm627 <zheng.ma@intel.com> - 1.0.6-3 * Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.2.0-2
- Rebuild for qatzip v1.0.6 - Bump release for June 2024 mass rebuild
* Sun Sep 12 2021 zm627 <zheng.ma@intel.com> - 1.0.6-2 * Fri Mar 22 2024 Vladis Dronov <vdronov@redhat.com> - 1.2.0-1
- Upload new qatzip source package and rebuild - Update to qatzip v1.2.0 (RHEL-20179)
- Add qatzip-test tool
- SW fallback
- Fix some bugs
* Sun Sep 12 2021 zm627 <zheng.ma@intel.com> - 1.0.6-1 * Fri Jan 26 2024 Vladis Dronov <vdronov@redhat.com> - 1.1.2-5
- Update to latest qatlib and qatzip upstream release - Initial import from Fedora 40
* Sun Sep 12 2021 zm627 <zheng.ma@intel.com> - 1.0.5-3
- Add ExcludeArch ticket number
* Sun Sep 12 2021 zm627 <zheng.ma@intel.com> - 1.0.5-2
- Rebuilt for qatlib v21.08
* Tue Jul 13 2021 Ma Zheng <zheng.ma@intel.com> - 1.0.5-1
- Initial version of RPM Package

View File

@ -1 +1 @@
SHA512 (qatzip-1.1.2.tar.gz) = 88d2695227e1ce034ae58d2b7d6c4fba4da19aeba2493336acc23b80fd1de33a31ad7cab72eb84dee2ee03fa774a33f7eb30763f1d16b4b120fd84bf38e01d15 SHA512 (qatzip-1.3.1.tar.gz) = 07ca413f8bc879cb25e9024f6009f371512311f8401dc78d28c277790177c549bfb6ae50b14e8c25f9d4ded692fcadcc1fdc58be6584e8312ef8f6da68ff6504