aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_req.c
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2012-01-11 03:43:25 -0500
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-05-09 09:16:47 -0400
commit6d49e101fd3d3dbd525564923a82fb8a66676420 (patch)
tree4743983d507e7a1de469741d617ac7e38d0d10b5 /drivers/block/drbd/drbd_req.c
parentc088b2d904445f501c5aa7a6fc63ca9e8b96f224 (diff)
drbd: make OOS_HANDED_TO_NETWORK its own case
OOS_HANDED_TO_NETWORK should not be grouped with the various *_CANCELED/*_FAILED cases. Also, not only clear the RQ_NET_QUEUED flag, but also mark it RQ_NET_DONE, so it can be distinguished from a local-only request even after that. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_req.c')
-rw-r--r--drivers/block/drbd/drbd_req.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index de319ba54241..bfed0834cd6f 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -569,10 +569,7 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what,
569 drbd_queue_work(&mdev->data.work, &req->w); 569 drbd_queue_work(&mdev->data.work, &req->w);
570 break; 570 break;
571 571
572 case oos_handed_to_network:
573 /* actually the same */
574 case send_canceled: 572 case send_canceled:
575 /* treat it the same */
576 case send_failed: 573 case send_failed:
577 /* real cleanup will be done from tl_clear. just update flags 574 /* real cleanup will be done from tl_clear. just update flags
578 * so it is no longer marked as on the worker queue */ 575 * so it is no longer marked as on the worker queue */
@@ -602,11 +599,14 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what,
602 } 599 }
603 req->rq_state &= ~RQ_NET_QUEUED; 600 req->rq_state &= ~RQ_NET_QUEUED;
604 req->rq_state |= RQ_NET_SENT; 601 req->rq_state |= RQ_NET_SENT;
605 /* because _drbd_send_zc_bio could sleep, and may want to 602 _req_may_be_done_not_susp(req, m);
606 * dereference the bio even after the "write_acked_by_peer" and 603 break;
607 * "completed_ok" events came in, once we return from 604
608 * _drbd_send_zc_bio (drbd_send_dblock), we have to check 605 case oos_handed_to_network:
609 * whether it is done already, and end it. */ 606 /* Was not set PENDING, no longer QUEUED, so is now DONE
607 * as far as this connection is concerned. */
608 req->rq_state &= ~RQ_NET_QUEUED;
609 req->rq_state |= RQ_NET_DONE;
610 _req_may_be_done_not_susp(req, m); 610 _req_may_be_done_not_susp(req, m);
611 break; 611 break;
612 612