Accepting request 491412 from network:ha-clustering:Factory
1 OBS-URL: https://build.opensuse.org/request/show/491412 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd-utils?expand=0&rev=13
This commit is contained in:
commit
a5da1932c9
72
Pass-md_index-information-to-detect_md.patch
Normal file
72
Pass-md_index-information-to-detect_md.patch
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
detect_md() assumes that the metadata index format is
|
||||||
|
DRBD_MD_INDEX_FLEX_INT, but in fact it can also be
|
||||||
|
DRBD_MD_INDEX_FLEX_EXT.
|
||||||
|
|
||||||
|
[lge: Actually, it could even be old-style indexed fixed size meta data,
|
||||||
|
but that can be fixed an other day, or worked around with dump/restore.
|
||||||
|
|
||||||
|
Thanks for noticing and fixing a regression when trying to detect and
|
||||||
|
"convert" external meta data. We introduced said regression likely in
|
||||||
|
late 2011, even before 8.4 came out.]
|
||||||
|
|
||||||
|
Signed-off-by: Kristoffer Grönlund <krig@koru.se>
|
||||||
|
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
|
||||||
|
---
|
||||||
|
user/shared/drbdmeta.c | 12 ++++++------
|
||||||
|
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/user/shared/drbdmeta.c b/user/shared/drbdmeta.c
|
||||||
|
index 649076e1..2a79264c 100644
|
||||||
|
--- a/user/shared/drbdmeta.c
|
||||||
|
+++ b/user/shared/drbdmeta.c
|
||||||
|
@@ -4348,25 +4348,25 @@ void check_for_existing_data(struct format *cfg)
|
||||||
|
}
|
||||||
|
|
||||||
|
/* tries to guess what is in the on_disk_buffer */
|
||||||
|
-enum md_format detect_md(struct md_cpu *md, const uint64_t ll_size)
|
||||||
|
+enum md_format detect_md(struct md_cpu *md, const uint64_t ll_size, int index_format)
|
||||||
|
{
|
||||||
|
struct md_cpu md_test;
|
||||||
|
enum md_format have = DRBD_UNKNOWN;
|
||||||
|
|
||||||
|
md_disk_07_to_cpu(&md_test, (struct md_on_disk_07*)on_disk_buffer);
|
||||||
|
- if (is_valid_md(DRBD_V07, &md_test, DRBD_MD_INDEX_FLEX_INT, ll_size)) {
|
||||||
|
+ if (is_valid_md(DRBD_V07, &md_test, index_format, ll_size)) {
|
||||||
|
have = DRBD_V07;
|
||||||
|
*md = md_test;
|
||||||
|
}
|
||||||
|
|
||||||
|
md_disk_08_to_cpu(&md_test, (struct md_on_disk_08*)on_disk_buffer);
|
||||||
|
- if (is_valid_md(DRBD_V08, &md_test, DRBD_MD_INDEX_FLEX_INT, ll_size)) {
|
||||||
|
+ if (is_valid_md(DRBD_V08, &md_test, index_format, ll_size)) {
|
||||||
|
have = DRBD_V08;
|
||||||
|
*md = md_test;
|
||||||
|
}
|
||||||
|
|
||||||
|
md_disk_09_to_cpu(&md_test, (struct meta_data_on_disk_9*)on_disk_buffer);
|
||||||
|
- if (is_valid_md(DRBD_V09, &md_test, DRBD_MD_INDEX_FLEX_INT, ll_size)) {
|
||||||
|
+ if (is_valid_md(DRBD_V09, &md_test, index_format, ll_size)) {
|
||||||
|
have = DRBD_V09;
|
||||||
|
*md = md_test;
|
||||||
|
}
|
||||||
|
@@ -4406,7 +4406,7 @@ void check_internal_md_flavours(struct format * cfg) {
|
||||||
|
|
||||||
|
if (have == DRBD_UNKNOWN) {
|
||||||
|
PREAD(cfg, on_disk_buffer, 4096, flex_offset);
|
||||||
|
- have = detect_md(&md_now, cfg->bd_size);
|
||||||
|
+ have = detect_md(&md_now, cfg->bd_size, DRBD_MD_INDEX_FLEX_INT);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (have == DRBD_UNKNOWN)
|
||||||
|
@@ -4515,7 +4515,7 @@ void check_external_md_flavours(struct format * cfg) {
|
||||||
|
}
|
||||||
|
|
||||||
|
PREAD(cfg, on_disk_buffer, 4096, cfg->md_offset);
|
||||||
|
- have = detect_md(&md_now, cfg->bd_size);
|
||||||
|
+ have = detect_md(&md_now, cfg->bd_size, DRBD_MD_INDEX_FLEX_EXT);
|
||||||
|
|
||||||
|
if (have == DRBD_UNKNOWN)
|
||||||
|
return;
|
||||||
|
--
|
||||||
|
2.12.0
|
||||||
|
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 27 06:19:24 UTC 2017 - nwang@suse.com
|
||||||
|
|
||||||
|
- bsc#1032074, fix Inconsistent metadata after upgrade
|
||||||
|
- Add Pass-md_index-information-to-detect_md.patch
|
||||||
|
* will be merged into upstream in v8.9.12
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Apr 4 12:21:55 UTC 2017 - kgronlund@suse.com
|
Tue Apr 4 12:21:55 UTC 2017 - kgronlund@suse.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package drbd-utils
|
# spec file for package drbd-utils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -34,6 +34,8 @@ Patch3: fence-after-pacemaker-down.patch
|
|||||||
Patch4: fix-segfault-up-stacked-resource.patch
|
Patch4: fix-segfault-up-stacked-resource.patch
|
||||||
# PATCH-SUSE-FIX: Disable quorum in default configuration (bsc#1032142)
|
# PATCH-SUSE-FIX: Disable quorum in default configuration (bsc#1032142)
|
||||||
Patch5: 0001-Disable-quorum-in-default-configuration-bsc-1032142.patch
|
Patch5: 0001-Disable-quorum-in-default-configuration-bsc-1032142.patch
|
||||||
|
# Patch will be merged to upstream in 8.9.12 (bsc#1032074)
|
||||||
|
Patch6: Pass-md_index-information-to-detect_md.patch
|
||||||
|
|
||||||
Provides: drbd-bash-completion = %{version}
|
Provides: drbd-bash-completion = %{version}
|
||||||
Provides: drbd-pacemaker = %{version}
|
Provides: drbd-pacemaker = %{version}
|
||||||
@ -78,6 +80,7 @@ raid 1. It is a building block for setting up clusters.
|
|||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
|
%patch6 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user