On 2018年01月15日 09:59, Lu Fengqi wrote:
> On Mon, Jan 15, 2018 at 09:26:27AM +0800, Qu Wenruo wrote:
>>
>>
>> On 2018年01月15日 00:38, Sebastian Andrzej Siewior wrote:
>>> On 2018-01-14 08:36:41 [+0800], Qu Wenruo wrote:
>>>> Still needs more. (and maybe even more depending on the output)
>>>>
>>>> The original mode doesn't report error clear enough, so it would help if
>>>> --mode=lowmem can be used.
>>>>
>>>> # btrfs check --mode=lowmem /dev/sdb4
>>>
>>> ~# btrfs check --mode=lowmem /dev/sdb4
>>> Checking filesystem on /dev/sdb4
>>> UUID: b3bfb56e-d445-4335-93f0-c1fb2d1f6df1
>>> checking extents
>>> checking free space cache
>>> Wanted bytes 4096, found 8192 for off 159178047488
>>> Wanted bytes 1073725440, found 8192 for off 159178047488
>>> cache appears valid but isn't 159178031104
>>> ERROR: errors found in free space cache
>>
>> A new bug is exposed for lowmem mode.
>> It doesn't check fs tree if space cache has any problem.
>>
> 
> Just a reminder, the problem is not only for lowmem mode.

Right, I'll fix it soon.

And BTW what makes the the output different from the original one?

Sebastaian, did you do extra write or other operation to the fs after
previous btrfs check?

Thanks,
Qu

> 
>         ret = check_space_cache(root);
>         err |= !!ret;
>         if (ret) {
>                 if (btrfs_fs_compat_ro(info, FREE_SPACE_TREE))
>                         error("errors found in free space tree");
>                 else
>                         error("errors found in free space cache");
>                 goto out;
>                 ^^^
>         }
> 
>         /*
>          * We used to have to have these hole extents in between our real
>          * extents so if we don't have this flag set we need to make sure 
> there
>          * are no gaps in the file extents for inodes, otherwise we can just
>          * ignore it when this happens.
>          */
>         no_holes = btrfs_fs_incompat(root->fs_info, NO_HOLES);
>         ret = do_check_fs_roots(info, &root_cache);
>               ^^^
>         err |= !!ret;
>         if (ret) {
>                 error("errors found in fs roots");
>                 goto out;
>         }
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to