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 - 08:06:11 EST


Hi,

> static inline bool f2fs_realtime_discard_enable(struct f2fs_sb_info *sbi) {
> return (test_opt(sbi, DISCARD) && f2fs_hw_support_discard(sbi)) ||
> f2fs_hw_should_discard(sbi);
> }

> It looks the logic is changed?

For a storage device that does not support discard, and we have not actually
issued any discard command. I don't think it is necessary and f2fs should not
be equipped with trim markers.

Thx,
Yangtao