diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2010-12-15 02:59:11 -0500 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-03-10 05:43:19 -0500 |
commit | 19f843aa08e2d8f87a09b4c2edc43b00638423a8 (patch) | |
tree | 49919bd17ba7e03eb7cb76175910714d55704997 /drivers/block/drbd/drbd_worker.c | |
parent | 95a0f10cddbf93ce89c175ac1c53dad2d20ad309 (diff) |
drbd: bitmap keep track of changes vs on-disk bitmap
When we set or clear bits in a bitmap page,
also set a flag in the page->private pointer.
This allows us to skip writes of unchanged pages.
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_worker.c')
-rw-r--r-- | drivers/block/drbd/drbd_worker.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index 9fe3e890da0f..d17f2ed777ce 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c | |||
@@ -907,10 +907,8 @@ out: | |||
907 | 907 | ||
908 | drbd_md_sync(mdev); | 908 | drbd_md_sync(mdev); |
909 | 909 | ||
910 | if (test_and_clear_bit(WRITE_BM_AFTER_RESYNC, &mdev->flags)) { | 910 | dev_info(DEV, "Writing changed bitmap pages\n"); |
911 | dev_info(DEV, "Writing the whole bitmap\n"); | 911 | drbd_queue_bitmap_io(mdev, &drbd_bm_write, NULL, "write from resync_finished"); |
912 | drbd_queue_bitmap_io(mdev, &drbd_bm_write, NULL, "write from resync_finished"); | ||
913 | } | ||
914 | 912 | ||
915 | if (khelper_cmd) | 913 | if (khelper_cmd) |
916 | drbd_khelper(mdev, khelper_cmd); | 914 | drbd_khelper(mdev, khelper_cmd); |
@@ -1127,7 +1125,6 @@ void drbd_ov_oos_found(struct drbd_conf *mdev, sector_t sector, int size) | |||
1127 | mdev->ov_last_oos_size = size>>9; | 1125 | mdev->ov_last_oos_size = size>>9; |
1128 | } | 1126 | } |
1129 | drbd_set_out_of_sync(mdev, sector, size); | 1127 | drbd_set_out_of_sync(mdev, sector, size); |
1130 | set_bit(WRITE_BM_AFTER_RESYNC, &mdev->flags); | ||
1131 | } | 1128 | } |
1132 | 1129 | ||
1133 | int w_e_end_ov_reply(struct drbd_conf *mdev, struct drbd_work *w, int cancel) | 1130 | int w_e_end_ov_reply(struct drbd_conf *mdev, struct drbd_work *w, int cancel) |