Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242896
b: refs/heads/master
c: 6c922ed
h: refs/heads/master
v: v3
  • Loading branch information
Lars Ellenberg authored and Philipp Reisner committed Mar 10, 2011
1 parent 881a7dd commit e187ee6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 20ee639024e3d33111df0e343050b218c656bf16
refs/heads/master: 6c922ed543bee1bc6685ade07be59f3fa49a7288
25 changes: 12 additions & 13 deletions trunk/drivers/block/drbd/drbd_worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -1544,24 +1544,23 @@ void drbd_start_resync(struct drbd_conf *mdev, enum drbd_conns side)
}
write_unlock_irq(&global_state_lock);

if (side == C_SYNC_TARGET)
mdev->bm_resync_fo = 0;

/* Since protocol 96, we must serialize drbd_gen_and_send_sync_uuid
* with w_send_oos, or the sync target will get confused as to
* how much bits to resync. We cannot do that always, because for an
* empty resync and protocol < 95, we need to do it here, as we call
* drbd_resync_finished from here in that case.
* We drbd_gen_and_send_sync_uuid here for protocol < 96,
* and from after_state_ch otherwise. */
if (side == C_SYNC_SOURCE && mdev->agreed_pro_version < 96)
drbd_gen_and_send_sync_uuid(mdev);

if (r == SS_SUCCESS) {
dev_info(DEV, "Began resync as %s (will sync %lu KB [%lu bits set]).\n",
drbd_conn_str(ns.conn),
(unsigned long) mdev->rs_total << (BM_BLOCK_SHIFT-10),
(unsigned long) mdev->rs_total);
if (side == C_SYNC_TARGET)
mdev->bm_resync_fo = 0;

/* Since protocol 96, we must serialize drbd_gen_and_send_sync_uuid
* with w_send_oos, or the sync target will get confused as to
* how much bits to resync. We cannot do that always, because for an
* empty resync and protocol < 95, we need to do it here, as we call
* drbd_resync_finished from here in that case.
* We drbd_gen_and_send_sync_uuid here for protocol < 96,
* and from after_state_ch otherwise. */
if (side == C_SYNC_SOURCE && mdev->agreed_pro_version < 96)
drbd_gen_and_send_sync_uuid(mdev);

if (mdev->agreed_pro_version < 95 && mdev->rs_total == 0) {
/* This still has a race (about when exactly the peers
Expand Down

0 comments on commit e187ee6

Please sign in to comment.