Lines Matching defs:connection
160 static void wake_all_senders(struct drbd_connection *connection)
162 wake_up(&connection->sender_work.q_wait);
166 void start_new_tl_epoch(struct drbd_connection *connection)
169 if (connection->current_tle_writes == 0)
172 connection->current_tle_writes = 0;
173 atomic_inc(&connection->current_tle_nr);
174 wake_all_senders(connection);
245 req->epoch == atomic_read(&first_peer_device(device)->connection->current_tle_nr))
246 start_new_tl_epoch(first_peer_device(device)->connection);
323 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL;
324 if (!connection)
326 if (connection->req_next == NULL)
327 connection->req_next = req;
332 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL;
333 if (!connection)
335 if (connection->req_next != req)
337 list_for_each_entry_continue(req, &connection->transfer_log, tl_requests) {
342 if (&req->tl_requests == &connection->transfer_log)
344 connection->req_next = req;
349 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL;
350 if (!connection)
352 if (connection->req_ack_pending == NULL)
353 connection->req_ack_pending = req;
358 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL;
359 if (!connection)
361 if (connection->req_ack_pending != req)
363 list_for_each_entry_continue(req, &connection->transfer_log, tl_requests) {
368 if (&req->tl_requests == &connection->transfer_log)
370 connection->req_ack_pending = req;
375 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL;
376 if (!connection)
378 if (connection->req_not_net_done == NULL)
379 connection->req_not_net_done = req;
384 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL;
385 if (!connection)
387 if (connection->req_not_net_done != req)
389 list_for_each_entry_continue(req, &connection->transfer_log, tl_requests) {
394 if (&req->tl_requests == &connection->transfer_log)
396 connection->req_not_net_done = req;
553 struct drbd_connection *const connection = peer_device ? peer_device->connection : NULL;
576 nc = rcu_dereference(connection->net_conf);
648 drbd_queue_work(&connection->sender_work,
664 * missed during cleanup after connection loss.
684 drbd_queue_work(&connection->sender_work,
689 nc = rcu_dereference(connection->net_conf);
692 if (connection->current_tle_writes >= p)
693 start_new_tl_epoch(connection);
700 drbd_queue_work(&connection->sender_work,
723 * so we know what to dirty on connection loss. */
728 * as far as this connection is concerned. */
733 /* transfer log cleanup after connection loss */
811 drbd_queue_work(&connection->sender_work,
823 before the connection loss (B&C only); only P_BARRIER_ACK
826 During connection handshake, we ensure that the peer was not rebooted. */
834 drbd_queue_work(&connection->sender_work,
849 * this is bad, because if the connection is lost now,
867 start_new_tl_epoch(connection);
975 struct drbd_connection *connection = first_peer_device(device)->connection;
981 nc = rcu_dereference(connection->net_conf);
985 connection->agreed_pro_version < 96)
1011 start_new_tl_epoch(first_peer_device(device)->connection);
1346 req->epoch = atomic_read(&first_peer_device(device)->connection->current_tle_nr);
1352 first_peer_device(device)->connection->current_tle_writes++;
1354 list_add_tail(&req->tl_requests, &first_peer_device(device)->connection->transfer_log);
1617 struct drbd_connection *connection,
1626 if (time_in_range(now, connection->last_reconnect_jif, connection->last_reconnect_jif + ent))
1639 if (net_req->epoch == connection->send.current_epoch_nr) {
1657 * No need yet to kill this connection, it may still recover.
1662 if (time_after(now, connection->send.last_sent_barrier_jif + ent)) {
1664 connection->send.last_sent_barrier_jif, now,
1665 jiffies_to_msecs(now - connection->send.last_sent_barrier_jif), ko_count, timeout);
1677 * - the connection was established (resp. disk was attached)
1691 struct drbd_connection *connection = first_peer_device(device)->connection;
1700 nc = rcu_dereference(connection->net_conf);
1734 req_peer = connection->req_ack_pending;
1740 req_peer = connection->req_not_net_done;
1757 if (ent && req_peer && net_timeout_reached(req_peer, connection, now, ent, ko_count, timeout))
1758 _conn_request_state(connection, NS(conn, C_TIMEOUT), CS_VERBOSE | CS_HARD);