Bug 81221

Summary: deleting btrfs snapshot fires an error when updating qgroup information
Product: File System Reporter: AndreasSimbürger (simbuerg)
Component: btrfsAssignee: Josef Bacik (josef)
Status: RESOLVED OBSOLETE    
Severity: normal CC: dsterba, szg00000
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.16.0-rc5 Subsystem:
Regression: No Bisected commit-id:

Description AndreasSimbürger 2014-07-27 11:27:01 UTC
My snapshot script cleans old snapshots regularly. Whenever it deletes the oldest snapshot it also removes the snapshot from all assigned qgroups and deletes the default qgroup 0/<subvol-id>.
The filesystem seems to operate normally afterwards and the snapshot is deleted,
however my dmesg gets spammed with these:

[ 3839.116726] ------------[ cut here ]------------
[ 3839.116742] WARNING: CPU: 0 PID: 136 at fs/btrfs/qgroup.c:1347 btrfs_delayed_qgroup_accounting+0x7c6/0xc00()
[ 3839.116745] Modules linked in: ctr ccm btusb bluetooth x86_pkg_temp_thermal intel_powerclamp kvm_intel kvm arc4 crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 lrw iwldvm gf128mul glue_helper ablk_helper mac80211 cryptd snd_hda_codec_hdmi microcode snd_hda_codec_realtek snd_hda_codec_generic iwlwifi iTCO_wdt psmouse i2c_i801 cfg80211 iTCO_vendor_support snd_hda_intel snd_hda_controller sdhci_pci sdhci snd_hda_codec thinkpad_acpi mei_me snd_hwdep nvram mei snd_pcm
[ 3839.116793] CPU: 0 PID: 136 Comm: btrfs-transacti Tainted: G        W     3.16.0-rc5 #1
[ 3839.116796] Hardware name: LENOVO 2325CN9/2325CN9, BIOS G2ET92WW (2.52 ) 02/22/2013
[ 3839.116799]  0000000000000009 ffff880406aa7c88 ffffffff81758272 0000000000000000
[ 3839.116804]  ffff880406aa7cc0 ffffffff81050b0d ffff8800aaca7d60 ffff880406cd1688
[ 3839.116808]  0000000000000000 ffff8803b2684a58 ffff880406c4f000 ffff880406aa7cd0
[ 3839.116813] Call Trace:
[ 3839.116823]  [<ffffffff81758272>] dump_stack+0x4d/0x6f
[ 3839.116830]  [<ffffffff81050b0d>] warn_slowpath_common+0x7d/0xa0
[ 3839.116836]  [<ffffffff81050bea>] warn_slowpath_null+0x1a/0x20
[ 3839.116841]  [<ffffffff8130b106>] btrfs_delayed_qgroup_accounting+0x7c6/0xc00
[ 3839.116847]  [<ffffffff81299b0a>] btrfs_run_delayed_refs.part.65+0x20a/0x270
[ 3839.116850]  [<ffffffff81299b87>] btrfs_run_delayed_refs+0x17/0x20
[ 3839.116856]  [<ffffffff812a991e>] btrfs_commit_transaction+0x4e/0xa10
[ 3839.116861]  [<ffffffff812a5c0d>] transaction_kthread+0x1ad/0x240
[ 3839.116866]  [<ffffffff812a5a60>] ? btrfs_cleanup_transaction+0x580/0x580
[ 3839.116871]  [<ffffffff81071f39>] kthread+0xc9/0xe0
[ 3839.116875]  [<ffffffff81071e70>] ? kthread_create_on_node+0x180/0x180
[ 3839.116882]  [<ffffffff817600fc>] ret_from_fork+0x7c/0xb0
[ 3839.116885]  [<ffffffff81071e70>] ? kthread_create_on_node+0x180/0x180
[ 3839.116888] ---[ end trace 26e77b7600b78b16 ]---
Comment 1 David Sterba 2022-10-04 07:00:03 UTC
This is a semi-automated bugzilla cleanup, report is against an old kernel version. If the problem still happens, please open a new bug. Thanks.