• G
    md-cluster: clear another node's suspend_area after the copy is finished · 010228e4
    Guoqing Jiang 提交于
    When one node leaves cluster or stops the resyncing
    (resync or recovery) array, then other nodes need to
    call recover_bitmaps to continue the unfinished task.
    
    But we need to clear suspend_area later after other
    nodes copy the resync information to their bitmap
    (by call bitmap_copy_from_slot). Otherwise, all nodes
    could write to the suspend_area even the suspend_area
    is not handled by any node, because area_resyncing
    returns 0 at the beginning of raid1_write_request.
    Which means one node could write suspend_area while
    another node is resyncing the same area, then data
    could be inconsistent.
    
    So let's clear suspend_area later to avoid above issue
    with the protection of bm lock. Also it is straightforward
    to clear suspend_area after nodes have copied the resync
    info to bitmap.
    Signed-off-by: NGuoqing Jiang <gqjiang@suse.com>
    Reviewed-by: NNeilBrown <neilb@suse.com>
    Signed-off-by: NShaohua Li <shli@fb.com>
    010228e4
md-cluster.c 41.1 KB