Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8cdc343 authored by Philipp Reisner's avatar Philipp Reisner
Browse files

drbd: Consider that read requests could be NEG_ACKEDed



ap_in_flight only counts writes. NEG_ACKED is an action
on a request that might be called for reads and writes.

This bug was there forever, but it becomes much more
relevant with the read balincing code.

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent 6ab9b1b6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -628,6 +628,7 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what,
		/* assert something? */
		if (req->rq_state & RQ_NET_PENDING) {
			dec_ap_pending(mdev);
			if (req->rq_state & RQ_WRITE)
				atomic_sub(req->i.size >> 9, &mdev->ap_in_flight);
		}
		req->rq_state &= ~(RQ_NET_OK|RQ_NET_PENDING);