On 03/03/2015 11:35 AM, David Sterba wrote: > On Tue, Mar 03, 2015 at 07:02:58PM +0800, Liu Bo wrote: >> On Mon, Mar 02, 2015 at 12:46:55PM -0500, Josef Bacik wrote: >>> 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, >> >> Free space inode is NODATASUM, so its searching csum tree in >> __btrfs_free_extent() is really unnecessary, by skipping that, csum tree >> won't be inserted into dirty_cowonly_roots list again, so it also passed btrfs/078, >> at least on my box. > > I can hit the bug [1] even with Josef's patch, I'm can test your fix if you > want. > > MKFS_OPTIONS -- -O skinny-metadata,extref -m single -d single --mixed /dev/sdc1 > MOUNT_OPTIONS -- -o enospc_debug,space_cache,noatime /dev/sdc1 /mnt/a2 > > on top of 3.19-rc5 with Chris' for-linus. > Can you try this on top of this patch and send me the logs? Thanks, Josef