Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242884
b: refs/heads/master
c: da0a781
h: refs/heads/master
v: v3
  • Loading branch information
Philipp Reisner committed Mar 10, 2011
1 parent 7b432f8 commit 35ba777
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 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: d612d309e4c8401ad94c531678b59c4a8b7c41ce
refs/heads/master: da0a78161d2b2da4819a1f05a38bb1dcbe02d951
3 changes: 2 additions & 1 deletion trunk/drivers/block/drbd/drbd_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -4385,10 +4385,11 @@ static int got_BarrierAck(struct drbd_conf *mdev, struct p_header80 *h)

if (mdev->state.conn == C_AHEAD &&
atomic_read(&mdev->ap_in_flight) == 0 &&
atomic_read(&mdev->rs_pending_cnt) == 0 &&
list_empty(&mdev->start_resync_work.list)) {
struct drbd_work *w = &mdev->start_resync_work;
w->cb = w_start_resync;
drbd_queue_work_front(&mdev->data.work, w);
drbd_queue_work(&mdev->data.work, w);
}

return true;
Expand Down
8 changes: 7 additions & 1 deletion trunk/drivers/block/drbd/drbd_req.c
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,13 @@ static int drbd_make_request_common(struct drbd_conf *mdev, struct bio *bio, uns
congested = 1;
}

if (congested) {
if (congested && atomic_read(&mdev->rs_pending_cnt) == 0) {
/* rs_pending_cnt must be zero, otherwise the two peers
might get different bitmaps. With sane configurations
the resync stalls long before we might want to go into
AHEAD mode.
We could force the resync into PAUSE mode here if
rs_pending_cnt is > 0 ... */
queue_barrier(mdev);

if (mdev->net_conf->on_congestion == OC_PULL_AHEAD)
Expand Down

0 comments on commit 35ba777

Please sign in to comment.