On Fri, May 17, 2019 at 10:00:03PM +0800, Qu Wenruo wrote: > In lowmem mode, we check fs roots and free space cache by iterating > each root item and inode item, using btrfs_next_item() and a path > pointing to the root tree. > > However in repair mode, check_fs_root() can modify the fs root, thus > CoWs the tree root, and the old path in check_fs > > It could lead to strange behavior, e.g. after repairing a fs tree, the > path can point to a fs tree. > Since no ROOT_ITEM exists in fs tree, all remaining trees are skipped in > repair mode. > > This bug exists from the early time of lowmem mode repair, and is only > exposed by recent free space inode check code. (Fs tree inodes are > passed to free space inode check, causing false alerts and repair > failure). > > Signed-off-by: Qu Wenruo <wqu@xxxxxxxx> I'll add it to devel, however the lowmem mode of test-check does not work now, so can't really test it.
