Lines Matching defs:connection

159 static void wake_all_senders(struct drbd_connection *connection)
161 wake_up(&connection->sender_work.q_wait);
165 void start_new_tl_epoch(struct drbd_connection *connection)
168 if (connection->current_tle_writes == 0)
171 connection->current_tle_writes = 0;
172 atomic_inc(&connection->current_tle_nr);
173 wake_all_senders(connection);
244 req->epoch == atomic_read(&first_peer_device(device)->connection->current_tle_nr))
245 start_new_tl_epoch(first_peer_device(device)->connection);
322 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL;
323 if (!connection)
325 if (connection->req_next == NULL)
326 connection->req_next = req;
331 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL;
333 if (!connection)
335 if (connection->req_next != req)
339 list_for_each_entry_continue(iter, &connection->transfer_log, tl_requests) {
347 connection->req_next = req;
352 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL;
353 if (!connection)
355 if (connection->req_ack_pending == NULL)
356 connection->req_ack_pending = req;
361 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL;
363 if (!connection)
365 if (connection->req_ack_pending != req)
369 list_for_each_entry_continue(iter, &connection->transfer_log, tl_requests) {
377 connection->req_ack_pending = req;
382 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL;
383 if (!connection)
385 if (connection->req_not_net_done == NULL)
386 connection->req_not_net_done = req;
391 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL;
393 if (!connection)
395 if (connection->req_not_net_done != req)
399 list_for_each_entry_continue(iter, &connection->transfer_log, tl_requests) {
407 connection->req_not_net_done = req;
565 struct drbd_connection *const connection = peer_device ? peer_device->connection : NULL;
588 nc = rcu_dereference(connection->net_conf);
660 drbd_queue_work(&connection->sender_work,
676 * missed during cleanup after connection loss.
696 drbd_queue_work(&connection->sender_work,
701 nc = rcu_dereference(connection->net_conf);
704 if (connection->current_tle_writes >= p)
705 start_new_tl_epoch(connection);
712 drbd_queue_work(&connection->sender_work,
735 * so we know what to dirty on connection loss. */
740 * as far as this connection is concerned. */
745 /* transfer log cleanup after connection loss */
824 drbd_queue_work(&connection->sender_work,
836 before the connection loss (B&C only); only P_BARRIER_ACK
839 During connection handshake, we ensure that the peer was not rebooted. */
847 drbd_queue_work(&connection->sender_work,
862 * this is bad, because if the connection is lost now,
880 start_new_tl_epoch(connection);
986 struct drbd_connection *connection = first_peer_device(device)->connection;
992 nc = rcu_dereference(connection->net_conf);
996 connection->agreed_pro_version < 96)
1022 start_new_tl_epoch(first_peer_device(device)->connection);
1360 req->epoch = atomic_read(&first_peer_device(device)->connection->current_tle_nr);
1366 first_peer_device(device)->connection->current_tle_writes++;
1368 list_add_tail(&req->tl_requests, &first_peer_device(device)->connection->transfer_log);
1629 struct drbd_connection *connection,
1638 if (time_in_range(now, connection->last_reconnect_jif, connection->last_reconnect_jif + ent))
1651 if (net_req->epoch == connection->send.current_epoch_nr) {
1669 * No need yet to kill this connection, it may still recover.
1674 if (time_after(now, connection->send.last_sent_barrier_jif + ent)) {
1676 connection->send.last_sent_barrier_jif, now,
1677 jiffies_to_msecs(now - connection->send.last_sent_barrier_jif), ko_count, timeout);
1689 * - the connection was established (resp. disk was attached)
1703 struct drbd_connection *connection = first_peer_device(device)->connection;
1712 nc = rcu_dereference(connection->net_conf);
1746 req_peer = connection->req_ack_pending;
1752 req_peer = connection->req_not_net_done;
1769 if (ent && req_peer && net_timeout_reached(req_peer, connection, now, ent, ko_count, timeout))
1770 _conn_request_state(connection, NS(conn, C_TIMEOUT), CS_VERBOSE | CS_HARD);