aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-rw-r--r--drivers/block/drbd/drbd_main.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index a6ac0c81406b..7e88a49d3448 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -693,7 +693,7 @@ is_valid_state(struct drbd_conf *mdev, union drbd_state ns)
693 } 693 }
694 694
695 if (get_net_conf(mdev)) { 695 if (get_net_conf(mdev)) {
696 if (!mdev->net_conf->two_primaries && 696 if (!mdev->tconn->net_conf->two_primaries &&
697 ns.role == R_PRIMARY && ns.peer == R_PRIMARY) 697 ns.role == R_PRIMARY && ns.peer == R_PRIMARY)
698 rv = SS_TWO_PRIMARIES; 698 rv = SS_TWO_PRIMARIES;
699 put_net_conf(mdev); 699 put_net_conf(mdev);
@@ -1952,7 +1952,7 @@ int drbd_send_protocol(struct drbd_conf *mdev)
1952 size = sizeof(struct p_protocol); 1952 size = sizeof(struct p_protocol);
1953 1953
1954 if (mdev->agreed_pro_version >= 87) 1954 if (mdev->agreed_pro_version >= 87)
1955 size += strlen(mdev->net_conf->integrity_alg) + 1; 1955 size += strlen(mdev->tconn->net_conf->integrity_alg) + 1;
1956 1956
1957 /* we must not recurse into our own queue, 1957 /* we must not recurse into our own queue,
1958 * as that is blocked during handshake */ 1958 * as that is blocked during handshake */
@@ -1960,16 +1960,16 @@ int drbd_send_protocol(struct drbd_conf *mdev)
1960 if (p == NULL) 1960 if (p == NULL)
1961 return 0; 1961 return 0;
1962 1962
1963 p->protocol = cpu_to_be32(mdev->net_conf->wire_protocol); 1963 p->protocol = cpu_to_be32(mdev->tconn->net_conf->wire_protocol);
1964 p->after_sb_0p = cpu_to_be32(mdev->net_conf->after_sb_0p); 1964 p->after_sb_0p = cpu_to_be32(mdev->tconn->net_conf->after_sb_0p);
1965 p->after_sb_1p = cpu_to_be32(mdev->net_conf->after_sb_1p); 1965 p->after_sb_1p = cpu_to_be32(mdev->tconn->net_conf->after_sb_1p);
1966 p->after_sb_2p = cpu_to_be32(mdev->net_conf->after_sb_2p); 1966 p->after_sb_2p = cpu_to_be32(mdev->tconn->net_conf->after_sb_2p);
1967 p->two_primaries = cpu_to_be32(mdev->net_conf->two_primaries); 1967 p->two_primaries = cpu_to_be32(mdev->tconn->net_conf->two_primaries);
1968 1968
1969 cf = 0; 1969 cf = 0;
1970 if (mdev->net_conf->want_lose) 1970 if (mdev->tconn->net_conf->want_lose)
1971 cf |= CF_WANT_LOSE; 1971 cf |= CF_WANT_LOSE;
1972 if (mdev->net_conf->dry_run) { 1972 if (mdev->tconn->net_conf->dry_run) {
1973 if (mdev->agreed_pro_version >= 92) 1973 if (mdev->agreed_pro_version >= 92)
1974 cf |= CF_DRY_RUN; 1974 cf |= CF_DRY_RUN;
1975 else { 1975 else {
@@ -1981,7 +1981,7 @@ int drbd_send_protocol(struct drbd_conf *mdev)
1981 p->conn_flags = cpu_to_be32(cf); 1981 p->conn_flags = cpu_to_be32(cf);
1982 1982
1983 if (mdev->agreed_pro_version >= 87) 1983 if (mdev->agreed_pro_version >= 87)
1984 strcpy(p->integrity_alg, mdev->net_conf->integrity_alg); 1984 strcpy(p->integrity_alg, mdev->tconn->net_conf->integrity_alg);
1985 1985
1986 rv = drbd_send_cmd(mdev, USE_DATA_SOCKET, P_PROTOCOL, 1986 rv = drbd_send_cmd(mdev, USE_DATA_SOCKET, P_PROTOCOL,
1987 (struct p_header80 *)p, size); 1987 (struct p_header80 *)p, size);
@@ -2002,7 +2002,7 @@ int _drbd_send_uuids(struct drbd_conf *mdev, u64 uuid_flags)
2002 2002
2003 mdev->comm_bm_set = drbd_bm_total_weight(mdev); 2003 mdev->comm_bm_set = drbd_bm_total_weight(mdev);
2004 p.uuid[UI_SIZE] = cpu_to_be64(mdev->comm_bm_set); 2004 p.uuid[UI_SIZE] = cpu_to_be64(mdev->comm_bm_set);
2005 uuid_flags |= mdev->net_conf->want_lose ? 1 : 0; 2005 uuid_flags |= mdev->tconn->net_conf->want_lose ? 1 : 0;
2006 uuid_flags |= test_bit(CRASHED_PRIMARY, &mdev->flags) ? 2 : 0; 2006 uuid_flags |= test_bit(CRASHED_PRIMARY, &mdev->flags) ? 2 : 0;
2007 uuid_flags |= mdev->new_state_tmp.disk == D_INCONSISTENT ? 4 : 0; 2007 uuid_flags |= mdev->new_state_tmp.disk == D_INCONSISTENT ? 4 : 0;
2008 p.uuid[UI_FLAGS] = cpu_to_be64(uuid_flags); 2008 p.uuid[UI_FLAGS] = cpu_to_be64(uuid_flags);
@@ -2717,7 +2717,7 @@ int drbd_send_dblock(struct drbd_conf *mdev, struct drbd_request *req)
2717 * out ok after sending on this side, but does not fit on the 2717 * out ok after sending on this side, but does not fit on the
2718 * receiving side, we sure have detected corruption elsewhere. 2718 * receiving side, we sure have detected corruption elsewhere.
2719 */ 2719 */
2720 if (mdev->net_conf->wire_protocol == DRBD_PROT_A || dgs) 2720 if (mdev->tconn->net_conf->wire_protocol == DRBD_PROT_A || dgs)
2721 ok = _drbd_send_bio(mdev, req->master_bio); 2721 ok = _drbd_send_bio(mdev, req->master_bio);
2722 else 2722 else
2723 ok = _drbd_send_zc_bio(mdev, req->master_bio); 2723 ok = _drbd_send_zc_bio(mdev, req->master_bio);
@@ -2843,7 +2843,7 @@ int drbd_send(struct drbd_conf *mdev, struct socket *sock,
2843 msg.msg_flags = msg_flags | MSG_NOSIGNAL; 2843 msg.msg_flags = msg_flags | MSG_NOSIGNAL;
2844 2844
2845 if (sock == mdev->data.socket) { 2845 if (sock == mdev->data.socket) {
2846 mdev->ko_count = mdev->net_conf->ko_count; 2846 mdev->ko_count = mdev->tconn->net_conf->ko_count;
2847 drbd_update_congested(mdev); 2847 drbd_update_congested(mdev);
2848 } 2848 }
2849 do { 2849 do {
@@ -3073,7 +3073,7 @@ void drbd_mdev_cleanup(struct drbd_conf *mdev)
3073 mdev->rs_mark_left[i] = 0; 3073 mdev->rs_mark_left[i] = 0;
3074 mdev->rs_mark_time[i] = 0; 3074 mdev->rs_mark_time[i] = 0;
3075 } 3075 }
3076 D_ASSERT(mdev->net_conf == NULL); 3076 D_ASSERT(mdev->tconn->net_conf == NULL);
3077 3077
3078 drbd_set_my_capacity(mdev, 0); 3078 drbd_set_my_capacity(mdev, 0);
3079 if (mdev->bitmap) { 3079 if (mdev->bitmap) {