Lines Matching full:connection
57 static int drbd_do_features(struct drbd_connection *connection);
58 static int drbd_do_auth(struct drbd_connection *connection);
60 static void conn_wait_active_ee_empty(struct drbd_connection *connection);
223 static void conn_reclaim_net_peer_reqs(struct drbd_connection *connection) in conn_reclaim_net_peer_reqs() argument
229 idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { in conn_reclaim_net_peer_reqs()
273 nc = rcu_dereference(peer_device->connection->net_conf); in drbd_alloc_pages()
514 static int drbd_recv(struct drbd_connection *connection, void *buf, size_t size) in drbd_recv() argument
518 rv = drbd_recv_short(connection->data.socket, buf, size, 0); in drbd_recv()
522 drbd_info(connection, "sock was reset by peer\n"); in drbd_recv()
524 drbd_err(connection, "sock_recvmsg returned %d\n", rv); in drbd_recv()
526 if (test_bit(DISCONNECT_SENT, &connection->flags)) { in drbd_recv()
529 t = rcu_dereference(connection->net_conf)->ping_timeo * HZ/10; in drbd_recv()
532 t = wait_event_timeout(connection->ping_wait, connection->cstate < C_WF_REPORT_PARAMS, t); in drbd_recv()
537 drbd_info(connection, "sock was shut down by peer\n"); in drbd_recv()
541 conn_request_state(connection, NS(conn, C_BROKEN_PIPE), CS_HARD); in drbd_recv()
547 static int drbd_recv_all(struct drbd_connection *connection, void *buf, size_t size) in drbd_recv_all() argument
551 err = drbd_recv(connection, buf, size); in drbd_recv_all()
560 static int drbd_recv_all_warn(struct drbd_connection *connection, void *buf, size_t size) in drbd_recv_all_warn() argument
564 err = drbd_recv_all(connection, buf, size); in drbd_recv_all_warn()
566 drbd_warn(connection, "short read (expected size %d)\n", (int)size); in drbd_recv_all_warn()
589 static struct socket *drbd_try_connect(struct drbd_connection *connection) in drbd_try_connect() argument
601 nc = rcu_dereference(connection->net_conf); in drbd_try_connect()
611 my_addr_len = min_t(int, connection->my_addr_len, sizeof(src_in6)); in drbd_try_connect()
612 memcpy(&src_in6, &connection->my_addr, my_addr_len); in drbd_try_connect()
614 if (((struct sockaddr *)&connection->my_addr)->sa_family == AF_INET6) in drbd_try_connect()
619 peer_addr_len = min_t(int, connection->peer_addr_len, sizeof(src_in6)); in drbd_try_connect()
620 memcpy(&peer_in6, &connection->peer_addr, peer_addr_len); in drbd_try_connect()
668 drbd_err(connection, "%s failed, err = %d\n", what, err); in drbd_try_connect()
671 conn_request_state(connection, NS(conn, C_DISCONNECTING), CS_HARD); in drbd_try_connect()
678 struct drbd_connection *connection; member
696 static int prepare_listen_socket(struct drbd_connection *connection, struct accept_wait_data *ad) in prepare_listen_socket() argument
705 nc = rcu_dereference(connection->net_conf); in prepare_listen_socket()
714 my_addr_len = min_t(int, connection->my_addr_len, sizeof(struct sockaddr_in6)); in prepare_listen_socket()
715 memcpy(&my_addr, &connection->my_addr, my_addr_len); in prepare_listen_socket()
751 drbd_err(connection, "%s failed, err = %d\n", what, err); in prepare_listen_socket()
752 conn_request_state(connection, NS(conn, C_DISCONNECTING), CS_HARD); in prepare_listen_socket()
767 static struct socket *drbd_wait_for_connect(struct drbd_connection *connection, struct accept_wait_… in drbd_wait_for_connect() argument
774 nc = rcu_dereference(connection->net_conf); in drbd_wait_for_connect()
793 drbd_err(connection, "accept failed, err = %d\n", err); in drbd_wait_for_connect()
794 conn_request_state(connection, NS(conn, C_DISCONNECTING), CS_HARD); in drbd_wait_for_connect()
806 static int send_first_packet(struct drbd_connection *connection, struct drbd_socket *sock, in send_first_packet() argument
809 if (!conn_prepare_command(connection, sock)) in send_first_packet()
811 return conn_send_command(connection, sock, cmd, 0, NULL, 0); in send_first_packet()
814 static int receive_first_packet(struct drbd_connection *connection, struct socket *sock) in receive_first_packet() argument
816 unsigned int header_size = drbd_header_size(connection); in receive_first_packet()
822 nc = rcu_dereference(connection->net_conf); in receive_first_packet()
830 err = drbd_recv_short(sock, connection->data.rbuf, header_size, 0); in receive_first_packet()
836 err = decode_header(connection, connection->data.rbuf, &pi); in receive_first_packet()
843 * drbd_socket_okay() - Free the socket if its connection is not okay
865 static bool connection_established(struct drbd_connection *connection, in connection_established() argument
877 nc = rcu_dereference(connection->net_conf); in connection_established()
888 /* Gets called if a connection is established, or if a new minor gets created
889 in a connection */
898 device->state_mutex = peer_device->connection->agreed_pro_version < 100 ? in drbd_connected()
899 &peer_device->connection->cstate_mutex : in drbd_connected()
918 * 1 yes, we have a valid connection
924 static int conn_connect(struct drbd_connection *connection) in conn_connect() argument
933 .connection = connection, in conn_connect()
937 clear_bit(DISCONNECT_SENT, &connection->flags); in conn_connect()
938 if (conn_request_state(connection, NS(conn, C_WF_CONNECTION), CS_VERBOSE) < SS_SUCCESS) in conn_connect()
942 sock.sbuf = connection->data.sbuf; in conn_connect()
943 sock.rbuf = connection->data.rbuf; in conn_connect()
946 msock.sbuf = connection->meta.sbuf; in conn_connect()
947 msock.rbuf = connection->meta.rbuf; in conn_connect()
951 connection->agreed_pro_version = 80; in conn_connect()
953 if (prepare_listen_socket(connection, &ad)) in conn_connect()
959 s = drbd_try_connect(connection); in conn_connect()
963 send_first_packet(connection, &sock, P_INITIAL_DATA); in conn_connect()
965 clear_bit(RESOLVE_CONFLICTS, &connection->flags); in conn_connect()
967 send_first_packet(connection, &msock, P_INITIAL_META); in conn_connect()
969 drbd_err(connection, "Logic error in conn_connect()\n"); in conn_connect()
974 if (connection_established(connection, &sock.socket, &msock.socket)) in conn_connect()
978 s = drbd_wait_for_connect(connection, &ad); in conn_connect()
980 int fp = receive_first_packet(connection, s); in conn_connect()
986 drbd_warn(connection, "initial packet S crossed\n"); in conn_connect()
994 set_bit(RESOLVE_CONFLICTS, &connection->flags); in conn_connect()
996 drbd_warn(connection, "initial packet M crossed\n"); in conn_connect()
1004 drbd_warn(connection, "Error receiving initial packet\n"); in conn_connect()
1012 if (connection->cstate <= C_DISCONNECTING) in conn_connect()
1017 if (get_t_state(&connection->receiver) == EXITING) in conn_connect()
1021 ok = connection_established(connection, &sock.socket, &msock.socket); in conn_connect()
1037 * sock.socket->sk->sk_sndtimeo = connection->net_conf->timeout*HZ/10; in conn_connect()
1042 nc = rcu_dereference(connection->net_conf); in conn_connect()
1059 connection->data.socket = sock.socket; in conn_connect()
1060 connection->meta.socket = msock.socket; in conn_connect()
1061 connection->last_received = jiffies; in conn_connect()
1063 h = drbd_do_features(connection); in conn_connect()
1067 if (connection->cram_hmac_tfm) { in conn_connect()
1069 switch (drbd_do_auth(connection)) { in conn_connect()
1071 drbd_err(connection, "Authentication of peer failed\n"); in conn_connect()
1074 drbd_err(connection, "Authentication of peer failed, trying again.\n"); in conn_connect()
1079 connection->data.socket->sk->sk_sndtimeo = timeout; in conn_connect()
1080 connection->data.socket->sk->sk_rcvtimeo = MAX_SCHEDULE_TIMEOUT; in conn_connect()
1082 if (drbd_send_protocol(connection) == -EOPNOTSUPP) in conn_connect()
1092 idr_for_each_entry(&connection->peer_devices, peer_device, vnr) in conn_connect()
1096 spin_lock_irq(&connection->resource->req_lock); in conn_connect()
1097 set_bit(STATE_SENT, &connection->flags); in conn_connect()
1098 spin_unlock_irq(&connection->resource->req_lock); in conn_connect()
1100 idr_for_each_entry(&connection->peer_devices, peer_device, vnr) in conn_connect()
1104 idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { in conn_connect()
1120 rv = conn_request_state(connection, NS(conn, C_WF_REPORT_PARAMS), CS_VERBOSE); in conn_connect()
1121 if (rv < SS_SUCCESS || connection->cstate != C_WF_REPORT_PARAMS) { in conn_connect()
1122 clear_bit(STATE_SENT, &connection->flags); in conn_connect()
1126 drbd_thread_start(&connection->ack_receiver); in conn_connect()
1129 connection->ack_sender = in conn_connect()
1130 alloc_ordered_workqueue("drbd_as_%s", WQ_MEM_RECLAIM, connection->resource->name); in conn_connect()
1131 if (!connection->ack_sender) { in conn_connect()
1132 drbd_err(connection, "Failed to create workqueue ack_sender\n"); in conn_connect()
1136 mutex_lock(&connection->resource->conf_update); in conn_connect()
1138 * connection attempt, the handshake of which is now well underway. in conn_connect()
1141 connection->net_conf->discard_my_data = 0; in conn_connect()
1142 mutex_unlock(&connection->resource->conf_update); in conn_connect()
1156 static int decode_header(struct drbd_connection *connection, void *header, struct packet_info *pi) in decode_header() argument
1158 unsigned int header_size = drbd_header_size(connection); in decode_header()
1164 drbd_err(connection, "Header padding is not zero\n"); in decode_header()
1183 drbd_err(connection, "Wrong magic value 0x%08x in protocol version %d\n", in decode_header()
1185 connection->agreed_pro_version); in decode_header()
1192 static void drbd_unplug_all_devices(struct drbd_connection *connection) in drbd_unplug_all_devices() argument
1194 if (current->plug == &connection->receiver_plug) { in drbd_unplug_all_devices()
1195 blk_finish_plug(&connection->receiver_plug); in drbd_unplug_all_devices()
1196 blk_start_plug(&connection->receiver_plug); in drbd_unplug_all_devices()
1200 static int drbd_recv_header(struct drbd_connection *connection, struct packet_info *pi) in drbd_recv_header() argument
1202 void *buffer = connection->data.rbuf; in drbd_recv_header()
1205 err = drbd_recv_all_warn(connection, buffer, drbd_header_size(connection)); in drbd_recv_header()
1209 err = decode_header(connection, buffer, pi); in drbd_recv_header()
1210 connection->last_received = jiffies; in drbd_recv_header()
1215 static int drbd_recv_header_maybe_unplug(struct drbd_connection *connection, struct packet_info *pi) in drbd_recv_header_maybe_unplug() argument
1217 void *buffer = connection->data.rbuf; in drbd_recv_header_maybe_unplug()
1218 unsigned int size = drbd_header_size(connection); in drbd_recv_header_maybe_unplug()
1221 err = drbd_recv_short(connection->data.socket, buffer, size, MSG_NOSIGNAL|MSG_DONTWAIT); in drbd_recv_header_maybe_unplug()
1228 tcp_sock_set_quickack(connection->data.socket->sk, 2); in drbd_recv_header_maybe_unplug()
1229 drbd_unplug_all_devices(connection); in drbd_recv_header_maybe_unplug()
1235 err = drbd_recv_all_warn(connection, buffer, size); in drbd_recv_header_maybe_unplug()
1240 err = decode_header(connection, connection->data.rbuf, pi); in drbd_recv_header_maybe_unplug()
1241 connection->last_received = jiffies; in drbd_recv_header_maybe_unplug()
1310 static void drbd_flush(struct drbd_connection *connection) in drbd_flush() argument
1312 if (connection->resource->write_ordering >= WO_BDEV_FLUSH) { in drbd_flush()
1322 idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { in drbd_flush()
1346 drbd_bump_write_ordering(connection->resource, NULL, WO_DRAIN_IO); in drbd_flush()
1353 * @connection: DRBD connection.
1357 static enum finish_epoch drbd_may_finish_epoch(struct drbd_connection *connection, in drbd_may_finish_epoch() argument
1365 spin_lock(&connection->epoch_lock); in drbd_may_finish_epoch()
1387 spin_unlock(&connection->epoch_lock); in drbd_may_finish_epoch()
1388 drbd_send_b_ack(epoch->connection, epoch->barrier_nr, epoch_size); in drbd_may_finish_epoch()
1389 spin_lock(&connection->epoch_lock); in drbd_may_finish_epoch()
1392 /* FIXME: dec unacked on connection, once we have in drbd_may_finish_epoch()
1393 * something to count pending connection packets in. */ in drbd_may_finish_epoch()
1395 dec_unacked(epoch->connection); in drbd_may_finish_epoch()
1398 if (connection->current_epoch != epoch) { in drbd_may_finish_epoch()
1402 connection->epochs--; in drbd_may_finish_epoch()
1422 spin_unlock(&connection->epoch_lock); in drbd_may_finish_epoch()
1643 conn_wait_active_ee_empty(peer_req->peer_device->connection); in drbd_submit_peer_request()
1718 static void conn_wait_active_ee_empty(struct drbd_connection *connection) in conn_wait_active_ee_empty() argument
1724 idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { in conn_wait_active_ee_empty()
1736 static int receive_Barrier(struct drbd_connection *connection, struct packet_info *pi) in receive_Barrier() argument
1742 /* FIXME these are unacked on connection, in receive_Barrier()
1745 connection->current_epoch->barrier_nr = p->barrier; in receive_Barrier()
1746 connection->current_epoch->connection = connection; in receive_Barrier()
1747 rv = drbd_may_finish_epoch(connection, connection->current_epoch, EV_GOT_BARRIER_NR); in receive_Barrier()
1754 switch (connection->resource->write_ordering) { in receive_Barrier()
1765 drbd_warn(connection, "Allocation of an epoch failed, slowing down\n"); in receive_Barrier()
1770 conn_wait_active_ee_empty(connection); in receive_Barrier()
1771 drbd_flush(connection); in receive_Barrier()
1773 if (atomic_read(&connection->current_epoch->epoch_size)) { in receive_Barrier()
1781 drbd_err(connection, "Strangeness in connection->write_ordering %d\n", in receive_Barrier()
1782 connection->resource->write_ordering); in receive_Barrier()
1790 spin_lock(&connection->epoch_lock); in receive_Barrier()
1791 if (atomic_read(&connection->current_epoch->epoch_size)) { in receive_Barrier()
1792 list_add(&epoch->list, &connection->current_epoch->list); in receive_Barrier()
1793 connection->current_epoch = epoch; in receive_Barrier()
1794 connection->epochs++; in receive_Barrier()
1799 spin_unlock(&connection->epoch_lock); in receive_Barrier()
1834 void *dig_in = peer_device->connection->int_dig_in; in read_in_block()
1835 void *dig_vv = peer_device->connection->int_dig_vv; in read_in_block()
1841 if (!trim && peer_device->connection->peer_integrity_tfm) { in read_in_block()
1842 digest_size = crypto_shash_digestsize(peer_device->connection->peer_integrity_tfm); in read_in_block()
1847 err = drbd_recv_all_warn(peer_device->connection, dig_in, digest_size); in read_in_block()
1906 err = drbd_recv_all_warn(peer_device->connection, data, len); in read_in_block()
1920 drbd_csum_ee_size(peer_device->connection->peer_integrity_tfm, peer_req, dig_vv, data_size); in read_in_block()
1950 err = drbd_recv_all_warn(peer_device->connection, data, len); in drbd_drain_block()
1967 void *dig_in = peer_device->connection->int_dig_in; in recv_dless_read()
1968 void *dig_vv = peer_device->connection->int_dig_vv; in recv_dless_read()
1971 if (peer_device->connection->peer_integrity_tfm) { in recv_dless_read()
1972 digest_size = crypto_shash_digestsize(peer_device->connection->peer_integrity_tfm); in recv_dless_read()
1973 err = drbd_recv_all_warn(peer_device->connection, dig_in, digest_size); in recv_dless_read()
1989 err = drbd_recv_all_warn(peer_device->connection, mapped, expect); in recv_dless_read()
1997 drbd_csum_bio(peer_device->connection->peer_integrity_tfm, bio, dig_vv); in recv_dless_read()
2094 static int receive_DataReply(struct drbd_connection *connection, struct packet_info *pi) in receive_DataReply() argument
2103 peer_device = conn_peer_device(connection, pi->vnr); in receive_DataReply()
2126 static int receive_RSDataReply(struct drbd_connection *connection, struct packet_info *pi) in receive_RSDataReply() argument
2134 peer_device = conn_peer_device(connection, pi->vnr); in receive_RSDataReply()
2221 …drbd_may_finish_epoch(peer_device->connection, peer_req->epoch, EV_PUT + (cancel ? EV_CLEANUP : 0)… in e_end_block()
2248 struct drbd_connection *connection = peer_req->peer_device->connection; in e_send_retry_write() local
2250 return e_send_ack(w, connection->agreed_pro_version >= 100 ? in e_send_retry_write()
2274 if (test_bit(RESOLVE_CONFLICTS, &peer_device->connection->flags)) { in update_peer_seq()
2323 * Assume we have a 10 GBit connection, that is about 1<<30 byte per second,
2337 if (!test_bit(RESOLVE_CONFLICTS, &peer_device->connection->flags)) in wait_for_and_update_peer_seq()
2353 tp = rcu_dereference(peer_device->connection->net_conf)->two_primaries; in wait_for_and_update_peer_seq()
2363 timeout = rcu_dereference(peer_device->connection->net_conf)->ping_timeo*HZ/10; in wait_for_and_update_peer_seq()
2426 struct drbd_connection *connection = peer_req->peer_device->connection; in handle_write_conflicts() local
2427 bool resolve_conflicts = test_bit(RESOLVE_CONFLICTS, &connection->flags); in handle_write_conflicts()
2481 queue_work(connection->ack_sender, &peer_req->peer_device->send_acks_work); in handle_write_conflicts()
2510 _conn_request_state(connection, NS(conn, C_TIMEOUT), CS_HARD); in handle_write_conflicts()
2532 static int receive_Data(struct drbd_connection *connection, struct packet_info *pi) in receive_Data() argument
2546 peer_device = conn_peer_device(connection, pi->vnr); in receive_Data()
2556 atomic_inc(&connection->current_epoch->epoch_size); in receive_Data()
2589 if (0 == (connection->agreed_features & DRBD_FF_WZEROES)) in receive_Data()
2606 spin_lock(&connection->epoch_lock); in receive_Data()
2607 peer_req->epoch = connection->current_epoch; in receive_Data()
2610 spin_unlock(&connection->epoch_lock); in receive_Data()
2613 nc = rcu_dereference(peer_device->connection->net_conf); in receive_Data()
2615 if (peer_device->connection->agreed_pro_version < 100) { in receive_Data()
2697 drbd_may_finish_epoch(connection, peer_req->epoch, EV_PUT | EV_CLEANUP); in receive_Data()
2783 static int receive_DataRequest(struct drbd_connection *connection, struct packet_info *pi) in receive_DataRequest() argument
2795 peer_device = conn_peer_device(connection, pi->vnr); in receive_DataRequest()
2888 if (drbd_recv_all(peer_device->connection, di->digest, pi->size)) in receive_DataRequest()
2892 D_ASSERT(device, peer_device->connection->agreed_pro_version >= 89); in receive_DataRequest()
2911 peer_device->connection->agreed_pro_version >= 90) { in receive_DataRequest()
2964 update_receiver_timing_details(connection, drbd_rs_should_slow_down); in receive_DataRequest()
2968 update_receiver_timing_details(connection, drbd_rs_begin_io); in receive_DataRequest()
2976 update_receiver_timing_details(connection, drbd_submit_peer_request); in receive_DataRequest()
2989 /* no drbd_rs_complete_io(), we are dropping the connection anyways */ in receive_DataRequest()
3013 after_sb_0p = rcu_dereference(peer_device->connection->net_conf)->after_sb_0p; in drbd_asb_recover_0p()
3049 rv = test_bit(RESOLVE_CONFLICTS, &peer_device->connection->flags) in drbd_asb_recover_0p()
3066 rv = test_bit(RESOLVE_CONFLICTS, &peer_device->connection->flags) in drbd_asb_recover_0p()
3089 after_sb_1p = rcu_dereference(peer_device->connection->net_conf)->after_sb_1p; in drbd_asb_recover_1p()
3146 after_sb_2p = rcu_dereference(peer_device->connection->net_conf)->after_sb_2p; in drbd_asb_recover_2p()
3219 struct drbd_connection *const connection = peer_device ? peer_device->connection : NULL; in drbd_uuid_compare() local
3245 if (connection->agreed_pro_version < 91) in drbd_uuid_compare()
3268 if (connection->agreed_pro_version < 91) in drbd_uuid_compare()
3308 if (!(connection->agreed_features & DRBD_FF_WSAME)) { in drbd_uuid_compare()
3332 dc = test_bit(RESOLVE_CONFLICTS, &connection->flags); in drbd_uuid_compare()
3345 if (connection->agreed_pro_version < 96 ? in drbd_uuid_compare()
3352 if (connection->agreed_pro_version < 91) in drbd_uuid_compare()
3382 if (connection->agreed_pro_version < 96 ? in drbd_uuid_compare()
3389 if (connection->agreed_pro_version < 91) in drbd_uuid_compare()
3492 nc = rcu_dereference(peer_device->connection->net_conf); in drbd_sync_handshake()
3541 * We just refuse to attach -- well, we drop the "connection" in drbd_sync_handshake()
3543 drbd_alert(device, "Split-Brain detected but unresolved, dropping connection!\n"); in drbd_sync_handshake()
3568 if (tentative || test_bit(CONN_DRY_RUN, &peer_device->connection->flags)) { in drbd_sync_handshake()
3614 static int receive_protocol(struct drbd_connection *connection, struct packet_info *pi) in receive_protocol() argument
3632 if (connection->agreed_pro_version >= 87) { in receive_protocol()
3637 err = drbd_recv_all(connection, integrity_alg, pi->size); in receive_protocol()
3644 clear_bit(CONN_DRY_RUN, &connection->flags); in receive_protocol()
3647 set_bit(CONN_DRY_RUN, &connection->flags); in receive_protocol()
3650 nc = rcu_dereference(connection->net_conf); in receive_protocol()
3653 drbd_err(connection, "incompatible %s settings\n", "protocol"); in receive_protocol()
3658 drbd_err(connection, "incompatible %s settings\n", "after-sb-0pri"); in receive_protocol()
3663 drbd_err(connection, "incompatible %s settings\n", "after-sb-1pri"); in receive_protocol()
3668 drbd_err(connection, "incompatible %s settings\n", "after-sb-2pri"); in receive_protocol()
3673 drbd_err(connection, "incompatible %s settings\n", "discard-my-data"); in receive_protocol()
3678 drbd_err(connection, "incompatible %s settings\n", "allow-two-primaries"); in receive_protocol()
3683 drbd_err(connection, "incompatible %s settings\n", "data-integrity-alg"); in receive_protocol()
3705 drbd_err(connection, "peer data-integrity-alg %s not supported\n", in receive_protocol()
3714 drbd_err(connection, "Allocation of buffers for data integrity checking failed\n"); in receive_protocol()
3723 mutex_lock(&connection->data.mutex); in receive_protocol()
3724 mutex_lock(&connection->resource->conf_update); in receive_protocol()
3725 old_net_conf = connection->net_conf; in receive_protocol()
3734 rcu_assign_pointer(connection->net_conf, new_net_conf); in receive_protocol()
3735 mutex_unlock(&connection->resource->conf_update); in receive_protocol()
3736 mutex_unlock(&connection->data.mutex); in receive_protocol()
3738 crypto_free_shash(connection->peer_integrity_tfm); in receive_protocol()
3739 kfree(connection->int_dig_in); in receive_protocol()
3740 kfree(connection->int_dig_vv); in receive_protocol()
3741 connection->peer_integrity_tfm = peer_integrity_tfm; in receive_protocol()
3742 connection->int_dig_in = int_dig_in; in receive_protocol()
3743 connection->int_dig_vv = int_dig_vv; in receive_protocol()
3746 drbd_info(connection, "peer data-integrity-alg: %s\n", in receive_protocol()
3758 conn_request_state(connection, NS(conn, C_DISCONNECTING), CS_HARD); in receive_protocol()
3785 static int ignore_remaining_packet(struct drbd_connection *connection, struct packet_info *pi) in ignore_remaining_packet() argument
3787 void *buffer = connection->data.rbuf; in ignore_remaining_packet()
3792 s = drbd_recv(connection, buffer, s); in ignore_remaining_packet()
3808 * When a device is added to an existing connection, the node on which the
3816 static int config_unknown_volume(struct drbd_connection *connection, struct packet_info *pi) in config_unknown_volume() argument
3818 drbd_warn(connection, "%s packet received for volume %u, which is not configured locally\n", in config_unknown_volume()
3820 return ignore_remaining_packet(connection, pi); in config_unknown_volume()
3823 static int receive_SyncParam(struct drbd_connection *connection, struct packet_info *pi) in receive_SyncParam() argument
3833 const int apv = connection->agreed_pro_version; in receive_SyncParam()
3838 peer_device = conn_peer_device(connection, pi->vnr); in receive_SyncParam()
3840 return config_unknown_volume(connection, pi); in receive_SyncParam()
3873 err = drbd_recv_all(peer_device->connection, p, header_size); in receive_SyncParam()
3877 mutex_lock(&connection->resource->conf_update); in receive_SyncParam()
3878 old_net_conf = peer_device->connection->net_conf; in receive_SyncParam()
3883 mutex_unlock(&connection->resource->conf_update); in receive_SyncParam()
3903 err = drbd_recv_all(peer_device->connection, p->verify_alg, data_size); in receive_SyncParam()
3975 crypto_free_shash(peer_device->connection->verify_tfm); in receive_SyncParam()
3976 peer_device->connection->verify_tfm = verify_tfm; in receive_SyncParam()
3982 crypto_free_shash(peer_device->connection->csums_tfm); in receive_SyncParam()
3983 peer_device->connection->csums_tfm = csums_tfm; in receive_SyncParam()
3986 rcu_assign_pointer(connection->net_conf, new_net_conf); in receive_SyncParam()
4000 mutex_unlock(&connection->resource->conf_update); in receive_SyncParam()
4014 mutex_unlock(&connection->resource->conf_update); in receive_SyncParam()
4023 mutex_unlock(&connection->resource->conf_update); in receive_SyncParam()
4029 conn_request_state(peer_device->connection, NS(conn, C_DISCONNECTING), CS_HARD); in receive_SyncParam()
4046 static int receive_sizes(struct drbd_connection *connection, struct packet_info *pi) in receive_sizes() argument
4051 struct o_qlim *o = (connection->agreed_features & DRBD_FF_WSAME) ? p->qlim : NULL; in receive_sizes()
4058 peer_device = conn_peer_device(connection, pi->vnr); in receive_sizes()
4060 return config_unknown_volume(connection, pi); in receive_sizes()
4096 conn_request_state(peer_device->connection, NS(conn, C_DISCONNECTING), CS_HARD); in receive_sizes()
4110 mutex_lock(&connection->resource->conf_update); in receive_sizes()
4116 mutex_unlock(&connection->resource->conf_update); in receive_sizes()
4169 conn_request_state(peer_device->connection, NS(conn, C_DISCONNECTING), CS_HARD); in receive_sizes()
4217 static int receive_uuids(struct drbd_connection *connection, struct packet_info *pi) in receive_uuids() argument
4225 peer_device = conn_peer_device(connection, pi->vnr); in receive_uuids()
4227 return config_unknown_volume(connection, pi); in receive_uuids()
4246 conn_request_state(peer_device->connection, NS(conn, C_DISCONNECTING), CS_HARD); in receive_uuids()
4253 peer_device->connection->agreed_pro_version >= 90 && in receive_uuids()
4322 static int receive_req_state(struct drbd_connection *connection, struct packet_info *pi) in receive_req_state() argument
4330 peer_device = conn_peer_device(connection, pi->vnr); in receive_req_state()
4338 if (test_bit(RESOLVE_CONFLICTS, &peer_device->connection->flags) && in receive_req_state()
4355 static int receive_req_conn_state(struct drbd_connection *connection, struct packet_info *pi) in receive_req_conn_state() argument
4364 if (test_bit(RESOLVE_CONFLICTS, &connection->flags) && in receive_req_conn_state()
4365 mutex_is_locked(&connection->cstate_mutex)) { in receive_req_conn_state()
4366 conn_send_sr_reply(connection, SS_CONCURRENT_ST_CHG); in receive_req_conn_state()
4373 rv = conn_request_state(connection, mask, val, CS_VERBOSE | CS_LOCAL_ONLY | CS_IGN_OUTD_FAIL); in receive_req_conn_state()
4374 conn_send_sr_reply(connection, rv); in receive_req_conn_state()
4379 static int receive_state(struct drbd_connection *connection, struct packet_info *pi) in receive_state() argument
4389 peer_device = conn_peer_device(connection, pi->vnr); in receive_state()
4391 return config_unknown_volume(connection, pi); in receive_state()
4408 * already decided to close the connection again, in receive_state()
4476 * In this scenario, we already dropped the connection hard in receive_state()
4479 * Should we want to change this, that is: not drop the connection in in receive_state()
4489 /* if we established a new connection */ in receive_state()
4491 /* if we had an established connection in receive_state()
4518 if (test_and_clear_bit(CONN_DRY_RUN, &peer_device->connection->flags)) in receive_state()
4521 conn_request_state(peer_device->connection, NS(conn, C_DISCONNECTING), CS_HARD); in receive_state()
4543 tl_clear(peer_device->connection); in receive_state()
4546 conn_request_state(peer_device->connection, NS2(conn, C_PROTOCOL_ERROR, susp, 0), CS_HARD); in receive_state()
4554 conn_request_state(peer_device->connection, NS(conn, C_DISCONNECTING), CS_HARD); in receive_state()
4576 static int receive_sync_uuid(struct drbd_connection *connection, struct packet_info *pi) in receive_sync_uuid() argument
4582 peer_device = conn_peer_device(connection, pi->vnr); in receive_sync_uuid()
4622 drbd_header_size(peer_device->connection); in receive_bitmap_plain()
4634 err = drbd_recv_all(peer_device->connection, p, want); in receive_bitmap_plain()
4752 conn_request_state(peer_device->connection, NS(conn, C_PROTOCOL_ERROR), CS_HARD); in decode_bitmap_c()
4760 unsigned int header_size = drbd_header_size(first_peer_device(device)->connection); in INFO_bm_xfer_stats()
4800 static int receive_bitmap(struct drbd_connection *connection, struct packet_info *pi) in receive_bitmap() argument
4807 peer_device = conn_peer_device(connection, pi->vnr); in receive_bitmap()
4829 if (pi->size > DRBD_SOCKET_BUFFER_SIZE - drbd_header_size(connection)) { in receive_bitmap()
4839 err = drbd_recv_all(peer_device->connection, p, pi->size); in receive_bitmap()
4850 c.bytes[pi->cmd == P_BITMAP] += drbd_header_size(connection) + pi->size; in receive_bitmap()
4857 err = drbd_recv_header(peer_device->connection, pi); in receive_bitmap()
4888 static int receive_skip(struct drbd_connection *connection, struct packet_info *pi) in receive_skip() argument
4890 drbd_warn(connection, "skipping unknown optional packet type %d, l: %d!\n", in receive_skip()
4893 return ignore_remaining_packet(connection, pi); in receive_skip()
4896 static int receive_UnplugRemote(struct drbd_connection *connection, struct packet_info *pi) in receive_UnplugRemote() argument
4900 tcp_sock_set_quickack(connection->data.socket->sk, 2); in receive_UnplugRemote()
4904 static int receive_out_of_sync(struct drbd_connection *connection, struct packet_info *pi) in receive_out_of_sync() argument
4910 peer_device = conn_peer_device(connection, pi->vnr); in receive_out_of_sync()
4930 static int receive_rs_deallocated(struct drbd_connection *connection, struct packet_info *pi) in receive_rs_deallocated() argument
4938 peer_device = conn_peer_device(connection, pi->vnr); in receive_rs_deallocated()
5034 static void drbdd(struct drbd_connection *connection) in drbdd() argument
5040 while (get_t_state(&connection->receiver) == RUNNING) { in drbdd()
5043 drbd_thread_current_set_cpu(&connection->receiver); in drbdd()
5044 update_receiver_timing_details(connection, drbd_recv_header_maybe_unplug); in drbdd()
5045 if (drbd_recv_header_maybe_unplug(connection, &pi)) in drbdd()
5050 drbd_err(connection, "Unexpected data packet %s (0x%04x)", in drbdd()
5056 if (pi.cmd == P_SIZES && connection->agreed_features & DRBD_FF_WSAME) in drbdd()
5059 drbd_err(connection, "No payload expected %s l:%d\n", in drbdd()
5064 drbd_err(connection, "%s: unexpected packet size, expected:%d received:%d\n", in drbdd()
5070 update_receiver_timing_details(connection, drbd_recv_all_warn); in drbdd()
5071 err = drbd_recv_all_warn(connection, pi.data, shs); in drbdd()
5077 update_receiver_timing_details(connection, cmd->fn); in drbdd()
5078 err = cmd->fn(connection, &pi); in drbdd()
5080 drbd_err(connection, "error receiving %s, e: %d l: %d!\n", in drbdd()
5088 conn_request_state(connection, NS(conn, C_PROTOCOL_ERROR), CS_HARD); in drbdd()
5091 static void conn_disconnect(struct drbd_connection *connection) in conn_disconnect() argument
5097 if (connection->cstate == C_STANDALONE) in conn_disconnect()
5100 /* We are about to start the cleanup after connection loss. in conn_disconnect()
5105 conn_request_state(connection, NS(conn, C_NETWORK_FAILURE), CS_HARD); in conn_disconnect()
5108 drbd_thread_stop(&connection->ack_receiver); in conn_disconnect()
5109 if (connection->ack_sender) { in conn_disconnect()
5110 destroy_workqueue(connection->ack_sender); in conn_disconnect()
5111 connection->ack_sender = NULL; in conn_disconnect()
5113 drbd_free_sock(connection); in conn_disconnect()
5116 idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { in conn_disconnect()
5126 if (!list_empty(&connection->current_epoch->list)) in conn_disconnect()
5127 drbd_err(connection, "ASSERTION FAILED: connection->current_epoch->list not empty\n"); in conn_disconnect()
5129 atomic_set(&connection->current_epoch->epoch_size, 0); in conn_disconnect()
5130 connection->send.seen_any_write_yet = false; in conn_disconnect()
5132 drbd_info(connection, "Connection closed\n"); in conn_disconnect()
5134 if (conn_highest_role(connection) == R_PRIMARY && conn_highest_pdsk(connection) >= D_UNKNOWN) in conn_disconnect()
5135 conn_try_outdate_peer_async(connection); in conn_disconnect()
5137 spin_lock_irq(&connection->resource->req_lock); in conn_disconnect()
5138 oc = connection->cstate; in conn_disconnect()
5140 _conn_request_state(connection, NS(conn, C_UNCONNECTED), CS_VERBOSE); in conn_disconnect()
5142 spin_unlock_irq(&connection->resource->req_lock); in conn_disconnect()
5145 conn_request_state(connection, NS(conn, C_STANDALONE), CS_VERBOSE | CS_HARD); in conn_disconnect()
5182 drbd_flush_workqueue(&peer_device->connection->sender_work); in drbd_disconnected()
5189 drbd_flush_workqueue(&peer_device->connection->sender_work); in drbd_disconnected()
5199 tl_clear(peer_device->connection); in drbd_disconnected()
5243 static int drbd_send_features(struct drbd_connection *connection) in drbd_send_features() argument
5248 sock = &connection->data; in drbd_send_features()
5249 p = conn_prepare_command(connection, sock); in drbd_send_features()
5256 return conn_send_command(connection, sock, P_CONNECTION_FEATURES, sizeof(*p), NULL, 0); in drbd_send_features()
5261 * 1 yes, we have a valid connection
5266 static int drbd_do_features(struct drbd_connection *connection) in drbd_do_features() argument
5268 /* ASSERT current == connection->receiver ... */ in drbd_do_features()
5274 err = drbd_send_features(connection); in drbd_do_features()
5278 err = drbd_recv_header(connection, &pi); in drbd_do_features()
5283 drbd_err(connection, "expected ConnectionFeatures packet, received: %s (0x%04x)\n", in drbd_do_features()
5289 drbd_err(connection, "expected ConnectionFeatures length: %u, received: %u\n", in drbd_do_features()
5295 err = drbd_recv_all_warn(connection, p, expect); in drbd_do_features()
5308 connection->agreed_pro_version = min_t(int, PRO_VERSION_MAX, p->protocol_max); in drbd_do_features()
5309 connection->agreed_features = PRO_FEATURES & be32_to_cpu(p->feature_flags); in drbd_do_features()
5311 drbd_info(connection, "Handshake successful: " in drbd_do_features()
5312 "Agreed network protocol version %d\n", connection->agreed_pro_version); in drbd_do_features()
5314 drbd_info(connection, "Feature flags enabled on protocol level: 0x%x%s%s%s%s.\n", in drbd_do_features()
5315 connection->agreed_features, in drbd_do_features()
5316 connection->agreed_features & DRBD_FF_TRIM ? " TRIM" : "", in drbd_do_features()
5317 connection->agreed_features & DRBD_FF_THIN_RESYNC ? " THIN_RESYNC" : "", in drbd_do_features()
5318 connection->agreed_features & DRBD_FF_WSAME ? " WRITE_SAME" : "", in drbd_do_features()
5319 connection->agreed_features & DRBD_FF_WZEROES ? " WRITE_ZEROES" : in drbd_do_features()
5320 connection->agreed_features ? "" : " none"); in drbd_do_features()
5325 drbd_err(connection, "incompatible DRBD dialects: " in drbd_do_features()
5333 static int drbd_do_auth(struct drbd_connection *connection) in drbd_do_auth() argument
5335 drbd_err(connection, "This kernel was build without CONFIG_CRYPTO_HMAC.\n"); in drbd_do_auth()
5336 drbd_err(connection, "You need to disable 'cram-hmac-alg' in drbd.conf.\n"); in drbd_do_auth()
5348 static int drbd_do_auth(struct drbd_connection *connection) in drbd_do_auth() argument
5366 nc = rcu_dereference(connection->net_conf); in drbd_do_auth()
5372 crypto_shash_descsize(connection->cram_hmac_tfm), in drbd_do_auth()
5378 desc->tfm = connection->cram_hmac_tfm; in drbd_do_auth()
5380 rv = crypto_shash_setkey(connection->cram_hmac_tfm, (u8 *)secret, key_len); in drbd_do_auth()
5382 drbd_err(connection, "crypto_shash_setkey() failed with %d\n", rv); in drbd_do_auth()
5389 sock = &connection->data; in drbd_do_auth()
5390 if (!conn_prepare_command(connection, sock)) { in drbd_do_auth()
5394 rv = !conn_send_command(connection, sock, P_AUTH_CHALLENGE, 0, in drbd_do_auth()
5399 err = drbd_recv_header(connection, &pi); in drbd_do_auth()
5406 drbd_err(connection, "expected AuthChallenge packet, received: %s (0x%04x)\n", in drbd_do_auth()
5413 drbd_err(connection, "expected AuthChallenge payload too big.\n"); in drbd_do_auth()
5419 drbd_err(connection, "AuthChallenge payload too small.\n"); in drbd_do_auth()
5430 err = drbd_recv_all_warn(connection, peers_ch, pi.size); in drbd_do_auth()
5437 drbd_err(connection, "Peer presented the same challenge!\n"); in drbd_do_auth()
5442 resp_size = crypto_shash_digestsize(connection->cram_hmac_tfm); in drbd_do_auth()
5451 drbd_err(connection, "crypto_hash_digest() failed with %d\n", rv); in drbd_do_auth()
5456 if (!conn_prepare_command(connection, sock)) { in drbd_do_auth()
5460 rv = !conn_send_command(connection, sock, P_AUTH_RESPONSE, 0, in drbd_do_auth()
5465 err = drbd_recv_header(connection, &pi); in drbd_do_auth()
5472 drbd_err(connection, "expected AuthResponse packet, received: %s (0x%04x)\n", in drbd_do_auth()
5479 drbd_err(connection, "expected AuthResponse payload of wrong size\n"); in drbd_do_auth()
5484 err = drbd_recv_all_warn(connection, response , resp_size); in drbd_do_auth()
5499 drbd_err(connection, "crypto_hash_digest() failed with %d\n", rv); in drbd_do_auth()
5507 drbd_info(connection, "Peer authenticated using %d bytes HMAC\n", in drbd_do_auth()
5527 struct drbd_connection *connection = thi->connection; in drbd_receiver() local
5530 drbd_info(connection, "receiver (re)started\n"); in drbd_receiver()
5533 h = conn_connect(connection); in drbd_receiver()
5535 conn_disconnect(connection); in drbd_receiver()
5539 drbd_warn(connection, "Discarding network configuration.\n"); in drbd_receiver()
5540 conn_request_state(connection, NS(conn, C_DISCONNECTING), CS_HARD); in drbd_receiver()
5545 blk_start_plug(&connection->receiver_plug); in drbd_receiver()
5546 drbdd(connection); in drbd_receiver()
5547 blk_finish_plug(&connection->receiver_plug); in drbd_receiver()
5550 conn_disconnect(connection); in drbd_receiver()
5552 drbd_info(connection, "receiver terminated\n"); in drbd_receiver()
5558 static int got_conn_RqSReply(struct drbd_connection *connection, struct packet_info *pi) in got_conn_RqSReply() argument
5564 set_bit(CONN_WD_ST_CHG_OKAY, &connection->flags); in got_conn_RqSReply()
5566 set_bit(CONN_WD_ST_CHG_FAIL, &connection->flags); in got_conn_RqSReply()
5567 drbd_err(connection, "Requested state change failed by peer: %s (%d)\n", in got_conn_RqSReply()
5570 wake_up(&connection->ping_wait); in got_conn_RqSReply()
5575 static int got_RqSReply(struct drbd_connection *connection, struct packet_info *pi) in got_RqSReply() argument
5582 peer_device = conn_peer_device(connection, pi->vnr); in got_RqSReply()
5587 if (test_bit(CONN_WD_ST_CHG_REQ, &connection->flags)) { in got_RqSReply()
5588 D_ASSERT(device, connection->agreed_pro_version < 100); in got_RqSReply()
5589 return got_conn_RqSReply(connection, pi); in got_RqSReply()
5604 static int got_Ping(struct drbd_connection *connection, struct packet_info *pi) in got_Ping() argument
5606 return drbd_send_ping_ack(connection); in got_Ping()
5610 static int got_PingAck(struct drbd_connection *connection, struct packet_info *pi) in got_PingAck() argument
5613 connection->meta.socket->sk->sk_rcvtimeo = connection->net_conf->ping_int*HZ; in got_PingAck()
5614 if (!test_and_set_bit(GOT_PING_ACK, &connection->flags)) in got_PingAck()
5615 wake_up(&connection->ping_wait); in got_PingAck()
5620 static int got_IsInSync(struct drbd_connection *connection, struct packet_info *pi) in got_IsInSync() argument
5628 peer_device = conn_peer_device(connection, pi->vnr); in got_IsInSync()
5633 D_ASSERT(device, peer_device->connection->agreed_pro_version >= 89); in got_IsInSync()
5672 static int got_BlockAck(struct drbd_connection *connection, struct packet_info *pi) in got_BlockAck() argument
5681 peer_device = conn_peer_device(connection, pi->vnr); in got_BlockAck()
5718 static int got_NegAck(struct drbd_connection *connection, struct packet_info *pi) in got_NegAck() argument
5727 peer_device = conn_peer_device(connection, pi->vnr); in got_NegAck()
5754 static int got_NegDReply(struct drbd_connection *connection, struct packet_info *pi) in got_NegDReply() argument
5761 peer_device = conn_peer_device(connection, pi->vnr); in got_NegDReply()
5776 static int got_NegRSDReply(struct drbd_connection *connection, struct packet_info *pi) in got_NegRSDReply() argument
5784 peer_device = conn_peer_device(connection, pi->vnr); in got_NegRSDReply()
5813 static int got_BarrierAck(struct drbd_connection *connection, struct packet_info *pi) in got_BarrierAck() argument
5819 tl_release(connection, p->barrier, be32_to_cpu(p->set_size)); in got_BarrierAck()
5822 idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { in got_BarrierAck()
5837 static int got_OVResult(struct drbd_connection *connection, struct packet_info *pi) in got_OVResult() argument
5846 peer_device = conn_peer_device(connection, pi->vnr); in got_OVResult()
5878 drbd_queue_work(&peer_device->connection->sender_work, &dw->w); in got_OVResult()
5889 static int got_skip(struct drbd_connection *connection, struct packet_info *pi) in got_skip() argument
5896 int (*fn)(struct drbd_connection *connection, struct packet_info *);
5899 static void set_rcvtimeo(struct drbd_connection *connection, bool ping_timeout) in set_rcvtimeo() argument
5905 nc = rcu_dereference(connection->net_conf); in set_rcvtimeo()
5913 connection->meta.socket->sk->sk_rcvtimeo = t; in set_rcvtimeo()
5916 static void set_ping_timeout(struct drbd_connection *connection) in set_ping_timeout() argument
5918 set_rcvtimeo(connection, 1); in set_ping_timeout()
5921 static void set_idle_timeout(struct drbd_connection *connection) in set_idle_timeout() argument
5923 set_rcvtimeo(connection, 0); in set_idle_timeout()
5948 struct drbd_connection *connection = thi->connection; in drbd_ack_receiver() local
5953 void *buf = connection->meta.rbuf; in drbd_ack_receiver()
5955 unsigned int header_size = drbd_header_size(connection); in drbd_ack_receiver()
5964 conn_reclaim_net_peer_reqs(connection); in drbd_ack_receiver()
5966 if (test_and_clear_bit(SEND_PING, &connection->flags)) { in drbd_ack_receiver()
5967 if (drbd_send_ping(connection)) { in drbd_ack_receiver()
5968 drbd_err(connection, "drbd_send_ping has failed\n"); in drbd_ack_receiver()
5971 set_ping_timeout(connection); in drbd_ack_receiver()
5976 rv = drbd_recv_short(connection->meta.socket, buf, expect-received, 0); in drbd_ack_receiver()
5981 * -ECONNRESET other side closed the connection in drbd_ack_receiver()
5986 * rv == 0 : "connection shut down by peer" in drbd_ack_receiver()
5992 if (test_bit(DISCONNECT_SENT, &connection->flags)) { in drbd_ack_receiver()
5995 t = rcu_dereference(connection->net_conf)->ping_timeo * HZ/10; in drbd_ack_receiver()
5998 t = wait_event_timeout(connection->ping_wait, in drbd_ack_receiver()
5999 connection->cstate < C_WF_REPORT_PARAMS, in drbd_ack_receiver()
6004 drbd_err(connection, "meta connection shut down by peer.\n"); in drbd_ack_receiver()
6009 if (time_after(connection->last_received, pre_recv_jif)) in drbd_ack_receiver()
6012 drbd_err(connection, "PingAck did not arrive in time.\n"); in drbd_ack_receiver()
6015 set_bit(SEND_PING, &connection->flags); in drbd_ack_receiver()
6024 drbd_err(connection, "sock_recvmsg returned %d\n", rv); in drbd_ack_receiver()
6029 if (decode_header(connection, connection->meta.rbuf, &pi)) in drbd_ack_receiver()
6033 drbd_err(connection, "Unexpected meta packet %s (0x%04x)\n", in drbd_ack_receiver()
6039 drbd_err(connection, "Wrong packet size on meta (c: %d, l: %d)\n", in drbd_ack_receiver()
6047 err = cmd->fn(connection, &pi); in drbd_ack_receiver()
6049 drbd_err(connection, "%ps failed\n", cmd->fn); in drbd_ack_receiver()
6053 connection->last_received = jiffies; in drbd_ack_receiver()
6056 set_idle_timeout(connection); in drbd_ack_receiver()
6060 buf = connection->meta.rbuf; in drbd_ack_receiver()
6069 conn_request_state(connection, NS(conn, C_NETWORK_FAILURE), CS_HARD); in drbd_ack_receiver()
6070 conn_md_sync(connection); in drbd_ack_receiver()
6074 conn_request_state(connection, NS(conn, C_DISCONNECTING), CS_HARD); in drbd_ack_receiver()
6077 drbd_info(connection, "ack_receiver terminated\n"); in drbd_ack_receiver()
6086 struct drbd_connection *connection = peer_device->connection; in drbd_send_acks_wf() local
6092 nc = rcu_dereference(connection->net_conf); in drbd_send_acks_wf()
6097 tcp_sock_set_cork(connection->meta.socket->sk, true); in drbd_send_acks_wf()
6105 conn_request_state(connection, NS(conn, C_NETWORK_FAILURE), CS_HARD); in drbd_send_acks_wf()
6110 tcp_sock_set_cork(connection->meta.socket->sk, false); in drbd_send_acks_wf()