[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fc34fe7c-c7ec-3783-8cbc-de91ab81ee0a@kernel.org>
Date: Wed, 11 Aug 2021 21:44:52 +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, Fengnan Chang <changfengnan@...o.com>
Subject: Re: [PATCH 2/2] fs: Don't create discard thread when device not
support realtime discard
On 2021/8/11 21:18, Yangtao Li wrote:
> From: Fengnan Chang <changfengnan@...o.com>
>
> Don't create discard thread when device not support realtime discard.
>
> Signed-off-by: Fengnan Chang <changfengnan@...o.com>
> Signed-off-by: Yangtao Li <frank.li@...o.com>
> ---
> fs/f2fs/segment.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index 363779a4402d..bc4ac46f3041 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -2161,6 +2161,8 @@ static int create_discard_cmd_control(struct f2fs_sb_info *sbi)
> init_waitqueue_head(&dcc->discard_wait_queue);
> SM_I(sbi)->dcc_info = dcc;
> init_thread:
> + if (!f2fs_realtime_discard_enable(sbi))
How about below case:
- mount -o nodiscard <dev> <mp>
- mount -o remount,discard <dev> <mp>
Thanks,
> + return err;
> dcc->f2fs_issue_discard = kthread_run(issue_discard_thread, sbi,
> "f2fs_discard-%u:%u", MAJOR(dev), MINOR(dev));
> if (IS_ERR(dcc->f2fs_issue_discard)) {
>
Powered by blists - more mailing lists