public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] btrfs-progs: enhance detection on unknown keys in subvolumes
@ 2025-12-16  9:23 Qu Wenruo
  2025-12-16  9:23 ` [PATCH v2 1/2] btrfs-progs: enhance detection on unknown inode keys Qu Wenruo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Qu Wenruo @ 2025-12-16  9:23 UTC (permalink / raw)
  To: linux-btrfs

[CHANGELOG]
v2:
- Add a new test case

This is inspired by a real world bitflip corruption, where an INODE_REF
is now 8 (an unknown key type), causing btrfs-check to freak out and the
existing INODE_REF/DIR_ITEM/DIR_INDEX repair is not cutting this
particular case for the original mode.

Lowmem mode is better, but for this particular image it's too large and
lowmem is too slow to be practical.

As the first step, detect and report such unknown keys in subvolume
trees as an error.

With a new test case for it.

In the long run we should allow btrfs-check --repair to delete such
unknown keys.

Qu Wenruo (2):
  btrfs-progs: enhance detection on unknown inode keys
  btrfs-progs: add a test case for unknown keys in subvolume trees

 check/main.c                                     |   7 +++++++
 check/mode-lowmem.c                              |   5 +++--
 check/mode-lowmem.h                              |   1 +
 tests/fsck-tests/069-unknown-fs-tree-key/test.sh |  14 ++++++++++++++
 .../unknown_key_empty.img.xz                     | Bin 0 -> 2084 bytes
 5 files changed, 25 insertions(+), 2 deletions(-)
 create mode 100755 tests/fsck-tests/069-unknown-fs-tree-key/test.sh
 create mode 100644 tests/fsck-tests/069-unknown-fs-tree-key/unknown_key_empty.img.xz

--
2.52.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-01-24  1:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-16  9:23 [PATCH v2 0/2] btrfs-progs: enhance detection on unknown keys in subvolumes Qu Wenruo
2025-12-16  9:23 ` [PATCH v2 1/2] btrfs-progs: enhance detection on unknown inode keys Qu Wenruo
2025-12-16  9:23 ` [PATCH v2 2/2] btrfs-progs: add a test case for unknown keys in subvolume trees Qu Wenruo
2026-01-24  1:05 ` [PATCH v2 0/2] btrfs-progs: enhance detection on unknown keys in subvolumes David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox