FYI, we noticed the following commit (built with gcc-7): commit: 2c54397216ca913d2df97baf2957cf905cb33b64 ("btrfs: kill min_allocable_bytes in inc_block_group_ro") https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master in testcase: xfstests with following parameters: disk: 6HDD fs: btrfs test: btrfs-group02 test-description: xfstests is a regression test suite for xfs and other files ystems. test-url: git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 8G caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace): +-----------------------------------------------------------------------------+------------+------------+ | | bd879386d3 | 2c54397216 | +-----------------------------------------------------------------------------+------------+------------+ | boot_successes | 12 | 0 | | boot_failures | 0 | 12 | | WARNING:at_fs/btrfs/block-group.c:#btrfs_create_pending_block_groups[btrfs] | 0 | 12 | | RIP:btrfs_create_pending_block_groups[btrfs] | 0 | 12 | +-----------------------------------------------------------------------------+------------+------------+ If you fix the issue, kindly add following tag Reported-by: kernel test robot [ 198.327017] WARNING: CPU: 1 PID: 13361 at fs/btrfs/block-group.c:1876 btrfs_create_pending_block_groups+0x1dc/0x250 [btrfs] [ 198.332369] Modules linked in: btrfs blake2b_generic xor zstd_decompress zstd_compress raid6_pq libcrc32c ext4 mbcache jbd2 dm_mod bochs_drm drm_vram_helper drm_ttm_helper ttm drm_kms_helper intel_rapl_msr intel_rapl_common sr_mod cdrom sg crct10dif_pclmul ata_generic pata_acpi crc32_pclmul crc32c_intel ghash_clmulni_intel snd_pcm syscopyarea sysfillrect sysimgblt ppdev fb_sys_fops snd_timer snd drm soundcore aesni_intel pcspkr crypto_simd joydev cryptd glue_helper serio_raw ata_piix libata i2c_piix4 parport_pc floppy parport ip_tables [last unloaded: blake2b_generic] [ 198.339163] CPU: 1 PID: 13361 Comm: btrfs Not tainted 5.5.0-rc2-00031-g2c54397216ca9 #1 [ 198.340479] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 [ 198.341737] RIP: 0010:btrfs_create_pending_block_groups+0x1dc/0x250 [btrfs] [ 198.342899] Code: e9 58 ff ff ff 48 8b 45 50 f0 48 0f ba a8 38 ce 00 00 02 72 17 41 83 fc fb 74 32 44 89 e6 48 c7 c7 a8 1e 62 c0 e8 14 26 4a e0 <0f> 0b 44 89 e1 ba 54 07 00 00 48 c7 c6 00 01 61 c0 48 89 ef e8 33 [ 198.345655] RSP: 0018:ffffa4cbc086fad8 EFLAGS: 00010282 [ 198.346708] RAX: 0000000000000000 RBX: ffff92721da17d08 RCX: 0000000000000000 [ 198.347950] RDX: 0000000000000001 RSI: ffff92727fd19b38 RDI: ffff92727fd19b38 [ 198.349150] RBP: ffff92715aad3d68 R08: 0000000000000644 R09: 0000000000aaaaaa [ 198.350323] R10: ffff92720f8fc8e8 R11: ffff927257aa9750 R12: 00000000ffffffe4 [ 198.351546] R13: ffff92715aad3dc0 R14: ffff9272098f0000 R15: ffff92721db3f800 [ 198.352786] FS: 00007f8e2e6b68c0(0000) GS:ffff92727fd00000(0000) knlGS:0000000000000000 [ 198.353994] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 198.355119] CR2: 0000000002072048 CR3: 00000001d0178000 CR4: 00000000000406e0 [ 198.356425] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 198.357676] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 198.358896] Call Trace: [ 198.359949] btrfs_start_dirty_block_groups+0x3ad/0x540 [btrfs] [ 198.361216] btrfs_commit_transaction+0x2a8/0xaa0 [btrfs] [ 198.362292] ? start_transaction+0xba/0x4b0 [btrfs] [ 198.363409] reset_balance_state+0x15d/0x1a0 [btrfs] [ 198.364607] btrfs_balance+0x47f/0x6c0 [btrfs] [ 198.365655] btrfs_ioctl_balance+0x2c2/0x370 [btrfs] [ 198.366716] btrfs_ioctl+0x153f/0x2f50 [btrfs] [ 198.367755] ? handle_pte_fault+0x411/0xb70 [ 198.368799] ? _cond_resched+0x19/0x30 [ 198.369760] ? __handle_mm_fault+0x53b/0x660 [ 198.370723] ? cred_has_capability+0x85/0x130 [ 198.371732] ? do_vfs_ioctl+0xa1/0x740 [ 198.372708] ? btrfs_ioctl_get_supported_features+0x30/0x30 [btrfs] [ 198.373758] do_vfs_ioctl+0xa1/0x740 [ 198.374655] ? handle_mm_fault+0xdd/0x210 [ 198.375626] ksys_ioctl+0x70/0x80 [ 198.376545] __x64_sys_ioctl+0x16/0x20 [ 198.377504] do_syscall_64+0x5b/0x1f0 [ 198.378415] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 198.379451] RIP: 0033:0x7f8e2d73e017 [ 198.380413] Code: 00 00 00 48 8b 05 81 7e 2b 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 51 7e 2b 00 f7 d8 64 89 01 48 [ 198.383120] RSP: 002b:00007ffe6f498f98 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [ 198.384387] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f8e2d73e017 [ 198.385616] RDX: 00007ffe6f499028 RSI: 00000000c4009420 RDI: 0000000000000004 [ 198.386803] RBP: 00007ffe6f499028 R08: 000000000206a000 R09: 0000000000000000 [ 198.388013] R10: 0000000000000541 R11: 0000000000000202 R12: 0000000000000004 [ 198.389126] R13: 00007ffe6f49bb97 R14: 0000000000000003 R15: 0000000000000000 [ 198.390220] ---[ end trace 910e18c1102a58da ]--- To reproduce: # build kernel cd linux cp config-5.5.0-rc2-00031-g2c54397216ca9 .config make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 olddefconfig prepare modules_prepare bzImage modules make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 INSTALL_MOD_PATH= modules_install cd find lib/ | cpio -o -H newc --quiet | gzip > modules.cgz git clone https://github.com/intel/lkp-tests.git cd lkp-tests bin/lkp qemu -k -m modules.cgz job-script # job-script is attached in this email Thanks, Rong Chen