Re: [PATCH v2 05/19] btrfs: make btrfs_fs_info::buffer_radix to take sector size devided values

Johannes Thumshirn
2020-09-15T10:12:39Z

On 15/09/2020 12:04, Qu Wenruo wrote:
>
>
> On 2020/9/15 下午4:27, Johannes Thumshirn wrote:
>> On 15/09/2020 07:36, Qu Wenruo wrote:
>>> eb = radix_tree_lookup(&fs_info->buffer_radix,
>>> - start >> PAGE_SHIFT);
>>> + start / fs_info->sectorsize);
>>
>>
>> These should be div_u64(start, fs_info->sectorsize) I think.
>> At least 'start' is a u64.
>>
> Do we need to call div_u64() if it's u64/u32?

I'm not entirely sure either, that's the problem.

>
> Anyway, the final version would utilize something like sector_shift.
>
> Thanks,
> Qu
>