Skip to content

Commit

Permalink
Merged in DW-1250-wait-overlapped-data (pull request #352)
Browse files Browse the repository at this point in the history
DW-1250 wait to finish progressing sync block when received data on L_BEHIND state, to prevent overlapped write,
  • Loading branch information
sungeun-kim committed Nov 30, 2016
2 parents fe6657e + 1dd1b73 commit 66d2d26
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drbd/drbd_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -3119,7 +3119,8 @@ static int receive_Data(struct drbd_connection *connection, struct packet_info *
list_add_tail(&peer_req->recv_order, &connection->peer_requests);
spin_unlock_irq(&device->resource->req_lock);

if (peer_device->repl_state[NOW] == L_SYNC_TARGET)
// DW-1250: wait until there's no resync on same sector, to prevent overlapped write.
if (peer_device->repl_state[NOW] >= L_SYNC_TARGET)
wait_event(device->ee_wait, !overlapping_resync_write(device, peer_req));

/* In protocol < 110 (which is compat mode 8.4 <-> 9.0),
Expand Down

0 comments on commit 66d2d26

Please sign in to comment.