Accepting request 835378 from network:ha-clustering:Factory

OBS-URL: https://build.opensuse.org/request/show/835378
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=87
This commit is contained in:
Dominique Leuenberger 2020-09-21 15:27:05 +00:00 committed by Git OBS Bridge
commit 58761eddfc
9 changed files with 208 additions and 8 deletions

View File

@ -9,9 +9,9 @@
This will download branch first instead of tag.
<param name="revision">drbd-9.0</param>
<param name="version">9.0.23~1</param>
<param name="version">9.0.25~0</param>
-->
<param name="versionformat">9.0.23~1+git.%h</param>
<param name="versionformat">9.0.25~0+git.%h</param>
<param name="revision">drbd-9.0</param>
</service>

View File

@ -0,0 +1,17 @@
[ 11s] In file included from /home/abuild/rpmbuild/BUILD/drbd-9.0.24~1+git.17730ea3/default/drbd_main.c:19:
[ 11s] /usr/src/linux-5.8.0-1/include/linux/vermagic.h:6:2: error: #error "This header can be included from kernel/module.c or *.mod.c only"
[ 11s] 6 | #error "This header can be included from kernel/module.c or *.mod.c only"
[ 11s] | ^~~~~
[ 11s] CC [M] /home/abuild/rpmbuild/BUILD/drbd-9.0.24~1+git.17730ea3/default/drbd_strings.o
diff -Naur drbd-9.0.24~1+git.17730ea3.orig/drbd/drbd_main.c drbd-9.0.24~1+git.17730ea3/drbd/drbd_main.c
--- drbd-9.0.24~1+git.17730ea3.orig/drbd/drbd_main.c 2020-08-13 14:22:17.895201728 +0800
+++ drbd-9.0.24~1+git.17730ea3/drbd/drbd_main.c 2020-08-13 14:44:14.849369576 +0800
@@ -16,7 +16,6 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
-#include <linux/vermagic.h>
#include <linux/jiffies.h>
#include <linux/drbd.h>
#include <linux/uaccess.h>

View File

