diff --git a/drbd-utils.changes b/drbd-utils.changes index 3f6b177..7b8ebcd 100644 --- a/drbd-utils.changes +++ b/drbd-utils.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Aug 19 09:00:49 UTC 2015 - nwang@suse.com + +- Fate#317940. Support zeroout/discard instead of zap-devices +- Add patch zeroout-discard-devices.patch +- Remove zap-devices-xml.patch and zap-devices.patch + ------------------------------------------------------------------- Thu Jul 23 02:28:37 UTC 2015 - nwang@suse.com diff --git a/drbd-utils.spec b/drbd-utils.spec index d6f5400..530ea6d 100644 --- a/drbd-utils.spec +++ b/drbd-utils.spec @@ -1,7 +1,7 @@ # # spec file for package drbd-utils # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,8 +28,7 @@ Source: http://oss.linbit.com/drbd/%{name}-%{version}.tar.gz # PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch1: init-script-fixes.diff Patch2: fix-libdir-in-Makefile.patch -Patch3: zap-devices.patch -Patch4: zap-devices-xml.patch +Patch3: zeroout-discard-devices.patch Provides: drbd-bash-completion = %{version} Provides: drbd-pacemaker = %{version} @@ -74,7 +73,6 @@ raid 1. It is a building block for setting up clusters. %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch4 -p1 %build ./autogen.sh diff --git a/zap-devices-xml.patch b/zap-devices-xml.patch deleted file mode 100644 index b8c89bc..0000000 --- a/zap-devices-xml.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -Naur drbd-utils-8.9.2.orig/documentation/v84/drbdsetup.xml drbd-utils-8.9.2/documentation/v84/drbdsetup.xml ---- drbd-utils-8.9.2.orig/documentation/v84/drbdsetup.xml 2015-07-20 16:06:52.950294231 +0800 -+++ drbd-utils-8.9.2/documentation/v84/drbdsetup.xml 2015-07-20 17:56:21.106826315 +0800 -@@ -1694,6 +1694,15 @@ - Clears the sync bitmap in addition to generating a new current UUID. - - -+ -+ -+ -+ -+ -+ Start to zeroing out the device on both side in addition to generating -+ a new current UUID . -+ -+ - - - This can be used to skip the initial sync, if you want to start from scratch. This diff --git a/zap-devices.patch b/zap-devices.patch deleted file mode 100644 index 145d105..0000000 --- a/zap-devices.patch +++ /dev/null @@ -1,24 +0,0 @@ -Index: drbd-utils-8.9.2/user/v84/config_flags.c -=================================================================== ---- drbd-utils-8.9.2.orig/user/v84/config_flags.c -+++ drbd-utils-8.9.2/user/v84/config_flags.c -@@ -1019,6 +1019,7 @@ struct context_def new_current_uuid_cmd_ - NLA_POLICY(new_c_uuid_parms), - .fields = { - { "clear-bitmap", FLAG(clear_bm) }, -+ { "zap-devices", FLAG(zap_devices) }, - { } }, - }; - -Index: drbd-utils-8.9.2/user/v84/linux/drbd_genl.h -=================================================================== ---- drbd-utils-8.9.2.orig/user/v84/linux/drbd_genl.h -+++ drbd-utils-8.9.2/user/v84/linux/drbd_genl.h -@@ -238,6 +238,7 @@ GENL_struct(DRBD_NLA_START_OV_PARMS, 9, - - GENL_struct(DRBD_NLA_NEW_C_UUID_PARMS, 10, new_c_uuid_parms, - __flg_field(1, DRBD_GENLA_F_MANDATORY, clear_bm) -+ __flg_field(2, DRBD_GENLA_F_MANDATORY, zap_devices) - ) - - GENL_struct(DRBD_NLA_TIMEOUT_PARMS, 11, timeout_parms, diff --git a/zeroout-discard-devices.patch b/zeroout-discard-devices.patch new file mode 100644 index 0000000..93f1fba --- /dev/null +++ b/zeroout-discard-devices.patch @@ -0,0 +1,70 @@ +From c80e2258d59d264d56bbea212ec98a114a1de32a Mon Sep 17 00:00:00 2001 +From: Nick Wang +Date: Tue, 21 Jul 2015 10:32:41 +0800 +Subject: [PATCH 1/1] drbdsetup: Support zeroout/discard devices instead of + initial full sync. + +--- + documentation/v84/drbdsetup.xml | 18 ++++++++++++++++++ + user/v84/config_flags.c | 2 ++ + user/v84/linux/drbd_genl.h | 2 ++ + 3 files changed, 22 insertions(+) + +diff --git a/documentation/v84/drbdsetup.xml b/documentation/v84/drbdsetup.xml +index d4c4e87..039c6d8 100644 +--- a/documentation/v84/drbdsetup.xml ++++ b/documentation/v84/drbdsetup.xml +@@ -1705,6 +1705,24 @@ + Clears the sync bitmap in addition to generating a new current UUID. + + ++ ++ ++ ++ ++ ++ Start to zeroing out the device on both side in addition to generating ++ a new current UUID . ++ ++ ++ ++ ++ ++ ++ ++ Start to allocate a thinly provided backing device on both side in ++ addition to generating a new current UUID . ++ ++ + + + This can be used to skip the initial sync, if you want to start from scratch. This +diff --git a/user/v84/config_flags.c b/user/v84/config_flags.c +index 3b0303f..b9870fa 100644 +--- a/user/v84/config_flags.c ++++ b/user/v84/config_flags.c +@@ -1019,6 +1019,8 @@ struct context_def new_current_uuid_cmd_ctx = { + NLA_POLICY(new_c_uuid_parms), + .fields = { + { "clear-bitmap", FLAG(clear_bm) }, ++ { "zeroout-devices", FLAG(zeroout_devices) }, ++ { "discard-devices", FLAG(discard_devices) }, + { } }, + }; + +diff --git a/user/v84/linux/drbd_genl.h b/user/v84/linux/drbd_genl.h +index 8ddedd1..2aabe4c 100644 +--- a/user/v84/linux/drbd_genl.h ++++ b/user/v84/linux/drbd_genl.h +@@ -238,6 +238,8 @@ GENL_struct(DRBD_NLA_START_OV_PARMS, 9, start_ov_parms, + + GENL_struct(DRBD_NLA_NEW_C_UUID_PARMS, 10, new_c_uuid_parms, + __flg_field(1, DRBD_GENLA_F_MANDATORY, clear_bm) ++ __flg_field(2, 0, zeroout_devices) ++ __flg_field(3, 0, discard_devices) + ) + + GENL_struct(DRBD_NLA_TIMEOUT_PARMS, 11, timeout_parms, +-- +2.1.4 +