Re: [RFC v2] f2fs: extent cache: support unaligned extent

Chao Yu
2021-08-04T00:55:03Z

On 2021/8/4 2:41, Jaegeuk Kim wrote:
>> @@ -247,6 +247,11 @@ static struct extent_node *__attach_extent_node(struct f2fs_sb_info *sbi,
>> INIT_LIST_HEAD(&en->list);
>> en->et = et;
>>
>> +#ifdef CONFIG_F2FS_FS_COMPRESSION
>
> Can we avoid the above ifdef?

What do you mean by "avoid", getting rid of CONFIG_F2FS_FS_COMPRESSION directly?
or wrapping codes into function and define as below?

#ifdef CONFIG_F2FS_FS_COMPRESSION
void foo() { implementation here }
#else
void foot() {}
#endif

>> static inline bool __is_extent_mergeable(struct extent_info *back,
>> - struct extent_info *front)
>> + struct extent_info *front, bool unaligned)
>> {
>> +#ifdef CONFIG_F2FS_FS_COMPRESSION
>
> Can we avoid this ifdef?