Commit 45d2933c authored by Lars Ellenberg's avatar Lars Ellenberg Committed by Philipp Reisner

drbd: also keep track of trim -> zero-out fallback peer_requests

To be able to find and present such zero-out fallback peer_requests
in debugfs, we add those to "active_ee", once that list drained.
Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent b9ed7080
...@@ -1370,6 +1370,11 @@ int drbd_submit_peer_request(struct drbd_device *device, ...@@ -1370,6 +1370,11 @@ int drbd_submit_peer_request(struct drbd_device *device,
/* wait for all pending IO completions, before we start /* wait for all pending IO completions, before we start
* zeroing things out. */ * zeroing things out. */
conn_wait_active_ee_empty(first_peer_device(device)->connection); conn_wait_active_ee_empty(first_peer_device(device)->connection);
/* add it to the active list now,
* so we can find it to present it in debugfs */
spin_lock_irq(&device->resource->req_lock);
list_add_tail(&peer_req->w.list, &device->active_ee);
spin_unlock_irq(&device->resource->req_lock);
if (blkdev_issue_zeroout(device->ldev->backing_bdev, if (blkdev_issue_zeroout(device->ldev->backing_bdev,
sector, ds >> 9, GFP_NOIO)) sector, ds >> 9, GFP_NOIO))
peer_req->flags |= EE_WAS_ERROR; peer_req->flags |= EE_WAS_ERROR;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment