summaryrefslogtreecommitdiffstats
path: root/drivers/md/md-cluster.h
diff options
context:
space:
mode:
authorGuoqing Jiang2018-10-18 10:37:41 +0200
committerShaohua Li2018-10-18 18:30:58 +0200
commitafd75628608337cf427a1f9ca0e46698a74f25d8 (patch)
treed778927816adb10c796ed609ba93a5736e6c7b44 /drivers/md/md-cluster.h
parentMD: fix invalid stored role for a disk - try2 (diff)
downloadkernel-qcow2-linux-afd75628608337cf427a1f9ca0e46698a74f25d8.tar.gz
kernel-qcow2-linux-afd75628608337cf427a1f9ca0e46698a74f25d8.tar.xz
kernel-qcow2-linux-afd75628608337cf427a1f9ca0e46698a74f25d8.zip
md-cluster/raid10: resize all the bitmaps before start reshape
To support add disk under grow mode, we need to resize all the bitmaps of each node before reshape, so that we can ensure all nodes have the same view of the bitmap of the clustered raid. So after the master node resized the bitmap, it broadcast a message to other slave nodes, and it checks the size of each bitmap are same or not by compare pages. We can only continue the reshaping after all nodes update the bitmap to the same size (by checking the pages), otherwise revert bitmap size to previous value. The resize_bitmaps interface and BITMAP_RESIZE message are introduced in md-cluster.c for the purpose. Reviewed-by: NeilBrown <neilb@suse.com> Signed-off-by: Guoqing Jiang <gqjiang@suse.com> Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/md-cluster.h')
-rw-r--r--drivers/md/md-cluster.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/md-cluster.h b/drivers/md/md-cluster.h
index c0240708f443..9bd753a6a94e 100644
--- a/drivers/md/md-cluster.h
+++ b/drivers/md/md-cluster.h
@@ -26,6 +26,7 @@ struct md_cluster_operations {
int (*remove_disk)(struct mddev *mddev, struct md_rdev *rdev);
void (*load_bitmaps)(struct mddev *mddev, int total_slots);
int (*gather_bitmaps)(struct md_rdev *rdev);
+ int (*resize_bitmaps)(struct mddev *mddev, sector_t newsize, sector_t oldsize);
int (*lock_all_bitmaps)(struct mddev *mddev);
void (*unlock_all_bitmaps)(struct mddev *mddev);
void (*update_size)(struct mddev *mddev, sector_t old_dev_sectors);