mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nick Wang <nwang@suse.com>
To: nwang@suse.com
Cc: Philipp Reisner <philipp.reisner@linbit.com>,
	Lars Ellenberg <lars.ellenberg@linbit.com>,
	drbd-dev@lists.linbit.com, linux-kernel@vger.kernel.org
Subject: [PATCH] drbdsetup: Allow zeroing out devices locally to instead of initial full sync.
Date: Tue, 21 Jul 2015 10:43:16 +0800	[thread overview]
Message-ID: <1437446596-19004-1-git-send-email-nwang@suse.com> (raw)

Full sync for drbd initial usually take a long time,
allow "--zap-devices" on "new-current-uuid" to zero
out device on both side.

Signed-off-by: Nick Wang <nwang@suse.com>
CC: Philipp Reisner <philipp.reisner@linbit.com>
CC: Lars Ellenberg <lars.ellenberg@linbit.com>
CC: drbd-dev@lists.linbit.com
CC: linux-kernel@vger.kernel.org
---
 documentation/v84/drbdsetup.xml | 9 +++++++++
 user/v84/config_flags.c         | 1 +
 user/v84/linux/drbd_genl.h      | 1 +
 3 files changed, 11 insertions(+)

diff --git a/documentation/v84/drbdsetup.xml b/documentation/v84/drbdsetup.xml
index d4c4e87..a44b733 100644
--- a/documentation/v84/drbdsetup.xml
+++ b/documentation/v84/drbdsetup.xml
@@ -1705,6 +1705,15 @@
               <para>Clears the sync bitmap in addition to generating a new current UUID.</para>
             </listitem>
           </varlistentry>
+
+          <varlistentry>
+            <term><option>--zap-devices</option></term>
+
+            <listitem>
+              <para>Start to zeroing out the device on both side in addition to generating
+              a new current UUID .</para>
+            </listitem>
+          </varlistentry>
         </variablelist></para>
 
       <para>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..8712a11 100644
--- a/user/v84/config_flags.c
+++ b/user/v84/config_flags.c
@@ -1019,6 +1019,7 @@ struct context_def new_current_uuid_cmd_ctx = {
 	NLA_POLICY(new_c_uuid_parms),
 	.fields = {
 		{ "clear-bitmap", FLAG(clear_bm) },
+		{ "zap-devices", FLAG(zap_devices) },
 		{ } },
 };
 
diff --git a/user/v84/linux/drbd_genl.h b/user/v84/linux/drbd_genl.h
index 8ddedd1..0b850d3 100644
--- a/user/v84/linux/drbd_genl.h
+++ b/user/v84/linux/drbd_genl.h
@@ -238,6 +238,7 @@ 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, DRBD_GENLA_F_MANDATORY, zap_devices)
 )
 
 GENL_struct(DRBD_NLA_TIMEOUT_PARMS, 11, timeout_parms,
-- 
1.8.4.5


                 reply	other threads:[~2015-07-21  2:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1437446596-19004-1-git-send-email-nwang@suse.com \
    --to=nwang@suse.com \
    --cc=drbd-dev@lists.linbit.com \
    --cc=lars.ellenberg@linbit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=philipp.reisner@linbit.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®