]> 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@waya.furryterror.org>
Fri, 27 Mar 2015 03:33:40 +0000 (23:33 -0400)
commitc10421fc846dd9c4f87ce5bb1b18cfb5ebb38828
treefe3b70e9f92c8cfecde25fd5ed881c06f69734ba
parentdcf57786dd4aa7015e9e395664572b401321931e
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