summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-11-26 11:46:51 +0300
committerJens Axboe <jens.axboe@oracle.com>2009-11-26 11:46:51 +0300
commit75e7b634309ef4eabf8a93d36e58863f727fa209 (patch)
tree6ad097218bd4510fb5b59fa29b654bd7c596bfbb
parentd9449ce35a1e8fb58dd2d419f9215562a14ecca0 (diff)
parent35a8a3fdcd4f973a5430e868f2f2a5c363803a5b (diff)
downloadlinux-75e7b634309ef4eabf8a93d36e58863f727fa209.tar.xz
Merge branch 'for-jens' of git://git.drbd.org/linux-2.6-drbd into for-2.6.33
-rw-r--r--drivers/block/drbd/drbd_nl.c2
-rw-r--r--drivers/block/drbd/drbd_receiver.c5
-rw-r--r--include/linux/connector.h2
-rw-r--r--include/linux/drbd.h9
4 files changed, 8 insertions, 10 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index e2a5875a07b1..436a090b532b 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -733,7 +733,7 @@ void drbd_setup_queue_param(struct drbd_conf *mdev, unsigned int max_seg_s) __mu
*/
static void drbd_reconfig_start(struct drbd_conf *mdev)
{
- wait_event(mdev->state_wait, test_and_set_bit(CONFIG_PENDING, &mdev->flags));
+ wait_event(mdev->state_wait, !test_and_set_bit(CONFIG_PENDING, &mdev->flags));
wait_event(mdev->state_wait, !test_bit(DEVICE_DYING, &mdev->flags));
drbd_thread_start(&mdev->worker);
}
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 9bbc509443e5..c548f24f54a1 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -2400,6 +2400,7 @@ static int drbd_uuid_compare(struct drbd_conf *mdev, int *rule_nr) __must_hold(l
*rule_nr = 80;
+ peer = mdev->p_uuid[UI_CURRENT] & ~((u64)1);
for (i = UI_HISTORY_START; i <= UI_HISTORY_END; i++) {
self = mdev->ldev->md.uuid[i] & ~((u64)1);
if (self == peer)
@@ -3499,8 +3500,10 @@ static void drbdd(struct drbd_conf *mdev)
while (get_t_state(&mdev->receiver) == Running) {
drbd_thread_current_set_cpu(mdev);
- if (!drbd_recv_header(mdev, header))
+ if (!drbd_recv_header(mdev, header)) {
+ drbd_force_state(mdev, NS(conn, C_PROTOCOL_ERROR));
break;
+ }
if (header->command < P_MAX_CMD)
handler = drbd_cmd_handler[header->command];
diff --git a/include/linux/connector.h b/include/linux/connector.h
index 3a14615fd35c..72ba63eb83c5 100644
--- a/include/linux/connector.h
+++ b/include/linux/connector.h
@@ -43,6 +43,8 @@
#define CN_DST_VAL 0x1
#define CN_IDX_DM 0x7 /* Device Mapper */
#define CN_VAL_DM_USERSPACE_LOG 0x1
+#define CN_IDX_DRBD 0x8
+#define CN_VAL_DRBD 0x1
#define CN_NETLINK_USERS 8
diff --git a/include/linux/drbd.h b/include/linux/drbd.h
index 18942ad115d9..e84f4733cb55 100644
--- a/include/linux/drbd.h
+++ b/include/linux/drbd.h
@@ -53,7 +53,7 @@
extern const char *drbd_buildtag(void);
-#define REL_VERSION "8.3.5"
+#define REL_VERSION "8.3.6"
#define API_VERSION 88
#define PRO_VERSION_MIN 86
#define PRO_VERSION_MAX 91
@@ -322,13 +322,6 @@ enum drbd_timeout_flag {
#define DRBD_NL_CREATE_DEVICE 0x01
#define DRBD_NL_SET_DEFAULTS 0x02
-/* The following line should be moved over to linux/connector.h
- * when the time comes */
-#ifndef CN_IDX_DRBD
-# define CN_IDX_DRBD 0x4
-/* Ubuntu "intrepid ibex" release defined CN_IDX_DRBD as 0x6 */
-#endif
-#define CN_VAL_DRBD 0x1
/* For searching a vacant cn_idx value */
#define CN_IDX_STEP 6977