From: Johannes Thumshirn <johannes.thumshirn@wdc.com>
To: HAN Yuwei <hrx@bupt.moe>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>,
Naohiro Aota <naohiro.aota@wdc.com>
Subject: Re: [BUG] cow_file_range failed and kernel panic on zoned device
Date: Tue, 21 Jul 2026 17:29:06 +0200 [thread overview]
Message-ID: <al-O9D1Pv6S8mfsy@neo> (raw)
In-Reply-To: <FC0DE3FDAD40B4C0+924da345-6000-4644-9b0d-0439e63f3381@bupt.moe>
On Tue, Jul 21, 2026 at 07:46:53PM +0800, HAN Yuwei wrote:
> Hi all,
> I have received a report from a user stating kernel panic when writing to
> HM-SMR HDD in 1TiB. The user used "mkfs.btrfs -f /dev/sdX" to create a new
> volume. And he tested xfs on the same device without any issue.
>
> Reported-By: LUO Xiang <luoxiang221@mails.ucas.ac.cn>
> HDD Model:Seagate ST18000NM009J
> uname -a:Linux pro69 7.1.3-arch2-2 #1 SMP PREEMPT_DYNAMIC Thu, 16 Jul 2026
> 17:41:28 +0000 x86_64 GNU/Linux
> btrfs-progs: local/btrfs-progs 7.1-1
> dmesg:
> [redacted]
[snip]
> Jul 19 21:28:37 pro69 kernel: BTRFS: error (device sde state A) in
> cleanup_transaction:2067: errno=-11 unknown
> Jul 19 21:28:37 pro69 kernel: BTRFS info (device sde state EA): forced
> readonly
> Jul 19 21:29:08 pro69 kernel: BTRFS error (device sde state EA):
> cow_file_range failed, root=5 inode=268 start=68295892992 len=688128
> cur_offset=68295892992 cur_alloc_size=0: -30
> Jul 19 21:29:08 pro69 kernel: writepage_delalloc: 383 callbacks suppressed
> Jul 19 21:29:08 pro69 kernel: BTRFS error (device sde state EA): failed to
> run delalloc range, root=5 ino=268 folio=68295892992 submit_bitmap=0
> start=68295892992 len=688128: -30
>
> the full dmesg can be retreived if interested.
I /think/ I know the source of the problem. Errno 11 is EAGAIN and from
writepage_delalloc() it means we've hit a "hole" or out-of-order
metadata. This is exactly the kind of bug I'm trying to fix for 2 weeks
now. Not sure why it surfaces now but I see it failing in my fstests
setups as well.
There's some hotfix attempts to it and I *hope* I have something
upstream acceptible as well soon.
This is a BTRFS specific sequential metadata thing XFS will not see
because XFS is not putting metadata on sequential zones.
I hope I can give you something to try by the end of the week.
Byte,
Johannes
next prev parent reply other threads:[~2026-07-21 15:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 11:46 [BUG] cow_file_range failed and kernel panic on zoned device HAN Yuwei
2026-07-21 15:29 ` Johannes Thumshirn [this message]
2026-07-22 11:38 ` Johannes Thumshirn
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=al-O9D1Pv6S8mfsy@neo \
--to=johannes.thumshirn@wdc.com \
--cc=hrx@bupt.moe \
--cc=linux-btrfs@vger.kernel.org \
--cc=naohiro.aota@wdc.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