Skip to content
  • Guoqing Jiang's avatar
    md-cluster: introduce cluster_check_sync_size · b98938d1
    Guoqing Jiang authored
    
    
    Support resize is a little complex for clustered
    raid, since we need to ensure all the nodes share
    the same knowledge about the size of raid.
    
    We achieve the goal by check the sync_size which
    is in each node's bitmap, we can only change the
    capacity after cluster_check_sync_size returns 0.
    
    Also, get_bitmap_from_slot is added to get a slot's
    bitmap. And we exported some funcs since they are
    used in cluster_check_sync_size().
    
    We can also reuse get_bitmap_from_slot to remove
    redundant code existed in bitmap_copy_from_slot.
    
    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>
    b98938d1