path: root/drivers/block/drbd/drbd_nl.c
diff options
authorPhilipp Reisner <philipp.reisner@linbit.com>2012-08-14 11:46:59 +0200
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-09 14:05:51 +0100
commitfef45d297e447d710abcf0cd0bdbf8738ff469eb (patch)
treed4200c3cb2b5168d33566d6f9bf48da36d91f231 /drivers/block/drbd/drbd_nl.c
parent5af2e8ce2b463c2cc8e4a074f9d8f660ae7c1d8f (diff)
drbd: Write all pages of the bitmap after an online resize
We need to write the whole bitmap after we moved the meta data due to an online resize operation. With the support for one peta byte devices bitmap IO was optimized to only write out touched pages. This optimization must be turned off when writing the bitmap after an online resize. This issue was introduced with drbd-8.3.10. The impact of this bug is that after an online resize, the next resync could become larger than expected. 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_nl.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index d1073705bf1..c02d5265c39 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -894,8 +894,8 @@ enum determine_dev_size drbd_determine_dev_size(struct drbd_conf *mdev, enum dds
la_size_changed && md_moved ? "size changed and md moved" :
la_size_changed ? "size changed" : "md moved");
/* next line implicitly does drbd_suspend_io()+drbd_resume_io() */
- err = drbd_bitmap_io(mdev, &drbd_bm_write,
- "size changed", BM_LOCKED_MASK);
+ err = drbd_bitmap_io(mdev, md_moved ? &drbd_bm_write_all : &drbd_bm_write,
+ "size changed", BM_LOCKED_MASK);
if (err) {
rv = dev_size_error;
goto out;