[PATCH 0/5] btrfs-progs: add detection for unexpected file extents

Qu Wenruo <[email protected]>
Newsgroups org.kernel.vger.linux-btrfs
Message-ID <[email protected]>
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/[email protected]/


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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.