• liubo's avatar
    Btrfs: fix easily get into ENOSPC in mixed case · 1aba86d6
    liubo authored
    When a btrfs disk is created by mixed data & metadata option, it will have no
    pure data or pure metadata space info.
    
    In btrfs's for-linus branch, commit 78b1ea13838039cd88afdd62519b40b344d6c920
    (Btrfs: fix OOPS of empty filesystem after balance) initializes space infos at
    the very beginning.  The problem is this initialization does not take the mixed
    case into account, which will cause btrfs will easily get into ENOSPC in mixed
    case.
    Signed-off-by: default avatarLiu Bo <liubo2009@cn.fujitsu.com>
    Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
    1aba86d6
extent-tree.c 234 KB