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

Since we can enable write-behind mode by write backlog node,
so create wb_info_pool if the mode is just enabled, also call
call md_bitmap_update_sb to make user aware the write-behind
mode is enabled. Conversely, wb_info_pool should be destroyed
when write-behind mode is disabled.

Beside above, it is better to update bitmap sb if we change
the number of max_write_behind.

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