Re: [PATCH v2] f2fs: don't call f2fs_issue_discard_timeout() when discard_cmd_cnt is 0 in f2fs_put_super()

From: Yangtao Li
Date: Mon Dec 12 2022 - 09:15:47 EST


Hi Chao,

> The difference here is, if we use f2fs_realtime_discard_enable() in
> f2fs_put_super(), we will only write checkpoint w/ CP_TRIMMED flag
> when discard option is enable and device supports discard.

> But actually, if discard option is disabled, we still needs to give
> put_super() a chance to write checkpoint w/ CP_TRIMMED flag.

Why do we still have to set the CP_TRIMMED flag when the discard opt is not set.
Did I miss something?

Thx,
Yangtao