aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2011-03-15 13:40:27 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-03 19:16:27 -0400
commit8169e41b3e59ee74a31270804a1b5ccef9ae9fce (patch)
tree3a4d9065937bb7645bf7737660c07a58aa6f1a2e /drivers/block/drbd
parent38fa9988fa838324a0cce6e2f9d3c674230659d5 (diff)
drbd: Moved CONN_DRY_RUN to the per connection (tconn) flags
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r--drivers/block/drbd/drbd_int.h2
-rw-r--r--drivers/block/drbd/drbd_receiver.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index 278e7acc7f32..d6e7e657e7a4 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -791,7 +791,6 @@ enum {
791 RESYNC_AFTER_NEG, /* Resync after online grow after the attach&negotiate finished. */ 791 RESYNC_AFTER_NEG, /* Resync after online grow after the attach&negotiate finished. */
792 RESIZE_PENDING, /* Size change detected locally, waiting for the response from 792 RESIZE_PENDING, /* Size change detected locally, waiting for the response from
793 * the peer, if it changed there as well. */ 793 * the peer, if it changed there as well. */
794 CONN_DRY_RUN, /* Expect disconnect after resync handshake. */
795 NEW_CUR_UUID, /* Create new current UUID when thawing IO */ 794 NEW_CUR_UUID, /* Create new current UUID when thawing IO */
796 AL_SUSPENDED, /* Activity logging is currently suspended. */ 795 AL_SUSPENDED, /* Activity logging is currently suspended. */
797 AHEAD_TO_SYNC_SOURCE, /* Ahead -> SyncSource queued */ 796 AHEAD_TO_SYNC_SOURCE, /* Ahead -> SyncSource queued */
@@ -915,6 +914,7 @@ enum {
915 * but worker thread is still handling the cleanup. 914 * but worker thread is still handling the cleanup.
916 * reconfiguring (nl_disk_conf, nl_net_conf) is dissalowed, 915 * reconfiguring (nl_disk_conf, nl_net_conf) is dissalowed,
917 * while this is set. */ 916 * while this is set. */
917 CONN_DRY_RUN, /* Expect disconnect after resync handshake. */
918}; 918};
919 919
920struct drbd_tconn { /* is a resource from the config file */ 920struct drbd_tconn { /* is a resource from the config file */
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index ac2a25f6b256..4bac2f56ca2c 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -2800,7 +2800,7 @@ static enum drbd_conns drbd_sync_handshake(struct drbd_conf *mdev, enum drbd_rol
2800 } 2800 }
2801 } 2801 }
2802 2802
2803 if (mdev->tconn->net_conf->dry_run || test_bit(CONN_DRY_RUN, &mdev->flags)) { 2803 if (mdev->tconn->net_conf->dry_run || test_bit(CONN_DRY_RUN, &mdev->tconn->flags)) {
2804 if (hg == 0) 2804 if (hg == 0)
2805 dev_info(DEV, "dry-run connect: No resync, would become Connected immediately.\n"); 2805 dev_info(DEV, "dry-run connect: No resync, would become Connected immediately.\n");
2806 else 2806 else
@@ -2869,10 +2869,10 @@ static int receive_protocol(struct drbd_conf *mdev, enum drbd_packet cmd,
2869 cf = be32_to_cpu(p->conn_flags); 2869 cf = be32_to_cpu(p->conn_flags);
2870 p_want_lose = cf & CF_WANT_LOSE; 2870 p_want_lose = cf & CF_WANT_LOSE;
2871 2871
2872 clear_bit(CONN_DRY_RUN, &mdev->flags); 2872 clear_bit(CONN_DRY_RUN, &mdev->tconn->flags);
2873 2873
2874 if (cf & CF_DRY_RUN) 2874 if (cf & CF_DRY_RUN)
2875 set_bit(CONN_DRY_RUN, &mdev->flags); 2875 set_bit(CONN_DRY_RUN, &mdev->tconn->flags);
2876 2876
2877 if (p_proto != mdev->tconn->net_conf->wire_protocol) { 2877 if (p_proto != mdev->tconn->net_conf->wire_protocol) {
2878 dev_err(DEV, "incompatible communication protocols\n"); 2878 dev_err(DEV, "incompatible communication protocols\n");
@@ -3439,7 +3439,7 @@ static int receive_state(struct drbd_conf *mdev, enum drbd_packet cmd,
3439 peer_state.disk = D_DISKLESS; 3439 peer_state.disk = D_DISKLESS;
3440 real_peer_disk = D_DISKLESS; 3440 real_peer_disk = D_DISKLESS;
3441 } else { 3441 } else {
3442 if (test_and_clear_bit(CONN_DRY_RUN, &mdev->flags)) 3442 if (test_and_clear_bit(CONN_DRY_RUN, &mdev->tconn->flags))
3443 return false; 3443 return false;
3444 D_ASSERT(os.conn == C_WF_REPORT_PARAMS); 3444 D_ASSERT(os.conn == C_WF_REPORT_PARAMS);
3445 conn_request_state(mdev->tconn, NS(conn, C_DISCONNECTING), CS_HARD); 3445 conn_request_state(mdev->tconn, NS(conn, C_DISCONNECTING), CS_HARD);