aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2010-04-01 03:57:40 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2010-05-17 19:16:20 -0400
commitfd76438c2421324fa2fb9303e760ec5332ff0b58 (patch)
tree98968e899931e1df65df41505a4095874912763b /drivers/block
parente89b591c3aba0af87f5248b15f56ce7a4f439c16 (diff)
drbd: Make sure to resync all of the new storage upon online resize
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/drbd/drbd_bitmap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c
index 695fb64cba00..178cf1642b2d 100644
--- a/drivers/block/drbd/drbd_bitmap.c
+++ b/drivers/block/drbd/drbd_bitmap.c
@@ -84,6 +84,9 @@ struct drbd_bitmap {
84#define BM_MD_IO_ERROR 1 84#define BM_MD_IO_ERROR 1
85#define BM_P_VMALLOCED 2 85#define BM_P_VMALLOCED 2
86 86
87int __bm_change_bits_to(struct drbd_conf *mdev, const unsigned long s,
88 unsigned long e, int val, const enum km_type km);
89
87static int bm_is_locked(struct drbd_bitmap *b) 90static int bm_is_locked(struct drbd_bitmap *b)
88{ 91{
89 return test_bit(BM_LOCKED, &b->bm_flags); 92 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 if (set_new_bits) { 532 if (set_new_bits) {
530 bm_memset(b, owords, 0xff, words-owords); 533 bm_memset(b, owords, 0xff, words-owords);
531 b->bm_set += bits - obits; 534 b->bm_set += bits - obits;
535 __bm_change_bits_to(mdev, obits,
536 ALIGN(obits, BITS_PER_LONG),
537 1, KM_IRQ1);
532 } else 538 } else
533 bm_memset(b, owords, 0x00, words-owords); 539 bm_memset(b, owords, 0x00, words-owords);
534 540