• Miao Xie's avatar
    Btrfs: update free_chunk_space during allocting a new chunk · 1c116187
    Miao Xie authored
    We should update free_chunk_space in time when we allocate a new chunk,
    not when we deal with the pending device update and block group insertion,
    because we need the real free_chunk_space data to calculate the reserved
    space, if we don't update it in time, we would consider the disk space which
    has be allocated as free space, and would use it to do overcommit reservation.
    Fix it.
    Signed-off-by: default avatarMiao Xie <miaox@cn.fujitsu.com>
    Signed-off-by: default avatarChris Mason <clm@fb.com>
    1c116187
volumes.c 168 KB