From: Chao Yu <chao@kernel.org>
To: Yangtao Li <frank.li@vivo.com>, jaegeuk@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH v2] f2fs: don't call f2fs_issue_discard_timeout() when discard_cmd_cnt is 0 in f2fs_put_super()
Date: Mon, 12 Dec 2022 21:50:08 +0800 [thread overview]
Message-ID: <974f5013-b6af-a39e-0b0f-2ce86253eaeb@kernel.org> (raw)
In-Reply-To: <20221212130554.79049-1-frank.li@vivo.com>
On 2022/12/12 21:05, Yangtao Li wrote:
> 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.
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.
Thanks,
>
> Thx,
> Yangtao
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2022-12-12 13:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-02 4:58 [f2fs-dev] [PATCH v2] f2fs: don't call f2fs_issue_discard_timeout() when discard_cmd_cnt is 0 in f2fs_put_super() Yangtao Li via Linux-f2fs-devel
2022-12-11 2:27 ` Chao Yu
2022-12-12 13:05 ` Yangtao Li via Linux-f2fs-devel
2022-12-12 13:50 ` Chao Yu [this message]
2022-12-12 14:14 ` Yangtao Li via Linux-f2fs-devel
2022-12-12 14:34 ` Chao Yu
2022-12-12 22:45 ` Jaegeuk Kim
2022-12-13 1:32 ` Chao Yu
2022-12-13 1:41 ` Jaegeuk Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=974f5013-b6af-a39e-0b0f-2ce86253eaeb@kernel.org \
--to=chao@kernel.org \
--cc=frank.li@vivo.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).