aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2012-03-23 09:42:19 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-05-09 09:16:50 -0400
commitd64957c9a9757642f59aa4a63dadf159b2694bab (patch)
treea127150d74df0c9cb9ada387427db790fa489c5f /drivers/block/drbd
parent41c4a0035b36d400b79cbd945390a76e909711a7 (diff)
drbd: fix WRITE_ACKED_BY_PEER_AND_SIS to not set RQ_NET_DONE
Just because this request happened during a resync does not mean it may pretend to have been barrier-acked. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r--drivers/block/drbd/drbd_req.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index 2a246ac84d7f..cd7687fad9e6 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -627,8 +627,6 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what,
627 _req_may_be_done(req, m); /* Allowed while state.susp */ 627 _req_may_be_done(req, m); /* Allowed while state.susp */
628 break; 628 break;
629 629
630 case write_acked_by_peer_and_sis:
631 req->rq_state |= RQ_NET_SIS;
632 case conflict_discarded_by_peer: 630 case conflict_discarded_by_peer:
633 /* for discarded conflicting writes of multiple primaries, 631 /* for discarded conflicting writes of multiple primaries,
634 * there is no need to keep anything in the tl, potential 632 * there is no need to keep anything in the tl, potential
@@ -639,18 +637,15 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what,
639 (unsigned long long)req->sector, req->size); 637 (unsigned long long)req->sector, req->size);
640 req->rq_state |= RQ_NET_DONE; 638 req->rq_state |= RQ_NET_DONE;
641 /* fall through */ 639 /* fall through */
640 case write_acked_by_peer_and_sis:
642 case write_acked_by_peer: 641 case write_acked_by_peer:
642 if (what == write_acked_by_peer_and_sis)
643 req->rq_state |= RQ_NET_SIS;
643 /* protocol C; successfully written on peer. 644 /* protocol C; successfully written on peer.
644 * Nothing to do here. 645 * Nothing more to do here.
645 * We want to keep the tl in place for all protocols, to cater 646 * We want to keep the tl in place for all protocols, to cater
646 * for volatile write-back caches on lower level devices. 647 * for volatile write-back caches on lower level devices. */
647 *
648 * A barrier request is expected to have forced all prior
649 * requests onto stable storage, so completion of a barrier
650 * request could set NET_DONE right here, and not wait for the
651 * P_BARRIER_ACK, but that is an unnecessary optimization. */
652 648
653 /* this makes it effectively the same as for: */
654 case recv_acked_by_peer: 649 case recv_acked_by_peer:
655 /* protocol B; pretends to be successfully written on peer. 650 /* protocol B; pretends to be successfully written on peer.
656 * see also notes above in handed_over_to_network about 651 * see also notes above in handed_over_to_network about