aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_receiver.c
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2014-03-20 11:19:22 +0100
committerPhilipp Reisner <philipp.reisner@linbit.com>2014-07-10 18:35:02 +0200
commit08d0dabf48ccf55e310b8ae9381858b477cabe2e (patch)
treef59b53661650af6df67e71e958ca981ec0e2cdd6 /drivers/block/drbd/drbd_receiver.c
parentdrbd: New net configuration option socket-check-timeout (diff)
downloadlinux-dev-08d0dabf48ccf55e310b8ae9381858b477cabe2e.tar.xz
linux-dev-08d0dabf48ccf55e310b8ae9381858b477cabe2e.zip
drbd: application writes may set-in-sync in protocol != C
If "dirty" blocks are written to during resync, that brings them in-sync. By explicitly requesting write-acks during resync even in protocol != C, we now can actually respect this. 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_receiver.c')
-rw-r--r--drivers/block/drbd/drbd_receiver.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index b89e6fb468c6..3a3c4893ea26 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -1930,6 +1930,7 @@ static int e_end_block(struct drbd_work *w, int cancel)
}
dec_unacked(device);
}
+
/* we delete from the conflict detection hash _after_ we sent out the
* P_WRITE_ACK / P_NEG_ACK, to get the sequence number right. */
if (peer_req->flags & EE_IN_INTERVAL_TREE) {
@@ -2156,6 +2157,8 @@ static int handle_write_conflicts(struct drbd_device *device,
drbd_for_each_overlap(i, &device->write_requests, sector, size) {
if (i == &peer_req->i)
continue;
+ if (i->completed)
+ continue;
if (!i->local) {
/*