From 0498b863bb2ff1b222e9f8babe9dc322eb873bc960de9b1058e81b69c16c94d8 Mon Sep 17 00:00:00 2001 From: nick wang Date: Fri, 18 Oct 2019 01:23:38 +0000 Subject: [PATCH 1/2] Accepting request 740700 from home:RBrownSUSE:branches:network:ha-clustering:Factory Remove obsolete Groups tag (fate#326485) OBS-URL: https://build.opensuse.org/request/show/740700 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=98 --- drbd.changes | 5 +++++ drbd.spec | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drbd.changes b/drbd.changes index 9cb0627..b33db81 100644 --- a/drbd.changes +++ b/drbd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Oct 17 17:48:47 UTC 2019 - Richard Brown + +- Remove obsolete Groups tag (fate#326485) + ------------------------------------------------------------------- Fri Oct 11 02:32:09 UTC 2019 - nick wang diff --git a/drbd.spec b/drbd.spec index 7f48254..34d97c4 100644 --- a/drbd.spec +++ b/drbd.spec @@ -27,7 +27,6 @@ Version: 9.0.20~1+git.7dce3c8b Release: 0 Summary: Linux driver for the "Distributed Replicated Block Device" License: GPL-2.0-or-later -Group: Productivity/Clustering/HA URL: https://drbd.linbit.com/ Source: %{name}-%{version}.tar.bz2 Source1: preamble @@ -60,7 +59,6 @@ raid 1. It is a building block for setting up clusters. %package KMP Summary: Kernel driver -Group: Productivity/Clustering/HA URL: http://drbd.linbit.com/ %description KMP From a2b450528a2b6a2036e30636dd9b8af70a1a3a62d6e1c19da8b3cdc91f11132c Mon Sep 17 00:00:00 2001 From: nick wang Date: Mon, 16 Dec 2019 06:39:41 +0000 Subject: [PATCH 2/2] Accepting request 757251 from network:ha-clustering:Unstable bsc#1158446, fix metadata limit due to 64k page size of ppc64le. OBS-URL: https://build.opensuse.org/request/show/757251 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=99 --- ...tadata-limit-by-page-size-misaligned.patch | 41 +++++++++++++++++++ drbd.changes | 6 +++ drbd.spec | 4 +- 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 drbd-fix-zero-metadata-limit-by-page-size-misaligned.patch diff --git a/drbd-fix-zero-metadata-limit-by-page-size-misaligned.patch b/drbd-fix-zero-metadata-limit-by-page-size-misaligned.patch new file mode 100644 index 0000000..aeb8c6f --- /dev/null +++ b/drbd-fix-zero-metadata-limit-by-page-size-misaligned.patch @@ -0,0 +1,41 @@ +From 55293e6d7064c39183c3622c63ef6c2ab7162b80 Mon Sep 17 00:00:00 2001 +From: Nick Wang +Date: Wed, 11 Dec 2019 14:50:21 +0800 +Subject: [PATCH] drbd: fix zero metadata limit by misaligned with page size + +Metadata is aligned on 4k blocks, which is ok for x86 platform. +But may cause a result of zero page with PPC64LE or ARM with +64k page size. + +And calculate effective bytes directly from sector size. + +Error log: +... +drbd0: Device size clipped from 2097016s to 0s due to metadata size +... + +Signed-off-by: Nick Wang + +CC: drbd-dev@lists.linbit.com + +--- + drbd/drbd_main.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c +index a7294639..336a4177 100644 +--- a/drbd/drbd_main.c ++++ b/drbd/drbd_main.c +@@ -5589,8 +5589,7 @@ u64 directly_connected_nodes(struct drbd_resource *resource, enum which_state wh + + static sector_t bm_sect_to_max_capacity(unsigned int bm_max_peers, sector_t bm_sect) + { +- u64 bm_pages = bm_sect >> (PAGE_SHIFT - SECTOR_SHIFT); +- u64 bm_bytes = bm_pages << PAGE_SHIFT; ++ u64 bm_bytes = bm_sect << SECTOR_SHIFT; + u64 bm_bytes_per_peer = div_u64(bm_bytes, bm_max_peers); + u64 bm_bits_per_peer = bm_bytes_per_peer * BITS_PER_BYTE; + return BM_BIT_TO_SECT(bm_bits_per_peer); +-- +2.16.4 + diff --git a/drbd.changes b/drbd.changes index b33db81..2f7027f 100644 --- a/drbd.changes +++ b/drbd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Dec 16 06:29:42 UTC 2019 - nick wang + +- bsc#1158446, fix metadata limit due to 64k page size of ppc64le. + add patch drbd-fix-zero-metadata-limit-by-page-size-misaligned.patch + ------------------------------------------------------------------- Thu Oct 17 17:48:47 UTC 2019 - Richard Brown diff --git a/drbd.spec b/drbd.spec index 34d97c4..babb724 100644 --- a/drbd.spec +++ b/drbd.spec @@ -35,7 +35,8 @@ Source2: Module.supported Source3: drbd_git_revision Patch1: fix-resync-finished-with-syncs-have-bits-set.patch Patch2: rely-on-sb-handlers.patch -Patch3: suse-coccinelle.patch +Patch3: drbd-fix-zero-metadata-limit-by-page-size-misaligned.patch +Patch4: suse-coccinelle.patch #https://github.com/openSUSE/rpmlint-checks/blob/master/KMPPolicyCheck.py BuildRequires: coccinelle BuildRequires: kernel-source @@ -71,6 +72,7 @@ installed kernel. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 mkdir source cp -a drbd/. source/. || :