• Guoqing Jiang's avatar
    md-cluster/raid10: resize all the bitmaps before start reshape · afd75628
    Guoqing Jiang authored
    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: default avatarNeilBrown <neilb@suse.com>
    Signed-off-by: default avatarGuoqing Jiang <gqjiang@suse.com>
    Signed-off-by: default avatarShaohua Li <shli@fb.com>
    afd75628
md-cluster.c 43.7 KB