[Rpm-maint] [rpm-software-management/rpm] Backport multi-threaded zstd to 4.14.x to support multi-threaded zstd compression on centos 8 (PR #2130)

Alexander notifications at github.com
Mon Jul 25 21:33:30 UTC 2022


@angry-cellophane commented on this pull request.



> @@ -1098,7 +1099,14 @@ static rpmzstd rpmzstdNew(int fdno, const char *fmode)
 	    flags &= ~O_ACCMODE;
 	    flags |= O_RDWR;
 	    continue;
-	    break;
+	case 'T':
+	    if (*s >= '0' && *s <= '9') {
+		threads = strtol(s, (char **)&s, 10);
+		/* T0 means automatic detection */
+		if (threads == 0)
+		    threads = sysconf(_SC_NPROCESSORS_ONLN);

same as in [`xz`](https://github.com/rpm-software-management/rpm/blob/rpm-4.14.x/rpmio/rpmio.c#L799)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2130#pullrequestreview-1050098120
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2130/review/1050098120 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220725/61cf4a84/attachment-0001.html>


More information about the Rpm-maint mailing list