drbd: Make sure to resync all of the new storage upon online resize
authorPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 1 Apr 2010 07:57:40 +0000 (09:57 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Mon, 17 May 2010 23:16:20 +0000 (01:16 +0200)
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_bitmap.c

index 695fb64..178cf16 100644 (file)
@@ -84,6 +84,9 @@ struct drbd_bitmap {
 #define BM_MD_IO_ERROR  1
 #define BM_P_VMALLOCED  2
 
+int __bm_change_bits_to(struct drbd_conf *mdev, const unsigned long s,
+                              unsigned long e, int val, const enum km_type km);
+
 static int bm_is_locked(struct drbd_bitmap *b)
 {
        return test_bit(BM_LOCKED, &b->bm_flags);
@@ -529,6 +532,9 @@ int drbd_bm_resize(struct drbd_conf *mdev, sector_t capacity, int set_new_bits)
                if (set_new_bits) {
                        bm_memset(b, owords, 0xff, words-owords);
                        b->bm_set += bits - obits;
+                       __bm_change_bits_to(mdev, obits,
+                                           ALIGN(obits, BITS_PER_LONG),
+                                           1, KM_IRQ1);
                } else
                        bm_memset(b, owords, 0x00, words-owords);