diff options
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index aa6c52c80e2e..1a48e02b83bc 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
@@ -3169,9 +3169,14 @@ static int receive_state(struct drbd_conf *mdev, enum drbd_packets cmd, unsigned | |||
3169 | os = ns = mdev->state; | 3169 | os = ns = mdev->state; |
3170 | spin_unlock_irq(&mdev->req_lock); | 3170 | spin_unlock_irq(&mdev->req_lock); |
3171 | 3171 | ||
3172 | /* peer says his disk is uptodate, while we think it is inconsistent, | 3172 | /* If this is the "end of sync" confirmation, usually the peer disk |
3173 | * and this happens while we think we have a sync going on. */ | 3173 | * transitions from D_INCONSISTENT to D_UP_TO_DATE. For empty (0 bits |
3174 | if (os.pdsk == D_INCONSISTENT && real_peer_disk == D_UP_TO_DATE && | 3174 | * set) resync started in PausedSyncT, or if the timing of pause-/ |
3175 | * unpause-sync events has been "just right", the peer disk may | ||
3176 | * transition from D_CONSISTENT to D_UP_TO_DATE as well. | ||
3177 | */ | ||
3178 | if ((os.pdsk == D_INCONSISTENT || os.pdsk == D_CONSISTENT) && | ||
3179 | real_peer_disk == D_UP_TO_DATE && | ||
3175 | os.conn > C_CONNECTED && os.disk == D_UP_TO_DATE) { | 3180 | os.conn > C_CONNECTED && os.disk == D_UP_TO_DATE) { |
3176 | /* If we are (becoming) SyncSource, but peer is still in sync | 3181 | /* If we are (becoming) SyncSource, but peer is still in sync |
3177 | * preparation, ignore its uptodate-ness to avoid flapping, it | 3182 | * preparation, ignore its uptodate-ness to avoid flapping, it |