Commit fd76438c authored by Philipp Reisner's avatar Philipp Reisner

drbd: Make sure to resync all of the new storage upon online resize

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent e89b591c
...@@ -84,6 +84,9 @@ struct drbd_bitmap { ...@@ -84,6 +84,9 @@ struct drbd_bitmap {
#define BM_MD_IO_ERROR 1 #define BM_MD_IO_ERROR 1
#define BM_P_VMALLOCED 2 #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) static int bm_is_locked(struct drbd_bitmap *b)
{ {
return test_bit(BM_LOCKED, &b->bm_flags); 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) ...@@ -529,6 +532,9 @@ int drbd_bm_resize(struct drbd_conf *mdev, sector_t capacity, int set_new_bits)
if (set_new_bits) { if (set_new_bits) {
bm_memset(b, owords, 0xff, words-owords); bm_memset(b, owords, 0xff, words-owords);
b->bm_set += bits - obits; b->bm_set += bits - obits;
__bm_change_bits_to(mdev, obits,
ALIGN(obits, BITS_PER_LONG),
1, KM_IRQ1);
} else } else
bm_memset(b, owords, 0x00, words-owords); bm_memset(b, owords, 0x00, words-owords);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment