aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2010-11-05 04:48:01 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2011-03-10 05:18:56 -0500
commitea5442aff68c559c951373739201721185191748 (patch)
tree4303cbd866aa4e0541b6ef31fe711bd006f11922 /drivers/block/drbd
parentc6ea14dfa391da58e309d0d5041564b3d9dbb82f (diff)
drbd: advance progress step marks for online-verify
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r--drivers/block/drbd/drbd_int.h1
-rw-r--r--drivers/block/drbd/drbd_receiver.c8
-rw-r--r--drivers/block/drbd/drbd_worker.c8
3 files changed, 15 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index b0bd27dfc1e8..6cba131011d5 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -1619,6 +1619,7 @@ extern int drbd_rs_del_all(struct drbd_conf *mdev);
1619extern void drbd_rs_failed_io(struct drbd_conf *mdev, 1619extern void drbd_rs_failed_io(struct drbd_conf *mdev,
1620 sector_t sector, int size); 1620 sector_t sector, int size);
1621extern int drbd_al_read_log(struct drbd_conf *mdev, struct drbd_backing_dev *); 1621extern int drbd_al_read_log(struct drbd_conf *mdev, struct drbd_backing_dev *);
1622extern void drbd_advance_rs_marks(struct drbd_conf *mdev, unsigned long still_to_go);
1622extern void __drbd_set_in_sync(struct drbd_conf *mdev, sector_t sector, 1623extern void __drbd_set_in_sync(struct drbd_conf *mdev, sector_t sector,
1623 int size, const char *file, const unsigned int line); 1624 int size, const char *file, const unsigned int line);
1624#define drbd_set_in_sync(mdev, sector, size) \ 1625#define drbd_set_in_sync(mdev, sector, size) \
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 3b95eef07546..10db70a23376 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -4340,7 +4340,13 @@ static int got_OVResult(struct drbd_conf *mdev, struct p_header80 *h)
4340 drbd_rs_complete_io(mdev, sector); 4340 drbd_rs_complete_io(mdev, sector);
4341 dec_rs_pending(mdev); 4341 dec_rs_pending(mdev);
4342 4342
4343 if (--mdev->ov_left == 0) { 4343 --mdev->ov_left;
4344
4345 /* let's advance progress step marks only for every other megabyte */
4346 if ((mdev->ov_left & 0x200) == 0x200)
4347 drbd_advance_rs_marks(mdev, mdev->ov_left);
4348
4349 if (mdev->ov_left == 0) {
4344 w = kmalloc(sizeof(*w), GFP_NOIO); 4350 w = kmalloc(sizeof(*w), GFP_NOIO);
4345 if (w) { 4351 if (w) {
4346 w->cb = w_ov_finished; 4352 w->cb = w_ov_finished;
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c
index 6cfc5417da8e..a050eb0d93ba 100644
--- a/drivers/block/drbd/drbd_worker.c
+++ b/drivers/block/drbd/drbd_worker.c
@@ -1185,7 +1185,13 @@ int w_e_end_ov_reply(struct drbd_conf *mdev, struct drbd_work *w, int cancel)
1185 1185
1186 drbd_free_ee(mdev, e); 1186 drbd_free_ee(mdev, e);
1187 1187
1188 if (--mdev->ov_left == 0) { 1188 --mdev->ov_left;
1189
1190 /* let's advance progress step marks only for every other megabyte */
1191 if ((mdev->ov_left & 0x200) == 0x200)
1192 drbd_advance_rs_marks(mdev, mdev->ov_left);
1193
1194 if (mdev->ov_left == 0) {
1189 ov_oos_print(mdev); 1195 ov_oos_print(mdev);
1190 drbd_resync_finished(mdev); 1196 drbd_resync_finished(mdev);
1191 } 1197 }