drbd: fix READ_RETRY_REMOTE_CANCELED to not complete if device is suspended
authorLars Ellenberg <lars.ellenberg@linbit.com>
Wed, 11 Jan 2012 08:46:48 +0000 (09:46 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Wed, 9 May 2012 13:16:48 +0000 (15:16 +0200)
READ_RETRY_REMOTE_CANCELED needs to be grouped with the other _CANCELED
cases, not with CONNECTION_LOST_WHILE_PENDING, as that would complete
(fail) the bio even if the device became suspended.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_req.c

index bfed0834cd6ffcfe07b31c46072d17b6b245c667..2a246ac84d7f9c7009c20261538946302153dcaf 100644 (file)
@@ -569,6 +569,7 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what,
                drbd_queue_work(&mdev->data.work, &req->w);
                break;
 
+       case read_retry_remote_canceled:
        case send_canceled:
        case send_failed:
                /* real cleanup will be done from tl_clear.  just update flags
@@ -610,9 +611,6 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what,
                _req_may_be_done_not_susp(req, m);
                break;
 
-       case read_retry_remote_canceled:
-               req->rq_state &= ~RQ_NET_QUEUED;
-               /* fall through, in case we raced with drbd_disconnect */
        case connection_lost_while_pending:
                /* transfer log cleanup after connection loss */
                /* assert something? */