summaryrefslogtreecommitdiff
path: root/btrfs-convert.c
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2015-02-23 16:00:04 +0800
committerDavid Sterba <dsterba@suse.cz>2015-02-24 15:22:34 +0100
commit8e2e9e473f3f37c58afb80477354732b139c8231 (patch)
treed0c9ad6eaa1b9c774165643b4ed6aeaa26e71c0b /btrfs-convert.c
parent05bc145189d612b98138b3294f5648005ee1370e (diff)
btrfs-progs: Fix a infinite loop when fixing nlink if file name conflicts twice.
There is a case that can cause nlink fix function. For example, lost+found dir already has the following files: --------------------------- |ino |filename | |-------------------------| |258 |normal_file | |259 |normal_file.260 | --------------------------- The next inode to be fixed is the following: --------------------------- |260 |normail_file | --------------------------- And when trying to move inode to lost+found dir, its file name conflicts with inode 258, and even add ".INO" suffix, it still conflicts with inode 259. Since the move failed, the LINK_COUNT_ERR flag is not cleared, the inode record will not be freed, btrfsck will try fix it again and again, causing the infinite loop. The patch will first change the ".INO" suffix naming to a loop behavior, and clear the LINK_COUNT_ERR flag anyway to avoid infinite loop. Reported-by: Naohiro Aota <naota@elisp.net> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'btrfs-convert.c')
0 files changed, 0 insertions, 0 deletions