btrfs-progs/check
Qu Wenruo a5f0e46ac3 btrfs-progs: check: lowmem: Remove corupted link before readding correct link
For repair_ternary_lowmem() used in lowmem mode, if it found 1 of
DIR_INDEX/DIR_ITEM/INODE_REF missing, it will try to insert correct
link.

However for case like invalid type in DIR_INDEX, we should delete the
corrupted DIR_INDEX first before inserting the correct link.

This patch will remove the corrupted link before re-inserting.
This should solve the duplicated DIR_INDEX problem in old lowmem mode
repair.

Reported-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-05-07 20:14:11 +02:00
..
main.c btrfs-progs: Unify btrfs_leaf_free_space() parameter with kernel 2018-04-24 13:00:11 +02:00
mode-common.c Btrfs-progs: check, fix false error reports for shared prealloc extents 2018-03-30 22:15:54 +02:00
mode-common.h Btrfs-progs: check, fix false error reports for shared prealloc extents 2018-03-30 22:15:54 +02:00
mode-lowmem.c btrfs-progs: check: lowmem: Remove corupted link before readding correct link 2018-05-07 20:14:11 +02:00
mode-lowmem.h btrfs-progs: check: rename files after moving code 2018-02-02 16:01:59 +01:00
mode-original.h btrfs-progs: check: original mode: Check inline extent size 2018-03-30 22:15:54 +02:00