From: Marc MERLIN <marc@merlins.org>
To: linux-btrfs <linux-btrfs@vger.kernel.org>,
Boris Burkov <boris@bur.io>, Josef Bacik <josef@toxicpanda.com>,
QuWenruo <wqu@suse.com>, Qu Wenruo <quwenruo.btrfs@gmx.com>,
Filipe Manana <fdmanana@kernel.org>
Cc: Chris Murphy <lists@colorremedies.com>,
Zygo Blaxell <ce3g8jdj@umail.furryterror.org>,
Roman Mamedov <rm@romanrm.net>, To: Su Yue <Damenly_Su@gmx.com>,
Su Yue <suy.fnst@cn.fujitsu.com>;
Subject: Re: BTRFS discard crash: failed to run delayed ref for logical 15506102321152 num_bytes 16384 type 182 action 2 ref_mod 1: -2 6.11.2)
Date: Sun, 12 Apr 2026 13:21:46 -0700 [thread overview]
Message-ID: <adv-2iUrLuHK7MsJ@merlins.org> (raw)
In-Reply-To: <advYoKqUCUmD4oO6@merlins.org>
One last ditch effort from Gemini:
moremagic:~# btrfs rescue zero-log /dev/mapper/crypt_bcache0
Clearing log on /dev/mapper/crypt_bcache0, previous log_root 0, level 0
moremagic:~# mount -o rw,clear_cache,skip_balance /dev/mapper/crypt_bcache0 /mnt/btrfs_bigbackup
mount: /mnt/btrfs_bigbackup: fsconfig() failed: No such file or directory.
dmesg(1) may have more information after failed mount system call.
moremagic:~# mount -wno remount,skip_balance /mnt/btrfs_bigbackup/
^^^ works, filesystem is still there:
Read/write still failing :-/
Gemini says the following, whether it's right or wrong about the
details, it would be nice to have a way to btrfs --repair or force
cleanup/revert/delete on read-write mount to recover to a working state.
Coping 22TB off from r/o FS is pointless, it's an offsite backup, never mind
that I have nowhere to copy that too anyway, I really would like to
get it back to read/write if there isn't massive corruption, and there
does not seem to be.
Btrfs operates on a strict "clean up your mess first" policy.
Read-Only: The kernel simply reads the B-trees as they currently exist
on the disk. It completely ignores the Btrfs "to-do" list (the delayed
refs and the aborted relocation tree).
Read-Write: The kernel refuses to let you write new data until it
finishes the aborted relocation from when the system crashed days
ago. It tries to execute that "to-do" list, hits the corrupted Extent
Tree/Squota bug (ENOENT), and instantly panics and aborts the mount to
prevent further corruption.
Because there is no skip_relocation mount option in the Linux kernel,
you cannot force this filesystem to mount Read-Write without clearing
that broken tree. And because standard tools cannot clear a broken
relocation tree offline, the RW mount is effectively bricked.
moremagic:~# mount -wno remount,skip_balance /mnt/btrfs_bigbackup/
kernel: usb 2-1: reset SuperSpeed USB device number 3 using xhci-hcd
kernel: ------------[ cut here ]------------
kernel: BTRFS: Transaction aborted (error -2)
kernel: WARNING: CPU: 1 PID: 325244 at fs/btrfs/extent-tree.c:2996 __btrfs_free_extent.isra.0+0x13a0/0x14a0 [btrfs]
kernel: Modules linked in: dm_crypt dm_mod bcache raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xt_MASQUERADE ipt_REJECT nf_reject_ipv4 xt_tcpudp xt_conntrack xt_LOG nf_log_syslog nft_compat nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables rfcomm algif_hash algif_skcipher af_alg bnep cp210x brcmfmac_wcc binfmt_misc usbserial hci_uart brcmfmac btbcm vc4 snd_soc_hdmi_codec brcmutil bluetooth drm_display_helper cfg80211 cec drm_dma_helper rpi_hevc_dec ecdh_generic v4l2_mem2mem ecc snd_soc_core pisp_be videobuf2_dma_contig v3d videobuf2_memops videobuf2_v4l2 gpu_sched rfkill videodev drm_shmem_helper snd_compress snd_pcm_dmaengine snd_pcm videobuf2_common rp1_pio snd_timer snd drm_kms_helper mc raspberrypi_gpiomem rp1_fw sg sch_fq_codel ecryptfs fuse drm drm_panel_orientation_quirks backlight nfnetlink ip_tables x_tables raid1 aes_ce_blk aes_ce_cipher ghash_ce gf128mul libaes sha2_ce spidev sha256_arm64 sha1_ce raspberrypi_hwmon sha1_generic ahci i2c_brcmstb spi_bcm2835
kernel: md_mod gpio_keys libahci pwm_fan rp1_adc libata rp1_mailbox nvmem_rmem uio_pdrv_genirq uio btrfs blake2b_generic xor xor_neon raid6_pq zram lz4_compress ipv6
kernel: CPU: 1 UID: 0 PID: 325244 Comm: mount Tainted: G W 6.12.47+rpt-rpi-2712 #1 Debian 1:6.12.47-1+rpt1
kernel: Tainted: [W]=WARN
kernel: Hardware name: Raspberry Pi 5 Model B Rev 1.1 (DT)
kernel: pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
kernel: pc : __btrfs_free_extent.isra.0+0x13a0/0x14a0 [btrfs]
kernel: lr : __btrfs_free_extent.isra.0+0x13a0/0x14a0 [btrfs]
kernel: sp : ffffc0008a843820
kernel: x29: ffffc0008a8438c0 x28: 0000000000000000 x27: 0000000000002f02
kernel: x26: 000000000000007f x25: ffff80011fbbae60 x24: 0000000000004000
kernel: x23: 0000000000000000 x22: ffff8001033a9068 x21: 0000000000004000
kernel: x20: 00000e1a4bb88000 x19: 00000000fffffffe x18: 0000000000000000
kernel: x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
kernel: x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
kernel: x11: 00000000000000c0 x10: 0000000000001a40 x9 : ffffd06fce4e06c0
kernel: x8 : ffff80011e5a9ea0 x7 : ffffc0008293bc30 x6 : 0000000000000043
kernel: x5 : 0000000000000001 x4 : 0000000000001ab0 x3 : 0000000000000804
kernel: x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff80011e5a8400
kernel: Call trace:
kernel: __btrfs_free_extent.isra.0+0x13a0/0x14a0 [btrfs]
kernel: __btrfs_run_delayed_refs+0x508/0xec0 [btrfs]
kernel: btrfs_run_delayed_refs+0x48/0x198 [btrfs]
kernel: btrfs_commit_transaction+0x88/0xe20 [btrfs]
kernel: btrfs_recover_relocation+0x55c/0x5d0 [btrfs]
kernel: btrfs_start_pre_rw_mount+0x1d4/0x470 [btrfs]
kernel: btrfs_reconfigure+0x198/0x6d8 [btrfs]
kernel: reconfigure_super+0xc8/0x260
kernel: __arm64_sys_fsconfig+0x510/0x5b8
kernel: invoke_syscall+0x50/0x120
kernel: el0_svc_common.constprop.0+0x48/0xf0
kernel: do_el0_svc+0x24/0x38
kernel: el0_svc+0x30/0xf8
kernel: el0t_64_sync_handler+0x120/0x130
kernel: el0t_64_sync+0x190/0x198
kernel: ---[ end trace 0000000000000000 ]---
kernel: BTRFS: error (device dm-0 state MA) in do_free_extent_accounting:2996: errno=-2 No such entry
kernel: BTRFS error (device dm-0 state EMA): failed to run delayed ref for logical 15506102321152 num_bytes 16384 type 182 action 2 ref_mod 1: -2
kernel: BTRFS: error (device dm-0 state EMA) in btrfs_run_delayed_refs:2215: errno=-2 No such entry
kernel: BTRFS warning (device dm-0 state EMA): failed to recover relocation: -2
mount: /mnt/btrfs_bigbackup: fsconfig() failed: No such file or directory.
dmesg(1) may have more information after failed mount system call.
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Home page: http://marc.merlins.org/ | PGP 7F55D5F27AAF9D08
WARNING: multiple messages have this Message-ID (diff)
From: Marc MERLIN <marc_btrfs@merlins.org>
To: linux-btrfs <linux-btrfs@vger.kernel.org>,
Boris Burkov <boris@bur.io>, Josef Bacik <josef@toxicpanda.com>,
QuWenruo <wqu@suse.com>, Qu Wenruo <quwenruo.btrfs@gmx.com>,
Filipe Manana <fdmanana@kernel.org>
Cc: Chris Murphy <lists@colorremedies.com>,
Zygo Blaxell <ce3g8jdj@umail.furryterror.org>,
Roman Mamedov <rm@romanrm.net>, To: Su Yue <Damenly_Su@gmx.com>,
Su Yue <suy.fnst@cn.fujitsu.com>;
Subject: Re: BTRFS discard crash: failed to run delayed ref for logical 15506102321152 num_bytes 16384 type 182 action 2 ref_mod 1: -2 6.11.2)
Date: Sun, 12 Apr 2026 13:21:46 -0700 [thread overview]
Message-ID: <adv-2iUrLuHK7MsJ@merlins.org> (raw)
Message-ID: <20260412202146.ut6NvgbK0X9WjeawuKMeD8LDD3d-kItoKDcolpz0xTw@z> (raw)
In-Reply-To: <advYoKqUCUmD4oO6@merlins.org>
One last ditch effort from Gemini:
moremagic:~# btrfs rescue zero-log /dev/mapper/crypt_bcache0
Clearing log on /dev/mapper/crypt_bcache0, previous log_root 0, level 0
moremagic:~# mount -o rw,clear_cache,skip_balance /dev/mapper/crypt_bcache0 /mnt/btrfs_bigbackup
mount: /mnt/btrfs_bigbackup: fsconfig() failed: No such file or directory.
dmesg(1) may have more information after failed mount system call.
moremagic:~# mount -wno remount,skip_balance /mnt/btrfs_bigbackup/
^^^ works, filesystem is still there:
Read/write still failing :-/
Gemini says the following, whether it's right or wrong about the
details, it would be nice to have a way to btrfs --repair or force
cleanup/revert/delete on read-write mount to recover to a working state.
Coping 22TB off from r/o FS is pointless, it's an offsite backup, never mind
that I have nowhere to copy that too anyway, I really would like to
get it back to read/write if there isn't massive corruption, and there
does not seem to be.
Btrfs operates on a strict "clean up your mess first" policy.
Read-Only: The kernel simply reads the B-trees as they currently exist
on the disk. It completely ignores the Btrfs "to-do" list (the delayed
refs and the aborted relocation tree).
Read-Write: The kernel refuses to let you write new data until it
finishes the aborted relocation from when the system crashed days
ago. It tries to execute that "to-do" list, hits the corrupted Extent
Tree/Squota bug (ENOENT), and instantly panics and aborts the mount to
prevent further corruption.
Because there is no skip_relocation mount option in the Linux kernel,
you cannot force this filesystem to mount Read-Write without clearing
that broken tree. And because standard tools cannot clear a broken
relocation tree offline, the RW mount is effectively bricked.
moremagic:~# mount -wno remount,skip_balance /mnt/btrfs_bigbackup/
kernel: usb 2-1: reset SuperSpeed USB device number 3 using xhci-hcd
kernel: ------------[ cut here ]------------
kernel: BTRFS: Transaction aborted (error -2)
kernel: WARNING: CPU: 1 PID: 325244 at fs/btrfs/extent-tree.c:2996 __btrfs_free_extent.isra.0+0x13a0/0x14a0 [btrfs]
kernel: Modules linked in: dm_crypt dm_mod bcache raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xt_MASQUERADE ipt_REJECT nf_reject_ipv4 xt_tcpudp xt_conntrack xt_LOG nf_log_syslog nft_compat nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables rfcomm algif_hash algif_skcipher af_alg bnep cp210x brcmfmac_wcc binfmt_misc usbserial hci_uart brcmfmac btbcm vc4 snd_soc_hdmi_codec brcmutil bluetooth drm_display_helper cfg80211 cec drm_dma_helper rpi_hevc_dec ecdh_generic v4l2_mem2mem ecc snd_soc_core pisp_be videobuf2_dma_contig v3d videobuf2_memops videobuf2_v4l2 gpu_sched rfkill videodev drm_shmem_helper snd_compress snd_pcm_dmaengine snd_pcm videobuf2_common rp1_pio snd_timer snd drm_kms_helper mc raspberrypi_gpiomem rp1_fw sg sch_fq_codel ecryptfs fuse drm drm_panel_orientation_quirks backlight nfnetlink ip_tables x_tables raid1 aes_ce_blk aes_ce_cipher ghash_ce gf128mul libaes sha2_ce spidev sha256_arm64 sha1_ce raspberrypi_hwmon sha1_generic ahci i2c_brcmstb spi_bcm2835
kernel: md_mod gpio_keys libahci pwm_fan rp1_adc libata rp1_mailbox nvmem_rmem uio_pdrv_genirq uio btrfs blake2b_generic xor xor_neon raid6_pq zram lz4_compress ipv6
kernel: CPU: 1 UID: 0 PID: 325244 Comm: mount Tainted: G W 6.12.47+rpt-rpi-2712 #1 Debian 1:6.12.47-1+rpt1
kernel: Tainted: [W]=WARN
kernel: Hardware name: Raspberry Pi 5 Model B Rev 1.1 (DT)
kernel: pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
kernel: pc : __btrfs_free_extent.isra.0+0x13a0/0x14a0 [btrfs]
kernel: lr : __btrfs_free_extent.isra.0+0x13a0/0x14a0 [btrfs]
kernel: sp : ffffc0008a843820
kernel: x29: ffffc0008a8438c0 x28: 0000000000000000 x27: 0000000000002f02
kernel: x26: 000000000000007f x25: ffff80011fbbae60 x24: 0000000000004000
kernel: x23: 0000000000000000 x22: ffff8001033a9068 x21: 0000000000004000
kernel: x20: 00000e1a4bb88000 x19: 00000000fffffffe x18: 0000000000000000
kernel: x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
kernel: x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
kernel: x11: 00000000000000c0 x10: 0000000000001a40 x9 : ffffd06fce4e06c0
kernel: x8 : ffff80011e5a9ea0 x7 : ffffc0008293bc30 x6 : 0000000000000043
kernel: x5 : 0000000000000001 x4 : 0000000000001ab0 x3 : 0000000000000804
kernel: x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff80011e5a8400
kernel: Call trace:
kernel: __btrfs_free_extent.isra.0+0x13a0/0x14a0 [btrfs]
kernel: __btrfs_run_delayed_refs+0x508/0xec0 [btrfs]
kernel: btrfs_run_delayed_refs+0x48/0x198 [btrfs]
kernel: btrfs_commit_transaction+0x88/0xe20 [btrfs]
kernel: btrfs_recover_relocation+0x55c/0x5d0 [btrfs]
kernel: btrfs_start_pre_rw_mount+0x1d4/0x470 [btrfs]
kernel: btrfs_reconfigure+0x198/0x6d8 [btrfs]
kernel: reconfigure_super+0xc8/0x260
kernel: __arm64_sys_fsconfig+0x510/0x5b8
kernel: invoke_syscall+0x50/0x120
kernel: el0_svc_common.constprop.0+0x48/0xf0
kernel: do_el0_svc+0x24/0x38
kernel: el0_svc+0x30/0xf8
kernel: el0t_64_sync_handler+0x120/0x130
kernel: el0t_64_sync+0x190/0x198
kernel: ---[ end trace 0000000000000000 ]---
kernel: BTRFS: error (device dm-0 state MA) in do_free_extent_accounting:2996: errno=-2 No such entry
kernel: BTRFS error (device dm-0 state EMA): failed to run delayed ref for logical 15506102321152 num_bytes 16384 type 182 action 2 ref_mod 1: -2
kernel: BTRFS: error (device dm-0 state EMA) in btrfs_run_delayed_refs:2215: errno=-2 No such entry
kernel: BTRFS warning (device dm-0 state EMA): failed to recover relocation: -2
mount: /mnt/btrfs_bigbackup: fsconfig() failed: No such file or directory.
dmesg(1) may have more information after failed mount system call.
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Home page: http://marc.merlins.org/ | PGP 7F55D5F27AAF9D08
next prev parent reply other threads:[~2026-04-12 20:21 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-11 3:35 BTRFS discard crash: failed to run delayed ref for logical 15506102321152 num_bytes 16384 type 182 action 2 ref_mod 1: -2 6.11.2) Marc MERLIN
2026-04-11 4:47 ` Qu Wenruo
2026-04-11 12:04 ` Roman Mamedov
2026-04-11 16:22 ` Marc MERLIN
2026-04-12 1:57 ` Marc MERLIN
2026-04-12 1:57 ` Marc MERLIN
2026-04-12 2:28 ` Marc MERLIN
2026-04-12 2:28 ` Marc MERLIN
2026-04-12 17:38 ` Marc MERLIN
2026-04-12 17:38 ` Marc MERLIN
2026-04-12 20:21 ` Marc MERLIN [this message]
2026-04-12 20:21 ` Marc MERLIN
2026-04-13 2:14 ` Roman Mamedov
2026-04-13 2:34 ` Marc MERLIN
2026-04-13 2:34 ` Marc MERLIN
2026-04-13 17:52 ` Simple quota unsafe? RIP: 0010:__btrfs_free_extent.isra.0+0xc41/0x1020 [btrfs] / do_free_extent_accounting:2999: errno=-2 No such entry Marc MERLIN
2026-04-13 17:52 ` Marc MERLIN
2026-04-13 18:47 ` Boris Burkov
2026-04-13 19:40 ` Marc MERLIN
2026-04-13 19:40 ` Marc MERLIN
2026-04-15 5:21 ` Marc MERLIN
2026-04-15 17:05 ` Boris Burkov
2026-04-15 17:59 ` Marc MERLIN
2026-04-15 18:44 ` Boris Burkov
2026-04-15 20:22 ` Marc MERLIN
2026-04-15 22:36 ` Boris Burkov
2026-04-15 22:55 ` Marc MERLIN
2026-04-15 23:25 ` Boris Burkov
2026-04-16 0:55 ` Marc MERLIN
2026-04-16 1:22 ` Boris Burkov
2026-04-16 0:45 ` Boris Burkov
2026-04-16 1:08 ` Marc MERLIN
2026-04-16 1:25 ` Boris Burkov
2026-04-16 16:51 ` Simple quota unsafe (FIXED: btrfstune --remove-simple-quota worked) Marc MERLIN
2026-04-16 17:21 ` Simple quota unsafe? RIP: 0010:__btrfs_free_extent.isra.0+0xc41/0x1020 [btrfs] / do_free_extent_accounting:2999: errno=-2 No such entry Marc MERLIN
2026-04-16 21:36 ` Boris Burkov
2026-04-16 21:47 ` Marc MERLIN
2026-04-17 21:51 ` Boris Burkov
2026-04-17 22:37 ` Marc MERLIN
2026-04-17 23:16 ` Boris Burkov
2026-04-18 0:18 ` Marc MERLIN
2026-04-22 2:26 ` Boris Burkov
2026-04-22 6:08 ` Marc MERLIN
2026-04-22 17:10 ` Deleted snapshots stay in squota, mayube because of bees? Marc MERLIN
2026-04-22 19:23 ` Boris Burkov
2026-04-22 19:30 ` Marc MERLIN
2026-04-22 19:38 ` Boris Burkov
2026-04-22 20:11 ` Marc MERLIN
2026-04-23 19:28 ` Boris Burkov
2026-04-24 2:55 ` Marc MERLIN
2026-04-17 3:43 ` BTRFS discard crash: failed to run delayed ref for logical 15506102321152 num_bytes 16384 type 182 action 2 ref_mod 1: -2 6.11.2) David Disseldorp
2026-04-17 5:19 ` Marc MERLIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=adv-2iUrLuHK7MsJ@merlins.org \
--to=marc@merlins.org \
--cc=Damenly_Su@gmx.com \
--cc=boris@bur.io \
--cc=ce3g8jdj@umail.furryterror.org \
--cc=fdmanana@kernel.org \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=lists@colorremedies.com \
--cc=quwenruo.btrfs@gmx.com \
--cc=rm@romanrm.net \
--cc=suy.fnst@cn.fujitsu.com \
--cc=wqu@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.