[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4414ea75-7fd9-258c-789a-3026c1117630@kernel.org>
Date: Tue, 20 Dec 2022 15:24:47 +0800
From: Chao Yu <chao@...nel.org>
To: Yangtao Li <frank.li@...o.com>, jaegeuk@...nel.org
Cc: linux-f2fs-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] f2fs: merge f2fs_show_injection_info() into
time_to_inject()
On 2022/12/19 21:25, Yangtao Li wrote:
> There is no need to additionally use f2fs_show_injection_info()
> to output information. Concatenate time_to_inject() and
> __time_to_inject() via a macro. In the new __time_to_inject()
> function, pass in the caller function name. And in order to avoid
> this inline function is not expanded causing __builtin_return_address(0)
> return address of of time_to_inject(), mark time_to_inject() as
> __always_inline.
IMO, we'd better have a good reason (maybe performace related) to change
inline to __always_inline, rather than avoiding printed message change
due to compile option.
> -static inline bool time_to_inject(struct f2fs_sb_info *sbi, int type)
> +#define time_to_inject(sbi, type) __time_to_inject(sbi, type, __func__)
> +static __always_inline bool __time_to_inject(struct f2fs_sb_info *sbi, int type,
> + const char *func_name)
How about:
#define time_to_inject(sbi, type) __time_to_inject(sbi, type, __func__, \
__builtin_return_address(0))
static inline bool __time_to_inject(struct f2fs_sb_info *sbi, int type,
const char *func, const char *parent_func)
Thanks,
Powered by blists - more mailing lists