On 2019/1/8 下午3:30, Nikolay Borisov wrote:
>
>
> On 7.01.19 г. 21:10 ч., David Sterba wrote:
>> On Tue, Dec 18, 2018 at 03:10:02PM +0200, Nikolay Borisov wrote:
>>> We can never have extents marked as EXTENT_MAP_DELALLOC since this
>>> value is only ever used by btrfs_get_extent_fiemap. In this case the
>>> extent map is created by btrfs_get_extent_fiemap and is never really
>>> published, this flag is used to return the corresponding userspace one.
>>> Considering this, it's pointless having a check for EXTENT_MAP_DELALLOC
>>> in mergable_maps. Just remove it.
>>
>> An assert would be good and a comment at EXTENT_MAP_DELALLOC definition
>> repeating what's in the changelog. Otherwise ok.
>
> Do we really need the assert though, it's plainly obvious
> EXTENT_MAP_DELALLOC is only set in a single function?
IMHO ASSERT() is not for now, but for the future.
Later on maybe some modification would change when and who sets DELALLOC
bit.
(And that's why there are a lot of seemingly stupid ASSERT(), it won't
hurt anyway).
Thanks,
Qu
>
>>