Re: [PATCH 2/3] btrfs-progs: properly reset nlink of multi-linked file

2015-12-07 Thread David Sterba
On Fri, Dec 04, 2015 at 02:37:26PM +0900, Naohiro Aota wrote: > If a file is linked from more than one directory and only one > of the links is corrupted, btrfs check dose not reset the nlink > properly. Actually it can go into infinite loop to link the broken file > into lost+found. > > This

[PATCH 2/3] btrfs-progs: properly reset nlink of multi-linked file

2015-12-04 Thread Naohiro Aota
If a file is linked from more than one directory and only one of the links is corrupted, btrfs check dose not reset the nlink properly. Actually it can go into infinite loop to link the broken file into lost+found. This patch fix two part of the code. The first one delay the freeing valid (no