aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_receiver.c
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/drbd_receiver.c
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/drbd_receiver.c')
-rw-r--r--drivers/block/drbd/drbd_receiver.c8
1 files changed, 4 insertions, 4 deletions
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);