]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix ASSERT(list_empty(&cur_trans->dirty_bgs_list)
authorJosef Bacik <jbacik@fb.com>
Fri, 13 Mar 2015 20:40:45 +0000 (16:40 -0400)
committerChris Mason <clm@fb.com>
Fri, 13 Mar 2015 20:47:04 +0000 (13:47 -0700)
commit9d73b91cbecef237c9ae81eb8f78b8ffdc2a8743
tree810176d97b84699b286b8c05d0fae200dd7322b1
parentdfddd27a5279e76179917f26358ed20695e74cb4
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>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/transaction.c