|author||Lars Ellenberg <email@example.com>||2012-03-26 16:51:11 +0200|
|committer||Philipp Reisner <firstname.lastname@example.org>||2012-11-08 16:58:23 +0100|
drbd: fix WRITE_ACKED_BY_PEER_AND_SIS to not set RQ_NET_DONE
Signed-off-by: Philipp Reisner <email@example.com> Signed-off-by: Lars Ellenberg <firstname.lastname@example.org>
Diffstat (limited to 'drivers/block/drbd/drbd_req.c')
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index 771f29c8043..938a57bf73c 100644
@@ -587,28 +587,23 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what,
- case WRITE_ACKED_BY_PEER_AND_SIS:
- req->rq_state |= RQ_NET_SIS;
/* for discarded conflicting writes of multiple primaries,
* there is no need to keep anything in the tl, potential
* node crashes are covered by the activity log. */
req->rq_state |= RQ_NET_DONE;
/* fall through */
+ case WRITE_ACKED_BY_PEER_AND_SIS:
+ if (what == WRITE_ACKED_BY_PEER_AND_SIS)
+ req->rq_state |= RQ_NET_SIS;
D_ASSERT(req->rq_state & RQ_EXP_WRITE_ACK);
/* protocol C; successfully written on peer.
- * Nothing to do here.
+ * Nothing more to do here.
* We want to keep the tl in place for all protocols, to cater
- * for volatile write-back caches on lower level devices.
- * A barrier request is expected to have forced all prior
- * requests onto stable storage, so completion of a barrier
- * request could set NET_DONE right here, and not wait for the
- * P_BARRIER_ACK, but that is an unnecessary optimization. */
+ * for volatile write-back caches on lower level devices. */
- /* this makes it effectively the same as for: */
D_ASSERT(req->rq_state & RQ_EXP_RECEIVE_ACK);
/* protocol B; pretends to be successfully written on peer.