Lines Matching refs:connection

159 static void wake_all_senders(struct drbd_connection *connection)  in wake_all_senders()  argument
161 wake_up(&connection->sender_work.q_wait); in wake_all_senders()
165 void start_new_tl_epoch(struct drbd_connection *connection) in start_new_tl_epoch() argument
168 if (connection->current_tle_writes == 0) in start_new_tl_epoch()
171 connection->current_tle_writes = 0; in start_new_tl_epoch()
172 atomic_inc(&connection->current_tle_nr); in start_new_tl_epoch()
173 wake_all_senders(connection); in start_new_tl_epoch()
244 req->epoch == atomic_read(&first_peer_device(device)->connection->current_tle_nr)) in drbd_req_complete()
245 start_new_tl_epoch(first_peer_device(device)->connection); in drbd_req_complete()
322 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in set_if_null_req_next() local
323 if (!connection) in set_if_null_req_next()
325 if (connection->req_next == NULL) in set_if_null_req_next()
326 connection->req_next = req; in set_if_null_req_next()
331 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in advance_conn_req_next() local
333 if (!connection) in advance_conn_req_next()
335 if (connection->req_next != req) in advance_conn_req_next()
339 list_for_each_entry_continue(iter, &connection->transfer_log, tl_requests) { in advance_conn_req_next()
347 connection->req_next = req; in advance_conn_req_next()
352 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in set_if_null_req_ack_pending() local
353 if (!connection) in set_if_null_req_ack_pending()
355 if (connection->req_ack_pending == NULL) in set_if_null_req_ack_pending()
356 connection->req_ack_pending = req; in set_if_null_req_ack_pending()
361 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in advance_conn_req_ack_pending() local
363 if (!connection) in advance_conn_req_ack_pending()
365 if (connection->req_ack_pending != req) in advance_conn_req_ack_pending()
369 list_for_each_entry_continue(iter, &connection->transfer_log, tl_requests) { in advance_conn_req_ack_pending()
377 connection->req_ack_pending = req; in advance_conn_req_ack_pending()
382 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in set_if_null_req_not_net_done() local
383 if (!connection) in set_if_null_req_not_net_done()
385 if (connection->req_not_net_done == NULL) in set_if_null_req_not_net_done()
386 connection->req_not_net_done = req; in set_if_null_req_not_net_done()
391 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in advance_conn_req_not_net_done() local
393 if (!connection) in advance_conn_req_not_net_done()
395 if (connection->req_not_net_done != req) in advance_conn_req_not_net_done()
399 list_for_each_entry_continue(iter, &connection->transfer_log, tl_requests) { in advance_conn_req_not_net_done()
407 connection->req_not_net_done = req; in advance_conn_req_not_net_done()
565 struct drbd_connection *const connection = peer_device ? peer_device->connection : NULL; in __req_mod() local
588 nc = rcu_dereference(connection->net_conf); in __req_mod()
660 drbd_queue_work(&connection->sender_work, in __req_mod()
696 drbd_queue_work(&connection->sender_work, in __req_mod()
701 nc = rcu_dereference(connection->net_conf); in __req_mod()
704 if (connection->current_tle_writes >= p) in __req_mod()
705 start_new_tl_epoch(connection); in __req_mod()
712 drbd_queue_work(&connection->sender_work, in __req_mod()
824 drbd_queue_work(&connection->sender_work, in __req_mod()
847 drbd_queue_work(&connection->sender_work, in __req_mod()
880 start_new_tl_epoch(connection); in __req_mod()
986 struct drbd_connection *connection = first_peer_device(device)->connection; in maybe_pull_ahead() local
992 nc = rcu_dereference(connection->net_conf); in maybe_pull_ahead()
996 connection->agreed_pro_version < 96) in maybe_pull_ahead()
1022 start_new_tl_epoch(first_peer_device(device)->connection); in maybe_pull_ahead()
1360 req->epoch = atomic_read(&first_peer_device(device)->connection->current_tle_nr); in drbd_send_and_submit()
1366 first_peer_device(device)->connection->current_tle_writes++; in drbd_send_and_submit()
1368 list_add_tail(&req->tl_requests, &first_peer_device(device)->connection->transfer_log); in drbd_send_and_submit()
1629 struct drbd_connection *connection, in net_timeout_reached() argument
1638 if (time_in_range(now, connection->last_reconnect_jif, connection->last_reconnect_jif + ent)) in net_timeout_reached()
1651 if (net_req->epoch == connection->send.current_epoch_nr) { in net_timeout_reached()
1674 if (time_after(now, connection->send.last_sent_barrier_jif + ent)) { in net_timeout_reached()
1676 connection->send.last_sent_barrier_jif, now, in net_timeout_reached()
1677 jiffies_to_msecs(now - connection->send.last_sent_barrier_jif), ko_count, timeout); in net_timeout_reached()
1704 struct drbd_connection *connection = first_peer_device(device)->connection; in request_timer_fn() local
1713 nc = rcu_dereference(connection->net_conf); in request_timer_fn()
1747 req_peer = connection->req_ack_pending; in request_timer_fn()
1753 req_peer = connection->req_not_net_done; in request_timer_fn()
1770 if (ent && req_peer && net_timeout_reached(req_peer, connection, now, ent, ko_count, timeout)) in request_timer_fn()
1771 _conn_request_state(connection, NS(conn, C_TIMEOUT), CS_VERBOSE | CS_HARD); in request_timer_fn()