@ -0,0 +1,98 @@
kernel_setsockopt removed in cb8e59cc
[ 13s] /home/abuild/rpmbuild/BUILD/drbd-9.0.24~1+git.17730ea3/default/drbd_transport_tcp.c: In function 'dtt_nodelay':
[ 13s] /home/abuild/rpmbuild/BUILD/drbd-9.0.24~1+git.17730ea3/default/drbd_transport_tcp.c:158:9: error: implicit declaration of funct
ion 'kernel_setsockopt'; did you mean 'kernel_getsockname'? [-Werror=implicit-function-declaration]
[ 13s] 158 | (void) kernel_setsockopt(socket, SOL_TCP, TCP_NODELAY, (char *)&val, sizeof(val));
[ 13s] | ^~~~~~~~~~~~~~~~~ [ 13s] | kernel_getsockname
[ 14s] cc1: some warnings being treated as errors
diff -Naur drbd-9.0.24~1+git.17730ea3.orig/drbd/drbd-kernel-compat/have_kernel_setsockopt.c drbd-9.0.24~1+git.17730ea3/drbd/drbd-kernel-compat/have_kernel_setsockopt.c
--- drbd-9.0.24~1+git.17730ea3.orig/drbd/drbd-kernel-compat/have_kernel_setsockopt.c 1970-01-01 08:00:00.000000000 +0800
+++ drbd-9.0.24~1+git.17730ea3/drbd/drbd-kernel-compat/have_kernel_setsockopt.c 2020-08-14 10:18:35.107901337 +0800
@@ -0,0 +1,13 @@
+#include <linux/socket.h>
+
+/*
+ * kernel_setsockopt removed in cb8e59cc
+*/
+
+void test(void)
+{
+ struct socket *sock;
+ int val = 1;
+
+ (void) kernel_setsockopt(sock, 0, 0, (char *)&val, sizeof(val));
+}
diff -Naur drbd-9.0.24~1+git.17730ea3.orig/drbd/drbd_transport_tcp.c drbd-9.0.24~1+git.17730ea3/drbd/drbd_transport_tcp.c
--- drbd-9.0.24~1+git.17730ea3.orig/drbd/drbd_transport_tcp.c 2020-08-14 10:15:16.122125660 +0800
+++ drbd-9.0.24~1+git.17730ea3/drbd/drbd_transport_tcp.c 2020-08-14 10:31:16.930382120 +0800
@@ -154,8 +154,12 @@
static void dtt_nodelay(struct socket *socket)
{
+#ifdef COMPAT_HAVE_KERNEL_SETSOCKOPT
int val = 1;
(void) kernel_setsockopt(socket, SOL_TCP, TCP_NODELAY, (char *)&val, sizeof(val));
+#else
+ tcp_sock_set_nodelay(socket->sk);
+#endif
}
static int dtt_init(struct drbd_transport *transport)
@@ -889,7 +893,6 @@
struct socket *dsocket, *csocket;
struct net_conf *nc;
int timeout, err;
- int one = 1;
bool ok;
dsocket = NULL;
@@ -1071,9 +1074,14 @@
dsocket->sk->sk_sndtimeo = timeout;
csocket->sk->sk_sndtimeo = timeout;
+#ifdef COMPAT_HAVE_KERNEL_SETSOCKOPT
+ int one = 1;
err = kernel_setsockopt(dsocket, SOL_SOCKET, SO_KEEPALIVE, (char *)&one, sizeof(one));
if (err)
tr_warn(transport, "Failed to enable SO_KEEPALIVE %d\n", err);
+#else
+ sock_set_keepalive(dsocket->sk);
+#endif
return 0;
@@ -1213,20 +1221,32 @@
static void dtt_cork(struct socket *socket)
{
+#ifdef COMPAT_HAVE_KERNEL_SETSOCKOPT
int val = 1;
(void) kernel_setsockopt(socket, SOL_TCP, TCP_CORK, (char *)&val, sizeof(val));
+#else
+ tcp_sock_set_cork(socket->sk, true);
+#endif
}
static void dtt_uncork(struct socket *socket)
{
+#ifdef COMPAT_HAVE_KERNEL_SETSOCKOPT
int val = 0;
(void) kernel_setsockopt(socket, SOL_TCP, TCP_CORK, (char *)&val, sizeof(val));
+#else
+ tcp_sock_set_cork(socket->sk, false);
+#endif
}
static void dtt_quickack(struct socket *socket)
{
+#ifdef COMPAT_HAVE_KERNEL_SETSOCKOPT
int val = 2;
(void) kernel_setsockopt(socket, SOL_TCP, TCP_QUICKACK, (char *)&val, sizeof(val));
+#else
+ tcp_sock_set_quickack(socket->sk, 2);
+#endif
}
static bool dtt_hint(struct drbd_transport *transport, enum drbd_stream stream,

View File

@ -0,0 +1,42 @@
pgprot removed in 88dca4c
[ 139s] /home/abuild/rpmbuild/BUILD/drbd-9.0.23~1+git.d16bfab7/default/drbd_bitmap.c: In function 'bm_realloc_pages':
[ 139s] /home/abuild/rpmbuild/BUILD/drbd-9.0.23~1+git.d16bfab7/default/drbd_bitmap.c:368:15: error: too many arguments to function '__vmalloc'
[ 139s] 368 | new_pages = __vmalloc(bytes,
[ 139s] | ^~~~~~~~~
[ 139s] In file included from /home/abuild/rpmbuild/BUILD/drbd-9.0.23~1+git.d16bfab7/default/drbd_bitmap.c:16:
[ 139s] /usr/src/linux-5.8.0-1/include/linux/vmalloc.h:111:14: note: declared here
[ 139s] 111 | extern void *__vmalloc(unsigned long size, gfp_t gfp_mask);
[ 139s] | ^~~~~~~~~
diff -Naur drbd-9.0.24~1+git.17730ea3.orig/drbd/drbd-kernel-compat/drbd_wrappers.h drbd-9.0.24~1+git.17730ea3/drbd/drbd-kernel-compat/drbd_wrappers.h
--- drbd-9.0.24~1+git.17730ea3.orig/drbd/drbd-kernel-compat/drbd_wrappers.h 2020-08-13 14:22:17.895201728 +0800
+++ drbd-9.0.24~1+git.17730ea3/drbd/drbd-kernel-compat/drbd_wrappers.h 2020-08-13 14:33:13.168276614 +0800
@@ -521,4 +521,8 @@
void arch_wb_cache_pmem(void *addr, size_t size);
#endif
+#ifndef COMPAT_HAVE_VMALLOC_NO_PGPROT
+#define __vmalloc(SIZE, GFP, PRGROT) __vmalloc(SIZE, GFP)
+#endif
+
#endif
diff -Naur drbd-9.0.24~1+git.17730ea3.orig/drbd/drbd-kernel-compat/tests/have_vmalloc_no_pgprot.c drbd-9.0.24~1+git.17730ea3/drbd/drbd-kernel-compat/tests/have_vmalloc_no_pgprot.c
--- drbd-9.0.24~1+git.17730ea3.orig/drbd/drbd-kernel-compat/tests/have_vmalloc_no_pgprot.c 1970-01-01 08:00:00.000000000 +0800
+++ drbd-9.0.24~1+git.17730ea3/drbd/drbd-kernel-compat/tests/have_vmalloc_no_pgprot.c 2020-08-13 14:29:04.930365926 +0800
@@ -0,0 +1,15 @@
+/*
+ * Because RHEL 7.5 chose to provide refcount.h, but not use it, we don't
+ * directly include refcount.h, but rely on the implicit include via kref.h,
+ * This way, we avoid compile time warnings about atomic_t != refcount_t.
+ */
+#include <linux/vmalloc.h>
+
+/*
+ * extern void *__vmalloc(unsigned long size, gfp_t gfp_mask);
+ * 88dca4c mm: remove the pgprot argument to __vmalloc
+*/
+void test(unsigned long bytes)
+{
+ __vmalloc(bytes, GFP_NOIO | __GFP_ZERO);
+}

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:49862ab5d0f4d9ad91f1030ff111f8611af2b1a4a3e84847048bdcc53507fe2b
size 347341

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a2caec13ee4d3936ebf296a8d52c17197a6c90c4504e6c2c066a844f630ef355
size 355097

View File

@ -1,3 +1,41 @@
-------------------------------------------------------------------
Fri Sep 18 07:38:21 UTC 2020 - nick wang <nwang@suse.com>
- bsc#1175257, update to 9.0.25-0rc1
* fix a race condition between receiving UUIDs and finishing a resync
that can lead to a false-positive split-brain detection later on
* fix access after free of peer_req objects, that only happened when
a resync target node is paused sync source at the same time
* fix abortion of local state changes in case they can not proceed due
to loss of connection
* fix corner cases with reconciliation resync and parallel promote
* fix an issue establishing a connection when the multipath feature is
used to connect to a stacked resource without a dedicated service IP
* fix sometimes a peer-disk state to another resync-target staying Outdated
after two resyncs from the same sync source node finish
* fix an (unlikely) deadlock while establishing a connection
* deactivate the kref_debug code, it has performance implicatios
* Introduce the "disconnected" hander; it receives the last connection
state in the evnironment variable DRBD_CSTATE
- Changes of drbd-9.0.24-1
* fix deadlock when connecting drbd-9 to drbd-8.4 and the drbd-9
side becomes sync-source
* fix an issue with 3 (or more) node configurations; with a diskless node
and two storage nodes; if one of the storage nodes was hard rebooted
and came back and the diskless got primary and did not issue write
requests and the returning storage node established a connection with
the surviving storage node first, DRBD failed to upgrade the disk
state to UpToDate after the resync
* detect split-brain situations also when both nodes are primary;
this is how it was in drbd-8.4; up to now drbd-9 did not realize
the split-brain since it complains about the not allowed dual
primary first; for this change a new protocol version was necessary
* verified it compiles with Linux 5.7
- Add compatible patches to kernel v5.8.0
Add patch compat_remove_include_vermagic.patch
Add patch compat_remove_kernel_setsockopt.patch
Add patch compat_remove_pgprot_88dca4c.patch
-------------------------------------------------------------------
Wed Jun 10 03:33:22 UTC 2020 - nick wang <nwang@suse.com>

View File

@ -24,7 +24,7 @@
%endif
%endif
Name: drbd
Version: 9.0.23~1+git.d16bfab7
Version: 9.0.25~0+git.bd41626d
Release: 0
Summary: Linux driver for the "Distributed Replicated Block Device"
License: GPL-2.0-or-later
@ -37,7 +37,9 @@ Source3: drbd_git_revision
Patch1: fix-resync-finished-with-syncs-have-bits-set.patch
Patch2: rely-on-sb-handlers.patch
Patch3: drbd-fix-zero-metadata-limit-by-page-size-misaligned.patch
#In 61ff72f401680(v5.5-rc2), pr_warning is removed
Patch4: compat_remove_pgprot_88dca4c.patch
Patch5: compat_remove_include_vermagic.patch
Patch6: compat_remove_kernel_setsockopt.patch
Patch99: suse-coccinelle.patch
#https://github.com/openSUSE/rpmlint-checks/blob/master/KMPPolicyCheck.py
BuildRequires: coccinelle >= 1.0.8
@ -74,6 +76,9 @@ installed kernel.
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch99 -p1
mkdir source

View File

@ -1 +1 @@
GIT-hash: d16bfab7a4033024fed2d99d3b179aa6bb6eb300
GIT-hash: bd41626d3fdc7b6f575532020ff9ce1c9c4bf29b