Commit 76590cd1 authored by Philipp Reisner's avatar Philipp Reisner

drbd: Fix postponed requests

A postponed request might has RQ_IN_ACT_LOG already set, but
is POSTPONED before it gets something in the RQ_LOCAL_MASK
set. Up to now this caused a left-over active extent.

Fix that by only testing for the RQ_IN_ACT_LOG bit in drbd_req_destroy()
Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent 19fffd7b
...@@ -141,9 +141,8 @@ void drbd_req_destroy(struct kref *kref) ...@@ -141,9 +141,8 @@ void drbd_req_destroy(struct kref *kref)
* but after the extent has been dropped from the al, * but after the extent has been dropped from the al,
* we would forget to resync the corresponding extent. * we would forget to resync the corresponding extent.
*/ */
if (s & RQ_LOCAL_MASK) { if (s & RQ_IN_ACT_LOG) {
if (get_ldev_if_state(mdev, D_FAILED)) { if (get_ldev_if_state(mdev, D_FAILED)) {
if (s & RQ_IN_ACT_LOG)
drbd_al_complete_io(mdev, &req->i); drbd_al_complete_io(mdev, &req->i);
put_ldev(mdev); put_ldev(mdev);
} else if (__ratelimit(&drbd_ratelimit_state)) { } else if (__ratelimit(&drbd_ratelimit_state)) {
......
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