]> 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)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Fri, 17 Apr 2015 15:56:58 +0000 (11:56 -0400)
commited08da33bcd6741bfbdecd8bd1aa0c29cb507fe4
treeb8126ce396a461f0e0b6972fd8d7e4013337f5cf
parente41989132f03fa0c4ebe7f3aaba1a458382ccd92
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>
(cherry picked from commit 9266ff8a5ad2be9f04c194f742e87964ee15bab1)
fs/btrfs/transaction.c