[DRBD-cvs] r1460 - in trunk: documentation drbd
drbd-user@lists.linbit.com
drbd-user@lists.linbit.com
Wed, 28 Jul 2004 10:13:18 +0200 (CEST)
Author: phil
Date: 2004-07-28 10:13:16 +0200 (Wed, 28 Jul 2004)
New Revision: 1460
Modified:
trunk/documentation/drbdsetup.sgml
trunk/drbd/drbd_receiver.c
Log:
* Clear ON_PRI... flags in case we can connect
* Documentation of on_primary on the manpage
Modified: trunk/documentation/drbdsetup.sgml
===================================================================
--- trunk/documentation/drbdsetup.sgml 2004-07-27 16:58:09 UTC (rev 1459)
+++ trunk/documentation/drbdsetup.sgml 2004-07-28 08:13:16 UTC (rev 1460)
@@ -79,6 +79,13 @@
<cmdsynopsis>
<command>drbdsetup</command>
<arg choice="req"><replaceable>device</replaceable></arg>
+ <arg choice="req">on_primary</arg>
+ <arg>-h</arg>
+ <arg>-t</arg>
+ </cmdsynopsis>
+ <cmdsynopsis>
+ <command>drbdsetup</command>
+ <arg choice="req"><replaceable>device</replaceable></arg>
<arg choice="req">invalidate</arg>
</cmdsynopsis>
<cmdsynopsis>
@@ -437,6 +444,22 @@
</para>
</refsect2>
<refsect2>
+ <title>on_primary</title>
+ <para>
+ This sets additional flags for the next
+ transition into primary state. The flags are only preserved as long
+ as the <replaceable>device</replaceable> can not connect to its peer.
+ The possible flags are <option>--inc-human</option> and
+ <option>--inc-timeout-expired</option>.
+ </para>
+ <para>
+ This is a conevenience command. It has the same effect as passing
+ this options to the following <option>primary</option> command
+ directly. See the <option>primary</option> command for a detailed
+ description of the two flags.
+ </para>
+ </refsect2>
+ <refsect2>
<title>invalidate</title>
<para>
This forces the local device of a pair of connected DRBD devices
Modified: trunk/drbd/drbd_receiver.c
===================================================================
--- trunk/drbd/drbd_receiver.c 2004-07-27 16:58:09 UTC (rev 1459)
+++ trunk/drbd/drbd_receiver.c 2004-07-28 08:13:16 UTC (rev 1460)
@@ -740,6 +740,9 @@
return 0;
}
+ clear_bit(ON_PRI_INC_HUMAN,&mdev->flags);
+ clear_bit(ON_PRI_INC_TIMEOUTEX,&mdev->flags);
+
sock->sk->SK_(sndtimeo) = mdev->conf.timeout*HZ/20;
sock->sk->SK_(rcvtimeo) = MAX_SCHEDULE_TIMEOUT;