summaryrefslogtreecommitdiffstats
path: root/drivers/md/md.h
diff options
context:
space:
mode:
authorGuoqing Jiang <gqjiang@suse.com>2019-06-14 11:10:36 +0200
committerSong Liu <songliubraving@fb.com>2019-06-21 01:36:00 +0200
commit963c555e75b033202dd76cf6325a7b7c83d08d5f (patch)
tree093639f1a814ce053bee95459f4f9c242dfc72ea /drivers/md/md.h
parentmd/raid1: fix potential data inconsistency issue with write behind device (diff)
downloadlinux-963c555e75b033202dd76cf6325a7b7c83d08d5f.tar.xz
linux-963c555e75b033202dd76cf6325a7b7c83d08d5f.zip
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>
Diffstat (limited to 'drivers/md/md.h')
-rw-r--r--drivers/md/md.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/md.h b/drivers/md/md.h
index d449d514cff9..10f98200e2f8 100644
--- a/drivers/md/md.h
+++ b/drivers/md/md.h
@@ -730,6 +730,8 @@ extern struct bio *bio_alloc_mddev(gfp_t gfp_mask, int nr_iovecs,
extern void md_reload_sb(struct mddev *mddev, int raid_disk);
extern void md_update_sb(struct mddev *mddev, int force);
extern void md_kick_rdev_from_array(struct md_rdev * rdev);
+extern void mddev_create_wb_pool(struct mddev *mddev, struct md_rdev *rdev,
+ bool is_suspend);
struct md_rdev *md_find_rdev_nr_rcu(struct mddev *mddev, int nr);
struct md_rdev *md_find_rdev_rcu(struct mddev *mddev, dev_t dev);