All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] btrfs-progs: add detection for unexpected file extents
@ 2026-08-18  9:29 Qu Wenruo
  2026-08-18  9:29 ` [PATCH 1/5] btrfs-progs: corrupt-block: allow inode corruption to use --value option Qu Wenruo
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Qu Wenruo @ 2026-08-18  9:29 UTC (permalink / raw)
  To: linux-btrfs

There is a kernel patch (*) which mentioned a corrupted fs image where
there is at least one file extent item which shouldn't exist, as the
inode is not a symlink or regular file.

It turns out btrfs check can not detect such case.

The first 3 patches introduce the ability to generate such image.

The 4th patch adds the detection ability, and the last one is the test
case.

*: https://lore.kernel.org/linux-btrfs/20260817132051.267646-1-gality369@gmail.com/


Qu Wenruo (5):
  btrfs-progs: corrupt-block: allow inode corruption to use --value
    option
  btrfs-progs: corrupt-block: allow dir item corruption to use --value
    option
  btrfs-progs: corrupt-block: allow corrupting dir item flags
  btrfs-progs: check: detect invalid file extent items
  btrfs-progs: fsck-test: add a test case for unexpected file extent
    items

 btrfs-corrupt-block.c                         |  68 ++++++++++--------
 check/main.c                                  |   5 ++
 check/mode-lowmem.c                           |  26 ++++---
 .../075-blk-inode-with-data/default.img.xz    | Bin 0 -> 2104 bytes
 .../075-blk-inode-with-data/test.sh           |  16 +++++
 5 files changed, 77 insertions(+), 38 deletions(-)
 create mode 100644 tests/fsck-tests/075-blk-inode-with-data/default.img.xz
 create mode 100755 tests/fsck-tests/075-blk-inode-with-data/test.sh

--
2.54.0


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

end of thread, other threads:[~2026-08-18  9:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-18  9:29 [PATCH 0/5] btrfs-progs: add detection for unexpected file extents Qu Wenruo
2026-08-18  9:29 ` [PATCH 1/5] btrfs-progs: corrupt-block: allow inode corruption to use --value option Qu Wenruo
2026-08-18  9:29 ` [PATCH 2/5] btrfs-progs: corrupt-block: allow dir item " Qu Wenruo
2026-08-18  9:29 ` [PATCH 3/5] btrfs-progs: corrupt-block: allow corrupting dir item flags Qu Wenruo
2026-08-18  9:29 ` [PATCH 4/5] btrfs-progs: check: detect invalid file extent items Qu Wenruo
2026-08-18  9:29 ` [PATCH 5/5] btrfs-progs: fsck-test: add a test case for unexpected " Qu Wenruo

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.