• Josef Bacik's avatar
    Btrfs: fix ASSERT(list_empty(&cur_trans->dirty_bgs_list) · ea526d18
    Josef Bacik authored
    Dave could hit this assert consistently running btrfs/078.  This is because
    when we update the block groups we could truncate the free space, which would
    try to delete the csums for that range and dirty the csum root.  For this to
    happen we have to have already written out the csum root so it's kind of hard to
    hit this case.  This patch fixes this by changing the logic to only write the
    dirty block groups if the dirty_cowonly_roots list is empty.  This will get us
    the same effect as before since we add the extent root last, and will cover the
    case that we dirty some other root again but not the extent root.  Thanks,
    Reported-by: default avatarDavid Sterba <dsterba@suse.cz>
    Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
    Signed-off-by: default avatarChris Mason <clm@fb.com>
    ea526d18
transaction.c 59.3 KB