• J
    Btrfs: add orphan before truncating pagecache · f3fe820c
    Josef Bacik 提交于
    Running xfstests 83 in a loop would sometimes fail the fsck.  This happens
    because if we invalidate a page that already has an ordered extent setup for
    it we will complete the ordered extent ourselves, assuming that the truncate
    will clean everything up.  The problem with this is there is plenty of time
    for the truncate to fail after we've done this work.  So to fix this we need
    to add the orphan item first to make sure the cleanup gets done properly,
    and then we can truncate the pagecache and all that stuff and be safe.  This
    fixes the btrfsck failures I was seeing while running 83 in a loop.  Thanks,
    Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
    f3fe820c
inode.c 211.5 KB