Lines Matching refs:connection
163 static void wake_all_senders(struct drbd_connection *connection) in wake_all_senders() argument
165 wake_up(&connection->sender_work.q_wait); in wake_all_senders()
169 void start_new_tl_epoch(struct drbd_connection *connection) in start_new_tl_epoch() argument
172 if (connection->current_tle_writes == 0) in start_new_tl_epoch()
175 connection->current_tle_writes = 0; in start_new_tl_epoch()
176 atomic_inc(&connection->current_tle_nr); in start_new_tl_epoch()
177 wake_all_senders(connection); in start_new_tl_epoch()
247 req->epoch == atomic_read(&first_peer_device(device)->connection->current_tle_nr)) in drbd_req_complete()
248 start_new_tl_epoch(first_peer_device(device)->connection); in drbd_req_complete()
325 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in set_if_null_req_next() local
326 if (!connection) in set_if_null_req_next()
328 if (connection->req_next == NULL) in set_if_null_req_next()
329 connection->req_next = req; in set_if_null_req_next()
334 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in advance_conn_req_next() local
335 if (!connection) in advance_conn_req_next()
337 if (connection->req_next != req) in advance_conn_req_next()
339 list_for_each_entry_continue(req, &connection->transfer_log, tl_requests) { in advance_conn_req_next()
344 if (&req->tl_requests == &connection->transfer_log) in advance_conn_req_next()
346 connection->req_next = req; in advance_conn_req_next()
351 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in set_if_null_req_ack_pending() local
352 if (!connection) in set_if_null_req_ack_pending()
354 if (connection->req_ack_pending == NULL) in set_if_null_req_ack_pending()
355 connection->req_ack_pending = req; in set_if_null_req_ack_pending()
360 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in advance_conn_req_ack_pending() local
361 if (!connection) in advance_conn_req_ack_pending()
363 if (connection->req_ack_pending != req) in advance_conn_req_ack_pending()
365 list_for_each_entry_continue(req, &connection->transfer_log, tl_requests) { in advance_conn_req_ack_pending()
370 if (&req->tl_requests == &connection->transfer_log) in advance_conn_req_ack_pending()
372 connection->req_ack_pending = req; in advance_conn_req_ack_pending()
377 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in set_if_null_req_not_net_done() local
378 if (!connection) in set_if_null_req_not_net_done()
380 if (connection->req_not_net_done == NULL) in set_if_null_req_not_net_done()
381 connection->req_not_net_done = req; in set_if_null_req_not_net_done()
386 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in advance_conn_req_not_net_done() local
387 if (!connection) in advance_conn_req_not_net_done()
389 if (connection->req_not_net_done != req) in advance_conn_req_not_net_done()
391 list_for_each_entry_continue(req, &connection->transfer_log, tl_requests) { in advance_conn_req_not_net_done()
396 if (&req->tl_requests == &connection->transfer_log) in advance_conn_req_not_net_done()
398 connection->req_not_net_done = req; in advance_conn_req_not_net_done()
555 struct drbd_connection *const connection = peer_device ? peer_device->connection : NULL; in __req_mod() local
578 nc = rcu_dereference(connection->net_conf); in __req_mod()
650 drbd_queue_work(&connection->sender_work, in __req_mod()
686 drbd_queue_work(&connection->sender_work, in __req_mod()
691 nc = rcu_dereference(connection->net_conf); in __req_mod()
694 if (connection->current_tle_writes >= p) in __req_mod()
695 start_new_tl_epoch(connection); in __req_mod()
702 drbd_queue_work(&connection->sender_work, in __req_mod()
814 drbd_queue_work(&connection->sender_work, in __req_mod()
837 drbd_queue_work(&connection->sender_work, in __req_mod()
870 start_new_tl_epoch(connection); in __req_mod()
977 struct drbd_connection *connection = first_peer_device(device)->connection; in maybe_pull_ahead() local
983 nc = rcu_dereference(connection->net_conf); in maybe_pull_ahead()
987 connection->agreed_pro_version < 96) in maybe_pull_ahead()
1013 start_new_tl_epoch(first_peer_device(device)->connection); in maybe_pull_ahead()
1348 req->epoch = atomic_read(&first_peer_device(device)->connection->current_tle_nr); in drbd_send_and_submit()
1354 first_peer_device(device)->connection->current_tle_writes++; in drbd_send_and_submit()
1356 list_add_tail(&req->tl_requests, &first_peer_device(device)->connection->transfer_log); in drbd_send_and_submit()
1615 struct drbd_connection *connection, in net_timeout_reached() argument
1624 if (time_in_range(now, connection->last_reconnect_jif, connection->last_reconnect_jif + ent)) in net_timeout_reached()
1637 if (net_req->epoch == connection->send.current_epoch_nr) { in net_timeout_reached()
1660 if (time_after(now, connection->send.last_sent_barrier_jif + ent)) { in net_timeout_reached()
1662 connection->send.last_sent_barrier_jif, now, in net_timeout_reached()
1663 jiffies_to_msecs(now - connection->send.last_sent_barrier_jif), ko_count, timeout); in net_timeout_reached()
1689 struct drbd_connection *connection = first_peer_device(device)->connection; in request_timer_fn() local
1698 nc = rcu_dereference(connection->net_conf); in request_timer_fn()
1732 req_peer = connection->req_ack_pending; in request_timer_fn()
1738 req_peer = connection->req_not_net_done; in request_timer_fn()
1755 if (ent && req_peer && net_timeout_reached(req_peer, connection, now, ent, ko_count, timeout)) in request_timer_fn()
1756 _conn_request_state(connection, NS(conn, C_TIMEOUT), CS_VERBOSE | CS_HARD); in request_timer_fn()