]> TLD Linux GIT Repositories - packages/glusterfs.git/commitdiff
- merged fixes from PLD master
authorMarcin Krol <hawk@tld-linux.org>
Sun, 20 Apr 2025 14:24:14 +0000 (14:24 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Sun, 20 Apr 2025 14:24:14 +0000 (14:24 +0000)
glusterfs-atomic32.patch [new file with mode: 0644]
glusterfs-glibc.patch [new file with mode: 0644]
glusterfs.spec

diff --git a/glusterfs-atomic32.patch b/glusterfs-atomic32.patch
new file mode 100644 (file)
index 0000000..5a34e23
--- /dev/null
@@ -0,0 +1,45 @@
+diff -ur glusterfs-10.5.orig/libglusterfs/src/gf-io-legacy.c glusterfs-10.5/libglusterfs/src/gf-io-legacy.c
+--- glusterfs-10.5.orig/libglusterfs/src/gf-io-legacy.c        2023-11-14 15:03:34.000000000 +0000
++++ glusterfs-10.5/libglusterfs/src/gf-io-legacy.c     2025-04-20 13:16:07.787544191 +0000
+@@ -45,7 +45,11 @@
+ {
+     uint64_t seq;
++#ifdef __LP64__
+     seq = uatomic_add_return(&gf_io_legacy_seq, 1) - 1;
++#else
++    seq = __atomic_fetch_add(&gf_io_legacy_seq, 1, __ATOMIC_SEQ_CST);
++#endif
+     gf_io_cbk(NULL, seq, id, res);
+ }
+diff -ur glusterfs-10.5.orig/libglusterfs/src/gf-io-uring.c glusterfs-10.5/libglusterfs/src/gf-io-uring.c
+--- glusterfs-10.5.orig/libglusterfs/src/gf-io-uring.c 2023-11-14 15:03:34.000000000 +0000
++++ glusterfs-10.5/libglusterfs/src/gf-io-uring.c      2025-04-20 13:17:10.011727047 +0000
+@@ -668,7 +668,11 @@
+     idx = tail & gf_io_uring.sq.mask;
+     nr = gf_io_uring_sq_length(idx);
+     if (nr != 0) {
++#ifdef __LP64__
+         nr = (uint32_t)uatomic_xchg(&gf_io_uring.sq.sqes[idx].__pad2[2], 0);
++#else
++        nr = (uint32_t)__atomic_exchange_n(&gf_io_uring.sq.sqes[idx].__pad2[2], 0, __ATOMIC_SEQ_CST);
++#endif
+     }
+     return nr;
+diff -ur glusterfs-10.5.orig/libglusterfs/src/glusterfs/gf-io.h glusterfs-10.5/libglusterfs/src/glusterfs/gf-io.h
+--- glusterfs-10.5.orig/libglusterfs/src/glusterfs/gf-io.h     2023-11-14 15:03:34.000000000 +0000
++++ glusterfs-10.5/libglusterfs/src/glusterfs/gf-io.h  2025-04-20 13:16:07.787544191 +0000
+@@ -358,7 +358,11 @@
+ static inline uint64_t
+ gf_io_reserve(uint32_t nr)
+ {
++#ifdef __LP64__
+     return uatomic_add_return(&gf_io.op_seq, nr) - nr;
++#else
++    return __atomic_fetch_add(&gf_io.op_seq, nr, __ATOMIC_SEQ_CST);
++#endif
+ }
+ /* Wait for a particular entry in gf_io.data_map to be available. */
diff --git a/glusterfs-glibc.patch b/glusterfs-glibc.patch
new file mode 100644 (file)
index 0000000..3d120d7
--- /dev/null
@@ -0,0 +1,11 @@
+--- glusterfs-10.3/libglusterfs/src/glusterfs/compat-io_uring.h.orig   2022-09-20 12:24:29.627820825 +0200
++++ glusterfs-10.3/libglusterfs/src/glusterfs/compat-io_uring.h        2023-03-17 21:47:37.793704259 +0100
+@@ -11,6 +11,8 @@
+ #ifndef __COMPAT_IO_URING_H__
+ #define __COMPAT_IO_URING_H__
++#include <sys/mount.h>
++#define _LINUX_MOUNT_H
+ #include <linux/io_uring.h>
+ /* io_uring setup flags. */
index d3dd361126c51d77e0e4a67849634672a1057319..efecb9f5bfdba6717ad0f757d3d231a340cf6e1b 100644 (file)
@@ -14,7 +14,7 @@ Summary:      Clustered File Storage that can scale to peta bytes
 Summary(pl.UTF-8):     Klastrowy system przechowywania plików skalujący się do petabajtów
 Name:          glusterfs
 Version:       10.5
-Release:       1
+Release:       2
 License:       LGPL v3+ or GPL v2 (libraries), GPL v3+ (programs)
 Group:         Applications/System
 Source0:       https://download.gluster.org/pub/gluster/glusterfs/10/%{version}/glusterfs-%{version}.tar.gz
@@ -22,6 +22,8 @@ Source0:      https://download.gluster.org/pub/gluster/glusterfs/10/%{version}/gluste
 Source1:       glusterfsd.init
 Patch0:                ssl_paths.patch
 Patch1:                ksh_getopts.patch
+Patch2:                %{name}-glibc.patch
+Patch3:                %{name}-atomic32.patch
 URL:           https://www.gluster.org/
 BuildRequires: acl-devel
 BuildRequires: autoconf >= 2.50
@@ -267,8 +269,10 @@ Plik składni Vima do edycji konfiguracji GlusterFS-a.
 
 %prep
 %setup -q
-%patch0 -p1
-%patch1 -p1
+%patch -P0 -p1
+%patch -P1 -p1
+%patch -P2 -p1
+%patch -P3 -p1
 
 %build
 %{__libtoolize}