From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 2/3] btrfs-progs: check/lowmem: fix false alerts about EXTENT_OWNER
Date: Sun, 12 Apr 2026 14:38:44 +0930 [thread overview]
Message-ID: <eb292f78aff9a587ea35534aebddb551beee2be4.1775970499.git.wqu@suse.com> (raw)
In-Reply-To: <cover.1775970499.git.wqu@suse.com>
[BUG]
When simple quota is enabled, lowmem will give false alerts:
[3/8] checking extents
ERROR: extent[13631488 168 1048576] has unknown ref type: 172
ERROR: extent[63963136 168 131072] has unknown ref type: 172
ERROR: extent[63963136 168 131072] has unknown ref type: 172
ERROR: file extent[257 0] root 256 owner 256 backref lost
ERROR: extent[13631488 168 1048576] has unknown ref type: 172
ERROR: file extent[258 0] root 256 owner 256 backref lost
ERROR: errors found in extent allocation tree or chunk allocation
[CAUSE]
Lowmem mode has strict checks on the inlined backref type, and
unfortunately EXTENT_OWNER_REF is not inside the support 4 backre types,
thus it's treated as an unknown type, and caused the false alerts.
[FIX]
Add the EXTENT_OWNER_REF type into the supported types.
For lowmem check itself, those key types are just skipped as it's only
to indicate the owner of a data extent, which will be verified by qgroup
part.
Signed-off-by: Qu Wenruo <wqu@suse.com>
---
check/mode-lowmem.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index 9db58f6c1702..a7465268ad89 100644
--- a/check/mode-lowmem.c
+++ b/check/mode-lowmem.c
@@ -3053,6 +3053,7 @@ static int check_extent_inline_ref(struct extent_buffer *eb,
case BTRFS_EXTENT_DATA_REF_KEY:
case BTRFS_SHARED_BLOCK_REF_KEY:
case BTRFS_SHARED_DATA_REF_KEY:
+ case BTRFS_EXTENT_OWNER_REF_KEY:
ret = 0;
break;
default:
@@ -4645,6 +4646,12 @@ next:
parent = offset;
tmp_err |= check_shared_data_backref(offset, key.objectid);
break;
+ case BTRFS_EXTENT_OWNER_REF_KEY:
+ /*
+ * This is showing the initial owner for SIMPLE QUOTA.
+ * It will be hanled by qgroup check, skip it here.
+ */
+ break;
default:
error("extent[%llu %d %llu] has unknown ref type: %d",
key.objectid, key.type, key.offset, type);
--
2.53.0
next prev parent reply other threads:[~2026-04-12 5:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-12 5:08 [PATCH 0/3] btrfs-progs: check/lowmem: fix false alerts on Qu Wenruo
2026-04-12 5:08 ` [PATCH 1/3] btrfs-progs: print-tree: fix the format string for EXTENT_OWNER_REF_KEY Qu Wenruo
2026-04-12 5:08 ` Qu Wenruo [this message]
2026-04-12 5:08 ` [PATCH 3/3] btrfs-progs: fsck-tests: add a new test case for squota lowmem false alerts Qu Wenruo
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=eb292f78aff9a587ea35534aebddb551beee2be4.1775970499.git.wqu@suse.com \
--to=wqu@suse.com \
--cc=linux-btrfs@vger.kernel.org \
/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