Lines Matching refs:connection

184 static void wake_all_senders(struct drbd_connection *connection)  in wake_all_senders()  argument
186 wake_up(&connection->sender_work.q_wait); in wake_all_senders()
190 void start_new_tl_epoch(struct drbd_connection *connection) in start_new_tl_epoch() argument
193 if (connection->current_tle_writes == 0) in start_new_tl_epoch()
196 connection->current_tle_writes = 0; in start_new_tl_epoch()
197 atomic_inc(&connection->current_tle_nr); in start_new_tl_epoch()
198 wake_all_senders(connection); in start_new_tl_epoch()
270 req->epoch == atomic_read(&first_peer_device(device)->connection->current_tle_nr)) in drbd_req_complete()
271 start_new_tl_epoch(first_peer_device(device)->connection); in drbd_req_complete()
337 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in set_if_null_req_next() local
338 if (!connection) in set_if_null_req_next()
340 if (connection->req_next == NULL) in set_if_null_req_next()
341 connection->req_next = req; in set_if_null_req_next()
346 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in advance_conn_req_next() local
347 if (!connection) in advance_conn_req_next()
349 if (connection->req_next != req) in advance_conn_req_next()
351 list_for_each_entry_continue(req, &connection->transfer_log, tl_requests) { in advance_conn_req_next()
356 if (&req->tl_requests == &connection->transfer_log) in advance_conn_req_next()
358 connection->req_next = req; in advance_conn_req_next()
363 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in set_if_null_req_ack_pending() local
364 if (!connection) in set_if_null_req_ack_pending()
366 if (connection->req_ack_pending == NULL) in set_if_null_req_ack_pending()
367 connection->req_ack_pending = req; in set_if_null_req_ack_pending()
372 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in advance_conn_req_ack_pending() local
373 if (!connection) in advance_conn_req_ack_pending()
375 if (connection->req_ack_pending != req) in advance_conn_req_ack_pending()
377 list_for_each_entry_continue(req, &connection->transfer_log, tl_requests) { in advance_conn_req_ack_pending()
382 if (&req->tl_requests == &connection->transfer_log) in advance_conn_req_ack_pending()
384 connection->req_ack_pending = req; in advance_conn_req_ack_pending()
389 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in set_if_null_req_not_net_done() local
390 if (!connection) in set_if_null_req_not_net_done()
392 if (connection->req_not_net_done == NULL) in set_if_null_req_not_net_done()
393 connection->req_not_net_done = req; in set_if_null_req_not_net_done()
398 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in advance_conn_req_not_net_done() local
399 if (!connection) in advance_conn_req_not_net_done()
401 if (connection->req_not_net_done != req) in advance_conn_req_not_net_done()
403 list_for_each_entry_continue(req, &connection->transfer_log, tl_requests) { in advance_conn_req_not_net_done()
408 if (&req->tl_requests == &connection->transfer_log) in advance_conn_req_not_net_done()
410 connection->req_not_net_done = req; in advance_conn_req_not_net_done()
582 struct drbd_connection *const connection = peer_device ? peer_device->connection : NULL; in __req_mod() local
605 nc = rcu_dereference(connection->net_conf); in __req_mod()
677 drbd_queue_work(&connection->sender_work, in __req_mod()
713 drbd_queue_work(&connection->sender_work, in __req_mod()
718 nc = rcu_dereference(connection->net_conf); in __req_mod()
721 if (connection->current_tle_writes >= p) in __req_mod()
722 start_new_tl_epoch(connection); in __req_mod()
729 drbd_queue_work(&connection->sender_work, in __req_mod()
840 drbd_queue_work(&connection->sender_work, in __req_mod()
863 drbd_queue_work(&connection->sender_work, in __req_mod()
896 start_new_tl_epoch(connection); in __req_mod()
1000 struct drbd_connection *connection = first_peer_device(device)->connection; in maybe_pull_ahead() local
1006 nc = rcu_dereference(connection->net_conf); in maybe_pull_ahead()
1010 connection->agreed_pro_version < 96) in maybe_pull_ahead()
1036 start_new_tl_epoch(first_peer_device(device)->connection); in maybe_pull_ahead()
1263 req->epoch = atomic_read(&first_peer_device(device)->connection->current_tle_nr); in drbd_send_and_submit()
1269 first_peer_device(device)->connection->current_tle_writes++; in drbd_send_and_submit()
1271 list_add_tail(&req->tl_requests, &first_peer_device(device)->connection->transfer_log); in drbd_send_and_submit()
1549 struct drbd_connection *connection = first_peer_device(device)->connection; in request_timer_fn() local
1557 nc = rcu_dereference(connection->net_conf); in request_timer_fn()
1578 req_peer = connection->req_not_net_done; in request_timer_fn()
1581 if (!req_peer && connection->req_next && connection->req_next->pre_send_jif) in request_timer_fn()
1582 req_peer = connection->req_next; in request_timer_fn()
1617 !time_in_range(now, connection->last_reconnect_jif, connection->last_reconnect_jif + ent)) { in request_timer_fn()
1619 _conn_request_state(connection, NS(conn, C_TIMEOUT), CS_VERBOSE | CS_HARD); in request_timer_fn()