Re: [PATCH] f2fs: merge f2fs_show_injection_info() into time_to_inject()
From: Yangtao Li
Date: Fri Dec 16 2022 - 23:52:18 EST
Hi Chao,
> Yeah, but it depends on compile option, right? If user use -O0 or -fno-inline option, inline function will not be expanded...
This is not a problem, we just need to mark it as __always_inline.
static __always_inline bool __time_to_inject(struct f2fs_sb_info *sbi, int type,
const char *func_name)
> How about using deterministic implementation?
This way works, or do you have a better suggestion. After marking the function as __always_inline,
there will be no problem you mentioned.
Thx,
Yangtao