Open kdave opened 1 year ago
And because the balance item is already stored umount/mount will instantly go read-only:
[ 4038.576986] BTRFS info (device sdi): using crc32c (crc32c-generic) checksum algorithm
[ 4038.586067] BTRFS info (device sdi): using free space tree
[ 4038.632560] BTRFS info (device sdi): host-managed zoned block device /dev/sdi, 40 zones of 268435456 bytes
[ 4038.644614] BTRFS info (device sdi): host-managed zoned block device /dev/sdj, 40 zones of 268435456 bytes
[ 4038.656432] BTRFS info (device sdi): host-managed zoned block device /dev/sdk, 40 zones of 268435456 bytes
[ 4038.667879] BTRFS info (device sdi): host-managed zoned block device /dev/sdl, 40 zones of 268435456 bytes
[ 4038.678744] BTRFS info (device sdi): zoned mode enabled with zone size 268435456
[ 4038.723594] BTRFS error (device sdi): zoned: profile raid1 not yet supported
[ 4038.733609] ------------[ cut here ]------------
[ 4038.739601] BTRFS: Transaction aborted (error -22)
[ 4038.739847] WARNING: CPU: 7 PID: 6833 at fs/btrfs/extent-tree.c:4043 find_free_extent_update_loop+0x48f/0x4c0 [btrfs]
[ 4038.827205] CPU: 7 PID: 6833 Comm: btrfs-balance Tainted: G W 6.6.0-rc4-git+ #972
[ 4038.827235] Hardware name: empty empty/S3993, BIOS PAQEX0-3 02/24/2008
[ 4038.827255] RIP: 0010:find_free_extent_update_loop+0x48f/0x4c0 [btrfs]
[ 4038.850727] RSP: 0018:ffff8881175d7428 EFLAGS: 00010282
[ 4038.850756] RAX: 0000000000000000 RBX: ffff8881214f0000 RCX: 0000000000000027
[ 4038.882853] RDX: 0000000000000027 RSI: 0000000000000004 RDI: ffff8881e73ee888
[ 4038.882865] RBP: 0000000000000001 R08: ffffffffad3282fe R09: ffffed103ce7dd11
[ 4038.882876] R10: ffff8881e73ee88b R11: 00000000322d2072 R12: 00000000ffffffea
[ 4038.882888] R13: ffff8881505e6eb0 R14: ffff8881505e6e60 R15: ffff888111a9c000
[ 4038.882902] FS: 0000000000000000(0000) GS:ffff8881e7200000(0000) knlGS:0000000000000000
[ 4038.882914] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 4038.926752] CR2: 00007f30a6674040 CR3: 0000000106cfd000 CR4: 00000000000006e0
[ 4038.926764] Call Trace:
[ 4038.926780] <TASK>
[ 4038.926793] ? __warn+0xa1/0x210
[ 4038.942504] ? find_free_extent_update_loop+0x48f/0x4c0 [btrfs]
[ 4038.942956] ? __report_bug+0x11b/0x130
[ 4038.942991] ? find_free_extent_update_loop+0x48f/0x4c0 [btrfs]
[ 4038.943395] ? report_bug+0x3f/0x90
[ 4038.963404] ? handle_bug+0x3c/0x70
[ 4038.963424] ? exc_invalid_op+0x14/0x40
[ 4038.971170] ? asm_exc_invalid_op+0x16/0x20
[ 4038.971221] ? irq_work_claim+0x1e/0x40
[ 4038.979698] ? find_free_extent_update_loop+0x48f/0x4c0 [btrfs]
[ 4038.986309] ? find_free_extent_update_loop+0x48f/0x4c0 [btrfs]
[ 4038.986782] find_free_extent+0xb4d/0x13d0 [btrfs]
[ 4038.987311] ? find_free_extent_clustered+0x550/0x550 [btrfs]
[ 4038.987745] ? do_raw_spin_unlock+0x93/0xf0
[ 4038.987784] ? _raw_spin_unlock+0x1f/0x40
[ 4038.987840] btrfs_reserve_extent+0x1fd/0x380 [btrfs]
[ 4038.988321] ? walk_down_tree+0x2b0/0x2b0 [btrfs]
[ 4038.988747] ? __lock_release+0x14d/0x530
[ 4038.988843] ? btrfs_use_block_rsv+0x146/0x350 [btrfs]
[ 4038.989312] ? do_raw_spin_unlock+0x93/0xf0
[ 4038.989342] ? _raw_spin_unlock+0x1f/0x40
[ 4038.989383] btrfs_alloc_tree_block+0x194/0x590 [btrfs]
[ 4038.989892] ? btrfs_alloc_logged_file_extent+0x250/0x250 [btrfs]
[ 4038.990350] ? mark_usage+0x90/0x190
[ 4038.990379] ? mark_usage+0xa0/0x190
[ 4039.063547] ? lock_acquire.part.0+0xf1/0x2a0
[ 4039.063569] ? __btrfs_tree_lock+0x3c/0x150 [btrfs]
[ 4039.073329] __btrfs_cow_block+0x26f/0xc60 [btrfs]
[ 4039.073860] ? update_ref_for_cow+0x5b0/0x5b0 [btrfs]
[ 4039.084435] ? btrfs_qgroup_add_swapped_blocks+0x4e0/0x4e0 [btrfs]
[ 4039.084894] ? btrfs_root_node+0xb0/0x260 [btrfs]
[ 4039.096554] btrfs_cow_block+0x20b/0x3a0 [btrfs]
[ 4039.096998] ? btrfs_search_slot_get_root+0x1f7/0x3c0 [btrfs]
[ 4039.108133] btrfs_search_slot+0x919/0xf80 [btrfs]
[ 4039.108625] ? balance_level+0x12d0/0x12d0 [btrfs]
[ 4039.109025] ? join_transaction+0x75a/0x830 [btrfs]
[ 4039.109442] ? btrfs_record_root_in_trans+0x3f/0xd0 [btrfs]
[ 4039.130544] btrfs_insert_empty_items+0x65/0xb0 [btrfs]
[ 4039.130986] insert_balance_item.isra.0+0x126/0x700 [btrfs]
[ 4039.142477] ? gather_device_info+0x3d0/0x3d0 [btrfs]
[ 4039.142892] ? mark_usage+0x190/0x190
[ 4039.142915] ? balance_kthread+0xc5/0x280 [btrfs]
[ 4039.157315] ? __lock_acquired+0x1f1/0x3d0
[ 4039.157374] ? mark_lock.part.0+0xdd/0xa40
[ 4039.166235] ? mark_lock_irq+0x5b0/0x5b0
[ 4039.166262] ? lock_downgrade+0x90/0x90
[ 4039.166279] ? lock_acquired+0xb3/0x180
[ 4039.166297] ? rcu_is_watching+0x1f/0x40
[ 4039.182628] ? mark_held_locks+0x6b/0x90
[ 4039.182689] btrfs_balance+0x774/0xcb0 [btrfs]
[ 4039.191528] ? btrfs_balance+0xcb0/0xcb0 [btrfs]
[ 4039.191967] balance_kthread+0xe7/0x280 [btrfs]
[ 4039.201834] kthread+0x19e/0x1e0
[ 4039.201851] ? kthread+0xf3/0x1e0
[ 4039.201865] ? kthread_complete_and_exit+0x20/0x20
[ 4039.213814] ret_from_fork+0x2d/0x50
[ 4039.213830] ? kthread_complete_and_exit+0x20/0x20
[ 4039.213852] ret_from_fork_asm+0x11/0x20
[ 4039.226811] </TASK>
[ 4039.226823] irq event stamp: 1775
[ 4039.226831] hardirqs last enabled at (1781): [<ffffffffad1b9485>] console_trylock_spinning+0x175/0x190
[ 4039.226853] hardirqs last disabled at (1786): [<ffffffffad1b9490>] console_trylock_spinning+0x180/0x190
[ 4039.226873] softirqs last enabled at (1686): [<ffffffffadfda473>] __do_softirq+0x2e3/0x542
[ 4039.226899] softirqs last disabled at (1681): [<ffffffffad0dbf15>] irq_exit_rcu+0x95/0xc0
[ 4039.226917] ---[ end trace 0000000000000000 ]---
[ 4039.227389] BTRFS: error (device sdi: state A) in find_free_extent_update_loop:4043: errno=-22 unknown
[ 4039.227438] BTRFS info (device sdi: state EA): forced readonly
Fixable by mounting with -o skip_balance
and btrfs balance cancel .
but still.
I can to it convert to raid1. you may want to retry it. until you may hit other bug
4 devices, created with
-d single -m single
, the commandbtrfs balance start -mconvert=raid1
leads to transaction abort. There should be a nicer error handling.