From: Marc MERLIN <marc_btrfs@merlins.org>
To: Roman Mamedov <rm@romanrm.net>, Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>,
Boris Burkov <boris@bur.io>, Josef Bacik <josef@toxicpanda.com>,
QuWenruo <wqu@suse.com>, Filipe Manana <fdmanana@kernel.org>,
Chris Murphy <lists@colorremedies.com>,
Zygo Blaxell <ce3g8jdj@umail.furryterror.org>,
Su Yue <Damenly_Su@gmx.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: Sat, 11 Apr 2026 09:22:49 -0700 [thread overview]
Message-ID: <adp1WXwBWt2HjYj2@merlins.org> (raw)
In-Reply-To: <03e3077a-28a4-4e68-af01-940eed58689e@gmx.com> <20260411170453.7bfe9b1e@nvm>
Thanks both for the answers.
> didn't capture the initial "crash". So it might be just a coincidence, or it
> might be not. And like Mr. Qu, I am also skeptical of the AI fantasies in this
> case.
>
> Be aware of the write hole issue when running Btrfs on top of a multi-device
> mdraid. In case of a system crash, some devices might have stripes written and
> synced to disk, and others not. This is can easily lead Btrfs into the
> infamous "parent transid verify failed" state, from which there's no good way
> out.
1) there was no system crash or power off that I can remember, at least
not recently.
2) I do have all the logs from the start, here they are: https://pastebin.com/7HmQwy3n
3) AI may have been wrong about linking me enabling trim to the crash
but they sure happened a few minutes apart. Could have been coincidence.
4) write hole: I do have md5 "Intent Bitmap : Internal" which indeed
prioritizes rebuild over fixing the write hole (mdadm can't do both,
sadly). I'm honestly sad that mdadm does not allow PPL (closing write
hole and intent bitmap for reasonable rebuild times)
5) the mdadm layer does not help, I would love to use built in btrfs
raid5 but last info I read still says it also has write hole or other
issues and can't really ever be production ready
5) RST is supposed to fix this but https://btrfs.readthedocs.io/en/latest/Status.html
says it's not ready, and why I asked about status recently, no answer
yet: https://yhbt.net/lore/linux-btrfs/adbgT-3VINfJNctk@merlins.org/#r
So raid5 and btrfs are still problematic :-/
On Sat, Apr 11, 2026 at 02:17:24PM +0930, Qu Wenruo wrote:
> Please try skip_balance to see if the fs can be mounted, then cancel the
> relocation.
I tried many mounts with skip_balance, they all still crashed.
You can find them all in https://pastebin.com/7HmQwy3n
> Then re-run btrfs check so we do not have balance complicating the
> situation.
My first one crashed due to OOM, I added 64GB swap and am trying again.
> > btrfstune --convert-from-block-group-tree /dev/mapper/crypt_bcache0
>
> Please do not do whatever writes to the fs until you know why you should do
> that.
> And in this case, this will only make things worse.
Sequence of mount commands:
mount -t btrfs -o ro,nologreplay,skip_balance,clear_cache /dev/mapper/crypt_bcache0 /mnt/btrfs_bigbackup
umount /mnt/btrfs_bigbackup
=> worked, but ro
mount -t btrfs -o ro,nologreplay,skip_balance,clear_cache /dev/mapper/crypt_bcache0 /mnt/btrfs_bigbackup/
mount -o remount,rw,skip_balance /mnt/btrfs_bigbackup/
umount /mnt/btrfs_bigbackup/
=> Could not remount with skip_balance
all of these failed and caused the mounts in https://pastebin.com/7HmQwy3n
mount -t btrfs -o nologreplay,skip_balance,clear_cache /dev/mapper/crypt_bcache0 /mnt/btrfs_bigbackup/
mount -t btrfs -o skip_balance,clear_cache /dev/mapper/crypt_bcache0 /mnt/btrfs_bigbackup/
mount -t btrfs -o skip_balance,usebackuproot /dev/mapper/crypt_bcache0 /mnt/btrfs_bigbackup/
mount -t btrfs -o skip_balance /dev/mapper/crypt_bcache0 /mnt/btrfs_bigbackup/
mount -t btrfs -o rw,skip_balance,space_cache=v2,clear_cache /dev/mapper/crypt_bcache0 /mnt/btrfs_bigbackup
Once I dropped the cache (clear_cache), I was forced to downgrade
with --convert-from-block-group-tree
> Now I do not even know if this is the original problem or something
> introduced by your writes.
Hopefully https://pastebin.com/7HmQwy3n shows the original issue
> Next time, please do not do whatever crazy/stupid things unless *YOU* know
> the reason.
I'm in the middle of a maintenance, I don't have a support contract with
you the few people who know who to read this, and to be honest I have
found pretty much no good debug info or guide on the net.
Even looking for the status of RST and how usable, it is, or not, I
found nothing on the official pages, and when I wrote on this list to
ask, I got 0 reply.
So I'm not saying it's great or smart to use an LLM, but if there is no
easily findable (or any) information on how to debug all those things
without reading/knowing the kernel code, what is the recommended path
for an end user?
Thanks,
Marc
--
"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-11 16:22 UTC|newest]
Thread overview: 43+ 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 [this message]
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
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-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=adp1WXwBWt2HjYj2@merlins.org \
--to=marc_btrfs@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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox