]> asedeno.scripts.mit.edu Git - linux.git/commit
md: introduce mddev_create/destroy_wb_pool for the change of member device
authorGuoqing Jiang <gqjiang@suse.com>
Fri, 14 Jun 2019 09:10:36 +0000 (17:10 +0800)
committerSong Liu <songliubraving@fb.com>
Thu, 20 Jun 2019 23:36:00 +0000 (16:36 -0700)
commit963c555e75b033202dd76cf6325a7b7c83d08d5f
tree093639f1a814ce053bee95459f4f9c242dfc72ea
parent3e148a3209792e04f63ec99701235c960765fc9a
md: introduce mddev_create/destroy_wb_pool for the change of member device

Previously, we called rdev_init_wb to avoid potential data
inconsistency when array is created.

Now, we need to call the function and create mempool if a
device is added or just be flaged as "writemostly". So
mddev_create_wb_pool is introduced and called accordingly.
And for safety reason, we mark implicit GFP_NOIO allocation
scope for create mempool during mddev_suspend/mddev_resume.

And mempool should be removed conversely after remove a
member device or its's "writemostly" flag, which is done
by call mddev_destroy_wb_pool.

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.c
drivers/md/md.h