• Josef Bacik's avatar
    Btrfs: allow splitting of hole em's when dropping extent cache · ee20a983
    Josef Bacik authored
    I noticed while running multi-threaded fsync tests that sometimes fsck would
    complain about an improper gap.  This happens because we fail to add a hole
    extent to the file, which was happening when we'd split a hole EM because
    btrfs_drop_extent_cache was just discarding the whole em instead of splitting
    it.  So this patch fixes this by allowing us to split a hole em properly, which
    means that added holes actually get logged properly and we no longer see this
    fsck error.  Thankfully we're tolerant of these sort of problems so a user would
    not see any adverse effects of this bug, other than fsck complaining.  Thanks,
    Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
    Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
    ee20a983
file.c 66.7 KB