return NULL;
}
-static void reclaim_net_ee(struct drbd_conf *mdev, struct list_head *to_be_freed)
+static void reclaim_finished_net_peer_reqs(struct drbd_conf *mdev,
+ struct list_head *to_be_freed)
{
struct drbd_peer_request *peer_req;
struct list_head *le, *tle;
struct drbd_peer_request *peer_req, *t;
spin_lock_irq(&mdev->tconn->req_lock);
- reclaim_net_ee(mdev, &reclaimed);
+ reclaim_finished_net_peer_reqs(mdev, &reclaimed);
spin_unlock_irq(&mdev->tconn->req_lock);
list_for_each_entry_safe(peer_req, t, &reclaimed, w.list)
drbd_alloc_peer_req()
drbd_free_peer_reqs()
drbd_ee_fix_bhs()
- drbd_process_done_ee()
+ drbd_finish_peer_reqs()
drbd_clear_done_ee()
drbd_wait_ee_list_empty()
*/
return count;
}
-
-/* See also comments in _req_mod(,BARRIER_ACKED)
- * and receive_Barrier.
- *
- * Move entries from net_ee to done_ee, if ready.
- * Grab done_ee, call all callbacks, free the entries.
- * The callbacks typically send out ACKs.
+/*
+ * See also comments in _req_mod(,BARRIER_ACKED) and receive_Barrier.
*/
-static int drbd_process_done_ee(struct drbd_conf *mdev)
+static int drbd_finish_peer_reqs(struct drbd_conf *mdev)
{
LIST_HEAD(work_list);
LIST_HEAD(reclaimed);
int err = 0;
spin_lock_irq(&mdev->tconn->req_lock);
- reclaim_net_ee(mdev, &reclaimed);
+ reclaim_finished_net_peer_reqs(mdev, &reclaimed);
list_splice_init(&mdev->done_ee, &work_list);
spin_unlock_irq(&mdev->tconn->req_lock);
return 0;
}
-/* e_end_resync_block() is called via
- * drbd_process_done_ee() by asender only */
+/*
+ * e_end_resync_block() is called in asender context via
+ * drbd_finish_peer_reqs().
+ */
static int e_end_resync_block(struct drbd_work *w, int unused)
{
struct drbd_peer_request *peer_req =
}
}
-/* e_end_block() is called via drbd_process_done_ee().
- * this means this function only runs in the asender thread
+/*
+ * e_end_block() is called in asender context via drbd_finish_peer_reqs().
*/
static int e_end_block(struct drbd_work *w, int cancel)
{
* to be "canceled" */
drbd_flush_workqueue(mdev);
- /* This also does reclaim_net_ee(). If we do this too early, we might
- * miss some resync ee and pages.*/
- drbd_process_done_ee(mdev);
+ drbd_finish_peer_reqs(mdev);
kfree(mdev->p_uuid);
mdev->p_uuid = NULL;
return 0;
}
-static int tconn_process_done_ee(struct drbd_tconn *tconn)
+static int tconn_finish_peer_reqs(struct drbd_tconn *tconn)
{
struct drbd_conf *mdev;
int i, not_empty = 0;
clear_bit(SIGNAL_ASENDER, &tconn->flags);
flush_signals(current);
idr_for_each_entry(&tconn->volumes, mdev, i) {
- if (drbd_process_done_ee(mdev))
+ if (drbd_finish_peer_reqs(mdev))
return 1; /* error */
}
set_bit(SIGNAL_ASENDER, &tconn->flags);
much to send */
if (!tconn->net_conf->no_cork)
drbd_tcp_cork(tconn->meta.socket);
- if (tconn_process_done_ee(tconn)) {
- conn_err(tconn, "tconn_process_done_ee() failed\n");
+ if (tconn_finish_peer_reqs(tconn)) {
+ conn_err(tconn, "tconn_finish_peer_reqs() failed\n");
goto reconnect;
}
/* but unconditionally uncork unless disabled */