diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2010-11-05 09:39:06 +0100 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-03-10 11:18:51 +0100 |
commit | 30b743a2d532af39c9ed13c85d5473f6f620f6c8 (patch) | |
tree | 9c995b292e463320003aa8d4a3a502ddc3a09d00 /drivers/block/drbd/drbd_receiver.c | |
parent | 26525618863afcc4aab8b2a83451d37c6f513460 (diff) |
drbd: improve online-verify progress tracking
For a partial (resumed) online-verify, initialize rs_total not to total
bits, but to number of bits to check in this run, to match the meaning
rs_total has for actual resync.
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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 8e68be939de..88856a7f42a 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c @@ -2005,7 +2005,8 @@ static int receive_DataRequest(struct drbd_conf *mdev, enum drbd_packets cmd, un mdev->agreed_pro_version >= 90) { mdev->ov_start_sector = sector; mdev->ov_position = sector; - mdev->ov_left = mdev->rs_total - BM_SECT_TO_BIT(sector); + mdev->ov_left = drbd_bm_bits(mdev) - BM_SECT_TO_BIT(sector); + mdev->rs_total = mdev->ov_left; dev_info(DEV, "Online Verify start sector: %llu\n", (unsigned long long)sector); } |