aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_int.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/drbd/drbd_int.h')
-rw-r--r--drivers/block/drbd/drbd_int.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index 6cba131011d5..7131bf2af6ae 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -2157,7 +2157,10 @@ static inline void drbd_get_syncer_progress(struct drbd_conf *mdev,
2157 * units of BM_BLOCK_SIZE. 2157 * units of BM_BLOCK_SIZE.
2158 * for the percentage, we don't care. */ 2158 * for the percentage, we don't care. */
2159 2159
2160 *bits_left = drbd_bm_total_weight(mdev) - mdev->rs_failed; 2160 if (mdev->state.conn == C_VERIFY_S || mdev->state.conn == C_VERIFY_T)
2161 *bits_left = mdev->ov_left;
2162 else
2163 *bits_left = drbd_bm_total_weight(mdev) - mdev->rs_failed;
2161 /* >> 10 to prevent overflow, 2164 /* >> 10 to prevent overflow,
2162 * +1 to prevent division by zero */ 2165 * +1 to prevent division by zero */
2163 if (*bits_left > mdev->rs_total) { 2166 if (*bits_left > mdev->rs_total) {