btrfs-progs/check
Qu Wenruo 8d6c444782 btrfs-progs: check: lowmem: Fix false alert about orphan inode
Btrfs can delay inode deletion and in that case btrfs will unlink the
victim inode from its parent dir, and insert a marker to info btrfs to
delete it later.

In that case, such victim inode will have nlinks == 0, but is still
completely valid.
Original mode won't report such problem, but lowmem mode doesn't check
the ORPHAN_ITEM key for such inode, and can report false alert like:
------
ERROR: root 257 INODE[28891726] is orphan item
------

Fix such false alert by checking orphan item for inode whose nlink is 0.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-03-30 22:15:54 +02:00
..
main.c btrfs-progs: free-space-cache: Enhance free space cache free space check 2018-03-30 22:15:53 +02:00
mode-common.c btrfs-progs: check: rename files after moving code 2018-02-02 16:01:59 +01:00
mode-common.h btrfs-progs: check: rename files after moving code 2018-02-02 16:01:59 +01:00
mode-lowmem.c btrfs-progs: check: lowmem: Fix false alert about orphan inode 2018-03-30 22:15:54 +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: rename files after moving code 2018-02-02 16:01:59 +01:00