Commit 97ddb687 authored by Lars Ellenberg's avatar Lars Ellenberg Committed by Philipp Reisner

drbd: detach must not try to abort non-local requests

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent f497609e
...@@ -501,6 +501,8 @@ void tl_abort_disk_io(struct drbd_conf *mdev) ...@@ -501,6 +501,8 @@ void tl_abort_disk_io(struct drbd_conf *mdev)
while (b) { while (b) {
list_for_each_safe(le, tle, &b->requests) { list_for_each_safe(le, tle, &b->requests) {
req = list_entry(le, struct drbd_request, tl_requests); req = list_entry(le, struct drbd_request, tl_requests);
if (!(req->rq_state & RQ_LOCAL_PENDING))
continue;
if (req->w.mdev == mdev) if (req->w.mdev == mdev)
_req_mod(req, ABORT_DISK_IO); _req_mod(req, ABORT_DISK_IO);
} }
...@@ -509,6 +511,8 @@ void tl_abort_disk_io(struct drbd_conf *mdev) ...@@ -509,6 +511,8 @@ void tl_abort_disk_io(struct drbd_conf *mdev)
list_for_each_safe(le, tle, &tconn->barrier_acked_requests) { list_for_each_safe(le, tle, &tconn->barrier_acked_requests) {
req = list_entry(le, struct drbd_request, tl_requests); req = list_entry(le, struct drbd_request, tl_requests);
if (!(req->rq_state & RQ_LOCAL_PENDING))
continue;
if (req->w.mdev == mdev) if (req->w.mdev == mdev)
_req_mod(req, ABORT_DISK_IO); _req_mod(req, ABORT_DISK_IO);
} }
......
...@@ -436,6 +436,7 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what, ...@@ -436,6 +436,7 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what,
/* so we can verify the handle in the answer packet /* so we can verify the handle in the answer packet
* corresponding hlist_del is in _req_may_be_done() */ * corresponding hlist_del is in _req_may_be_done() */
D_ASSERT(drbd_interval_empty(&req->i));
drbd_insert_interval(&mdev->read_requests, &req->i); drbd_insert_interval(&mdev->read_requests, &req->i);
set_bit(UNPLUG_REMOTE, &mdev->flags); set_bit(UNPLUG_REMOTE, &mdev->flags);
...@@ -453,6 +454,7 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what, ...@@ -453,6 +454,7 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what,
/* from __drbd_make_request only */ /* from __drbd_make_request only */
/* corresponding hlist_del is in _req_may_be_done() */ /* corresponding hlist_del is in _req_may_be_done() */
D_ASSERT(drbd_interval_empty(&req->i));
drbd_insert_interval(&mdev->write_requests, &req->i); drbd_insert_interval(&mdev->write_requests, &req->i);
/* NOTE /* NOTE
......
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