md-bitmap: create and destroy wb_info_pool with the change of bitmap
authorGuoqing Jiang <gqjiang@suse.com>
Fri, 14 Jun 2019 09:10:38 +0000 (17:10 +0800)
committerSong Liu <songliubraving@fb.com>
Thu, 20 Jun 2019 23:36:00 +0000 (16:36 -0700)
commit617b194a13c0f3b0a6d14fc6227c222877c23b4e
treea02a0ed200e15002332d6ac82059cef91658f751
parent10c92fca636e40dcb15d85ffe06b1b6843cd28fc
md-bitmap: create and destroy wb_info_pool with the change of bitmap

The write-behind attribute is part of bitmap, since bitmap
can be added/removed dynamically with the following.

1. mdadm --grow /dev/md0 --bitmap=none
2. mdadm --grow /dev/md0 --bitmap=internal --write-behind

So we need to destroy wb_info_pool in md_bitmap_destroy,
and create the pool before load bitmap.

Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
drivers/md/md-bitmap.c