• Zhaolei's avatar
    btrfs: Use ref_cnt for set_block_group_ro() · 868f401a
    Zhaolei authored
    More than one code call set_block_group_ro() and restore rw in fail.
    
    Old code use bool bit to save blockgroup's ro state, it can not
    support parallel case(it is confirmd exist in my debug log).
    
    This patch use ref count to store ro state, and rename
    set_block_group_ro/set_block_group_rw
    to
    inc_block_group_ro/dec_block_group_ro.
    Signed-off-by: default avatarZhao Lei <zhaolei@cn.fujitsu.com>
    Signed-off-by: default avatarChris Mason <clm@fb.com>
    868f401a
relocation.c 110 KB