diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2014-12-23 09:29:44 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-12-29 17:13:41 +0100 |
commit | 0f38766b8fe9d8c5c77a707fa1d24824df09d18a (patch) | |
tree | 272b5977e04c8b2eb62b5a6509dc4158eb05016e /cmds-filesystem.c | |
parent | 44d3ee3e1f94acf71d52016f771988196955c259 (diff) | |
download | btrfs-progs-0f38766b8fe9d8c5c77a707fa1d24824df09d18a.tar.gz |
btrfs-progs: Fix a bug in reset_nlink() which may deletes the recovered file
In reset_nlink(), we believe rec->found_link as accurate number of the
valid links. However it only records the number of found DIR_ITEM, so we
can't use it as reliable value.
Before this patch, in some case, leaf corruption recovery will believe
there is a valid backref but don't add_link() since it can't find any
valid one and don't put it into the lost+found dir.
So the recovered inode will be considered as an orphan item without
orphan item and repair_inode_orphan_item() will add orphan item for it,
causing all the filename/filetype we recovered being a waste of time.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-filesystem.c')
0 files changed, 0 insertions, 0 deletions