From: Philipp Reisner <philipp.reisner@linbit.com>
To: drbd-dev@lists.linbit.com
Subject: Re: [Drbd-dev] DRBD8: Stuck in WFBitMapS state even across reboot.
Date: Fri, 1 Dec 2006 10:43:36 +0100 [thread overview]
Message-ID: <200612011043.36208.philipp.reisner@linbit.com> (raw)
In-Reply-To: <20061130195953.GC7746@soda.linbit>
[-- Attachment #1: Type: text/plain, Size: 517 bytes --]
[...]
Lars, that's right, this is the reason for the race condition.
I think this patch fixes this. With this patch it should no longer
be possible to get both nodes into the WFBitMaps state.
It is in SVN with revision 2607.
Ernest, could you repeat your tests with this revision? Thanks!
-Phil
--
: Dipl-Ing Philipp Reisner Tel +43-1-8178292-50 :
: LINBIT Information Technologies GmbH Fax +43-1-8178292-82 :
: Vivenotgasse 48, 1120 Vienna, Austria http://www.linbit.com :
[-- Attachment #2: both_in_WFBitMaps_fix.diff --]
[-- Type: text/x-diff, Size: 1264 bytes --]
Index: drbd_receiver.c
===================================================================
--- drbd_receiver.c (revision 2603)
+++ drbd_receiver.c (working copy)
@@ -1668,7 +1668,7 @@
peer = mdev->p_uuid[Bitmap] & 1;
ch_peer = mdev->p_uuid[UUID_SIZE];
- ch_self = drbd_bm_total_weight(mdev);
+ ch_self = mdev->comm_bm_set;
switch ( mdev->net_conf->after_sb_0p ) {
case Consensus:
Index: drbd_main.c
===================================================================
--- drbd_main.c (revision 2603)
+++ drbd_main.c (working copy)
@@ -1288,7 +1288,8 @@
: 0;
}
- p.uuid[UUID_SIZE] = cpu_to_be64(drbd_bm_total_weight(mdev));
+ mdev->comm_bm_set = drbd_bm_total_weight(mdev);
+ p.uuid[UUID_SIZE] = cpu_to_be64(mdev->comm_bm_set);
uuid_flags |= mdev->net_conf->want_lose ? 1 : 0;
uuid_flags |= test_bit(CRASHED_PRIMARY, &mdev->flags) ? 2 : 0;
p.uuid[UUID_FLAGS] = cpu_to_be64(uuid_flags);
Index: drbd_int.h
===================================================================
--- drbd_int.h (revision 2603)
+++ drbd_int.h (working copy)
@@ -853,6 +853,7 @@
unsigned int peer_seq;
spinlock_t peer_seq_lock;
int minor;
+ unsigned long comm_bm_set; // communicated number of set bits.
};
static inline drbd_dev *minor_to_mdev(int minor)
next prev parent reply other threads:[~2006-12-01 9:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-30 15:38 [Drbd-dev] DRBD8: Stuck in WFBitMapS state even across reboot Montrose, Ernest
2006-11-30 19:59 ` Lars Ellenberg
2006-12-01 9:43 ` Philipp Reisner [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-12-01 12:06 Montrose, Ernest
2006-11-30 20:12 Montrose, Ernest
2006-11-27 22:28 Montrose, Ernest
2006-11-30 15:11 ` Philipp Reisner
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=200612011043.36208.philipp.reisner@linbit.com \
--to=philipp.reisner@linbit.com \
--cc=drbd-dev@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.