diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2010-04-28 14:46:57 +0200 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2010-05-18 01:20:33 +0200 |
commit | 5223671bb0315d83f9ad7becbbb9e703aa735bbe (patch) | |
tree | abd92e52a9a4b65a4c927e81bfd05896faa0c197 /drivers | |
parent | 6b4388ac1f282515db3a651707238cad00b50e80 (diff) |
drbd: Fixed bitmap in case of online-grow without resync
The "surplus" bits of the old (smaller) bitmap must be clean
in case of online-grow without resync.
Note: Reverted 67ae8b80d4a116ab3b7094eb3723506b20c06dff as
well, since the lines added by this patch are redundant. The
bits get set by the bm_set_surplus(b) call before that.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/drbd/drbd_bitmap.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c index aa7e23cf7e22..e3f88d6e1412 100644 --- a/drivers/block/drbd/drbd_bitmap.c +++ b/drivers/block/drbd/drbd_bitmap.c @@ -519,7 +519,7 @@ int drbd_bm_resize(struct drbd_conf *mdev, sector_t capacity, int set_new_bits) obits = b->bm_bits; growing = bits > obits; - if (opages) + if (opages && growing && set_new_bits) bm_set_surplus(b); b->bm_pages = npages; @@ -532,9 +532,6 @@ 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); |