Re: [PATCH 1/3] btrfs-progs: use btrfs_key for btrfs_check_node() and btrfs_check_leaf()

Qu Wenruo
2021-09-03T22:24:04Z

On 2021/9/3 下午10:02, David Sterba wrote:
> On Thu, Sep 02, 2021 at 09:08:41PM +0800, Qu Wenruo wrote:
>> In kernel space we hardly use btrfs_disk_key, unless for very lowlevel
>> code.
>>
>> There is no need to intentionally use btrfs_disk_key in btrfs-progs
>> either.
>>
>> Signed-off-by: Qu Wenruo <wqu@suse.com>
>
> This fails on fsck/001 test
>
> [TEST/fsck] 001-bad-file-extent-bytenr
> failed to restore image ./default_case.img
> basename: missing operand
> Try 'basename --help' for more information.
> failed: /labs/dsterba/gits/btrfs-progs/btrfs check --repair --force
> make: *** [Makefile:413: test-fsck] Error 1
>

Not reproducible locally.

And of course, for such lowlevel change I would run all tests on it.

Mind to share the base?

I'm basing all my patches on the following commit:

commit 06bae7076265242f118471ce8c4340dcc5e3f555 (david/devel)
Author: Josef Bacik <josef@toxicpanda.com>
Date: Mon Aug 23 15:23:13 2021 -0400

btrfs-progs: tests: add image with an invalid super bytes_used

And I also re-checked the test on this patch, it also passes locally.

Thanks,
Qu