]> git.hungrycats.org Git - linux/commit
Btrfs: fix ASSERT(list_empty(&cur_trans->dirty_bgs_list)
authorJosef Bacik <jbacik@fb.com>
Mon, 2 Mar 2015 17:41:33 +0000 (12:41 -0500)
committerJosef Bacik <jbacik@fb.com>
Thu, 12 Mar 2015 15:34:14 +0000 (11:34 -0400)
commit9266ff8a5ad2be9f04c194f742e87964ee15bab1
treeb1928f61559f0b02db2d8249313dac44876174f5
parentdd9ef135e3542ffc621c4eb7f0091870ec7a1504
Btrfs: fix ASSERT(list_empty(&cur_trans->dirty_bgs_list)

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: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fb.com>
fs/btrfs/transaction.c