btrfs-progs/tests/fsck-tests/039-bad-inode-mode
Qu Wenruo 680b5c171f btrfs-progs: tests: Add new images for inode mode repair functionality
Add new test image for imode repair in subvolume trees.

The new test cases including the following cases:

- Regular file with bad imode
  It still has the valid INODE_REF and parent dir has correct DIR_INDEX
  and DIR_ITEM.
  In this case, no matter if the file is empty or not, it should be
  repaired using the info from DIR_INDEX of parent dir.

- Non-empty regular file with bad imode, and without INODE_REF
  The file should be mostly an orphan, so no INODE_REF for imode lookup.
  But it has EXTENT_DATA which should be enough for imode repair.
  The repair also involves moving the orphan to lost+found dir.

- Non-empty dir with bad imode, and without INODE_REF
  Pretty much the same case, but now a directory.
  The repair also involves moving the orphan to lost+found dir.

Also rename the existing test case 039-bad-free-space-cache-inode-mode
to 039-bad-inode-mode, since now we can fix all bad imode.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2019-11-18 19:21:07 +01:00
..
.lowmem_repairable btrfs-progs: tests: Add new images for inode mode repair functionality 2019-11-18 19:21:07 +01:00
bad_free_space_cache_imode.raw.xz btrfs-progs: tests: Add new images for inode mode repair functionality 2019-11-18 19:21:07 +01:00
bad_imodes_in_subvolume_tree.img.xz btrfs-progs: tests: Add new images for inode mode repair functionality 2019-11-18 19:21:07 +01:00