]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
md-cluster/raid10: resize all the bitmaps before start reshape
authorGuoqing Jiang <gqjiang@suse.com>
Thu, 18 Oct 2018 08:37:41 +0000 (16:37 +0800)
committerShaohua Li <shli@fb.com>
Thu, 18 Oct 2018 16:30:58 +0000 (09:30 -0700)
commitafd75628608337cf427a1f9ca0e46698a74f25d8
treed778927816adb10c796ed609ba93a5736e6c7b44
parent9e753ba9b9b405e3902d9f08aec5f2ea58a0c317
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>
drivers/md/md-cluster.c
drivers/md/md-cluster.h
drivers/md/raid10.c