Lines Matching refs:connection
160 static void wake_all_senders(struct drbd_connection *connection) in wake_all_senders() argument
162 wake_up(&connection->sender_work.q_wait); in wake_all_senders()
166 void start_new_tl_epoch(struct drbd_connection *connection) in start_new_tl_epoch() argument
169 if (connection->current_tle_writes == 0) in start_new_tl_epoch()
172 connection->current_tle_writes = 0; in start_new_tl_epoch()
173 atomic_inc(&connection->current_tle_nr); in start_new_tl_epoch()
174 wake_all_senders(connection); in start_new_tl_epoch()
245 req->epoch == atomic_read(&first_peer_device(device)->connection->current_tle_nr)) in drbd_req_complete()
246 start_new_tl_epoch(first_peer_device(device)->connection); in drbd_req_complete()
323 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in set_if_null_req_next() local
324 if (!connection) in set_if_null_req_next()
326 if (connection->req_next == NULL) in set_if_null_req_next()
327 connection->req_next = req; in set_if_null_req_next()
332 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()
337 list_for_each_entry_continue(req, &connection->transfer_log, tl_requests) { in advance_conn_req_next()
342 if (&req->tl_requests == &connection->transfer_log) in advance_conn_req_next()
344 connection->req_next = req; in advance_conn_req_next()
349 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in set_if_null_req_ack_pending() local
350 if (!connection) in set_if_null_req_ack_pending()
352 if (connection->req_ack_pending == NULL) in set_if_null_req_ack_pending()
353 connection->req_ack_pending = req; in set_if_null_req_ack_pending()
358 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in advance_conn_req_ack_pending() local
359 if (!connection) in advance_conn_req_ack_pending()
361 if (connection->req_ack_pending != req) in advance_conn_req_ack_pending()
363 list_for_each_entry_continue(req, &connection->transfer_log, tl_requests) { in advance_conn_req_ack_pending()
368 if (&req->tl_requests == &connection->transfer_log) in advance_conn_req_ack_pending()
370 connection->req_ack_pending = req; in advance_conn_req_ack_pending()
375 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in set_if_null_req_not_net_done() local
376 if (!connection) in set_if_null_req_not_net_done()
378 if (connection->req_not_net_done == NULL) in set_if_null_req_not_net_done()
379 connection->req_not_net_done = req; in set_if_null_req_not_net_done()
384 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in advance_conn_req_not_net_done() local
385 if (!connection) in advance_conn_req_not_net_done()
387 if (connection->req_not_net_done != req) in advance_conn_req_not_net_done()
389 list_for_each_entry_continue(req, &connection->transfer_log, tl_requests) { in advance_conn_req_not_net_done()
394 if (&req->tl_requests == &connection->transfer_log) in advance_conn_req_not_net_done()
396 connection->req_not_net_done = req; in advance_conn_req_not_net_done()
553 struct drbd_connection *const connection = peer_device ? peer_device->connection : NULL; in __req_mod() local
576 nc = rcu_dereference(connection->net_conf); in __req_mod()
648 drbd_queue_work(&connection->sender_work, in __req_mod()
684 drbd_queue_work(&connection->sender_work, in __req_mod()
689 nc = rcu_dereference(connection->net_conf); in __req_mod()
692 if (connection->current_tle_writes >= p) in __req_mod()
693 start_new_tl_epoch(connection); in __req_mod()
700 drbd_queue_work(&connection->sender_work, in __req_mod()
811 drbd_queue_work(&connection->sender_work, in __req_mod()
834 drbd_queue_work(&connection->sender_work, in __req_mod()
867 start_new_tl_epoch(connection); in __req_mod()
975 struct drbd_connection *connection = first_peer_device(device)->connection; in maybe_pull_ahead() local
981 nc = rcu_dereference(connection->net_conf); in maybe_pull_ahead()
985 connection->agreed_pro_version < 96) in maybe_pull_ahead()
1011 start_new_tl_epoch(first_peer_device(device)->connection); in maybe_pull_ahead()
1346 req->epoch = atomic_read(&first_peer_device(device)->connection->current_tle_nr); in drbd_send_and_submit()
1352 first_peer_device(device)->connection->current_tle_writes++; in drbd_send_and_submit()
1354 list_add_tail(&req->tl_requests, &first_peer_device(device)->connection->transfer_log); in drbd_send_and_submit()
1617 struct drbd_connection *connection, in net_timeout_reached() argument
1626 if (time_in_range(now, connection->last_reconnect_jif, connection->last_reconnect_jif + ent)) in net_timeout_reached()
1639 if (net_req->epoch == connection->send.current_epoch_nr) { in net_timeout_reached()
1662 if (time_after(now, connection->send.last_sent_barrier_jif + ent)) { in net_timeout_reached()
1664 connection->send.last_sent_barrier_jif, now, in net_timeout_reached()
1665 jiffies_to_msecs(now - connection->send.last_sent_barrier_jif), ko_count, timeout); in net_timeout_reached()
1691 struct drbd_connection *connection = first_peer_device(device)->connection; in request_timer_fn() local
1700 nc = rcu_dereference(connection->net_conf); in request_timer_fn()
1734 req_peer = connection->req_ack_pending; in request_timer_fn()
1740 req_peer = connection->req_not_net_done; in request_timer_fn()
1757 if (ent && req_peer && net_timeout_reached(req_peer, connection, now, ent, ko_count, timeout)) in request_timer_fn()
1758 _conn_request_state(connection, NS(conn, C_TIMEOUT), CS_VERBOSE | CS_HARD); in request_timer_fn()