diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2010-10-27 11:32:36 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-03-10 05:34:49 -0500 |
commit | c4752ef1284519c3baa1c3b19df34a80b4905245 (patch) | |
tree | 60585a6a3ad1ff8165e6921f348eb17701b39732 /drivers/block/drbd/drbd_receiver.c | |
parent | 73a01a18b9c28a0fab1131ece5b0a9bc00a879b8 (diff) |
drbd: When proxy's buffer drained off go into regular resync mode
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.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 04a08e7541cc..ee9238e59327 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
@@ -3279,6 +3279,7 @@ static int receive_sync_uuid(struct drbd_conf *mdev, enum drbd_packets cmd, unsi | |||
3279 | 3279 | ||
3280 | wait_event(mdev->misc_wait, | 3280 | wait_event(mdev->misc_wait, |
3281 | mdev->state.conn == C_WF_SYNC_UUID || | 3281 | mdev->state.conn == C_WF_SYNC_UUID || |
3282 | mdev->state.conn == C_BEHIND || | ||
3282 | mdev->state.conn < C_CONNECTED || | 3283 | mdev->state.conn < C_CONNECTED || |
3283 | mdev->state.disk < D_NEGOTIATING); | 3284 | mdev->state.disk < D_NEGOTIATING); |
3284 | 3285 | ||
@@ -4338,6 +4339,14 @@ static int got_BarrierAck(struct drbd_conf *mdev, struct p_header80 *h) | |||
4338 | 4339 | ||
4339 | tl_release(mdev, p->barrier, be32_to_cpu(p->set_size)); | 4340 | tl_release(mdev, p->barrier, be32_to_cpu(p->set_size)); |
4340 | 4341 | ||
4342 | if (mdev->state.conn == C_AHEAD && | ||
4343 | atomic_read(&mdev->ap_in_flight) == 0 && | ||
4344 | list_empty(&mdev->start_resync_work.list)) { | ||
4345 | struct drbd_work *w = &mdev->start_resync_work; | ||
4346 | w->cb = w_start_resync; | ||
4347 | drbd_queue_work_front(&mdev->data.work, w); | ||
4348 | } | ||
4349 | |||
4341 | return TRUE; | 4350 | return TRUE; |
4342 | } | 4351 | } |
4343 | 4352 | ||