Re: [PATCH v2 01/10] btrfs: backref: Introduce the skeleton of btrfs_backref_iter

Qu Wenruo
2020-03-04T00:52:30Z

[-- Attachment #1.1: Type: text/plain, Size: 748 bytes --]

On 2020/3/4 上午1:25, David Sterba wrote:
> On Mon, Mar 02, 2020 at 05:45:44PM +0800, Qu Wenruo wrote:
>> +struct btrfs_backref_iter {
>> + u64 bytenr;
>> + struct btrfs_path *path;
>> + struct btrfs_fs_info *fs_info;
>> + struct btrfs_key cur_key;
>
>> + unsigned long item_ptr;
>> + unsigned long cur_ptr;
>> + unsigned long end_ptr;
>
> I think these can be u32, only processing the leaf data, this would save
> some stack space consumed by the iterators.
>

The only reason is we need to do force type convert, as it needs to be
converted to pointer.

But since it's all used inside backref iter functions, it shouldn't
cause much trouble for callers.

So I'll update it to u32 in next version.

Thanks,
Qu

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]