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()
271 req->epoch == atomic_read(&first_peer_device(device)->connection->current_tle_nr)) in drbd_req_complete()
272 start_new_tl_epoch(first_peer_device(device)->connection); in drbd_req_complete()
338 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in set_if_null_req_next() local
339 if (!connection) in set_if_null_req_next()
341 if (connection->req_next == NULL) in set_if_null_req_next()
342 connection->req_next = req; in set_if_null_req_next()
347 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in advance_conn_req_next() local
348 if (!connection) in advance_conn_req_next()
350 if (connection->req_next != req) in advance_conn_req_next()
352 list_for_each_entry_continue(req, &connection->transfer_log, tl_requests) { in advance_conn_req_next()
357 if (&req->tl_requests == &connection->transfer_log) in advance_conn_req_next()
359 connection->req_next = req; in advance_conn_req_next()
364 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in set_if_null_req_ack_pending() local
365 if (!connection) in set_if_null_req_ack_pending()
367 if (connection->req_ack_pending == NULL) in set_if_null_req_ack_pending()
368 connection->req_ack_pending = req; in set_if_null_req_ack_pending()
373 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in advance_conn_req_ack_pending() local
374 if (!connection) in advance_conn_req_ack_pending()
376 if (connection->req_ack_pending != req) in advance_conn_req_ack_pending()
378 list_for_each_entry_continue(req, &connection->transfer_log, tl_requests) { in advance_conn_req_ack_pending()
383 if (&req->tl_requests == &connection->transfer_log) in advance_conn_req_ack_pending()
385 connection->req_ack_pending = req; in advance_conn_req_ack_pending()
390 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in set_if_null_req_not_net_done() local
391 if (!connection) in set_if_null_req_not_net_done()
393 if (connection->req_not_net_done == NULL) in set_if_null_req_not_net_done()
394 connection->req_not_net_done = req; in set_if_null_req_not_net_done()
399 struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; in advance_conn_req_not_net_done() local
400 if (!connection) in advance_conn_req_not_net_done()
402 if (connection->req_not_net_done != req) in advance_conn_req_not_net_done()
404 list_for_each_entry_continue(req, &connection->transfer_log, tl_requests) { in advance_conn_req_not_net_done()
409 if (&req->tl_requests == &connection->transfer_log) in advance_conn_req_not_net_done()
411 connection->req_not_net_done = req; in advance_conn_req_not_net_done()
583 struct drbd_connection *const connection = peer_device ? peer_device->connection : NULL; in __req_mod() local
606 nc = rcu_dereference(connection->net_conf); in __req_mod()
678 drbd_queue_work(&connection->sender_work, in __req_mod()
714 drbd_queue_work(&connection->sender_work, in __req_mod()
719 nc = rcu_dereference(connection->net_conf); in __req_mod()
722 if (connection->current_tle_writes >= p) in __req_mod()
723 start_new_tl_epoch(connection); in __req_mod()
730 drbd_queue_work(&connection->sender_work, in __req_mod()
841 drbd_queue_work(&connection->sender_work, in __req_mod()
864 drbd_queue_work(&connection->sender_work, in __req_mod()
897 start_new_tl_epoch(connection); in __req_mod()
1001 struct drbd_connection *connection = first_peer_device(device)->connection; in maybe_pull_ahead() local
1007 nc = rcu_dereference(connection->net_conf); in maybe_pull_ahead()
1011 connection->agreed_pro_version < 96) in maybe_pull_ahead()
1037 start_new_tl_epoch(first_peer_device(device)->connection); in maybe_pull_ahead()
1265 req->epoch = atomic_read(&first_peer_device(device)->connection->current_tle_nr); in drbd_send_and_submit()
1271 first_peer_device(device)->connection->current_tle_writes++; in drbd_send_and_submit()
1273 list_add_tail(&req->tl_requests, &first_peer_device(device)->connection->transfer_log); in drbd_send_and_submit()
1519 struct drbd_connection *connection = first_peer_device(device)->connection; in request_timer_fn() local
1527 nc = rcu_dereference(connection->net_conf); in request_timer_fn()
1548 req_peer = connection->req_not_net_done; in request_timer_fn()
1551 if (!req_peer && connection->req_next && connection->req_next->pre_send_jif) in request_timer_fn()
1552 req_peer = connection->req_next; in request_timer_fn()
1587 !time_in_range(now, connection->last_reconnect_jif, connection->last_reconnect_jif + ent)) { in request_timer_fn()
1589 _conn_request_state(connection, NS(conn, C_TIMEOUT), CS_VERBOSE | CS_HARD); in request_timer_fn()