On 2019/6/6 上午12:08, David Sterba wrote:
> 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 <w...@suse.com>
> 
> I'll add it to devel, however the lowmem mode of test-check does not
> work now, so can't really test it.
> 
With this patch applies, test-fsck runs well for lowmem mode, and that's
what this patch should do.

I just tried devel branch it works as expected.

Or did you hit some new bug?

Thanks,
Qu

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to