On Tue, Aug 25, 2015 at 10:44:57AM +0800, Qu Wenruo wrote: > [BUG] > btrfs-find-root may not output desire result, as due to > search_extent_cache() may return result which doesn't cover the desired > range, generation cache can be screwed up if higher generation tree root > is found before lower generation tree root. > > For example: > ======= > ./btrfs-find-root /dev/sda6 -a > Superblock thinks the generation is 8 > Superblock thinks the level is 0 > adding bytenr: 4194304, gen: 8 <<< Debug output > adding bytenr: 24715264, gen: 7 <<< gen is 7 at read_tree_block time > Well block 4194304(gen: 8 level: 0) seems good, and it matches > superblock > Well block 24715264(gen: 8 level: 0) seems good, and it matches > superblock <<< But its gen is wrong at result output time > ======= > > [Fix] > Add a new judgment to make sure the search_extent_cache() is returning > desired result. > > Reported-by: Marc Merlin <marc@xxxxxxxxxxx> > Signed-off-by: Qu Wenruo <quwenruo@xxxxxxxxxxxxxx> Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
