diff options
author | Guoqing Jiang <gqjiang@suse.com> | 2018-10-18 16:37:41 +0800 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2018-10-18 09:30:58 -0700 |
commit | afd75628608337cf427a1f9ca0e46698a74f25d8 (patch) | |
tree | d778927816adb10c796ed609ba93a5736e6c7b44 /drivers/md/md-cluster.h | |
parent | 9e753ba9b9b405e3902d9f08aec5f2ea58a0c317 (diff) | |
download | linux-afd75628608337cf427a1f9ca0e46698a74f25d8.tar.bz2 |
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.h | 1 |
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); |