[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20221028143022.56476-1-frank.li@vivo.com>
Date: Fri, 28 Oct 2022 22:30:22 +0800
From: Yangtao Li <frank.li@...o.com>
To: jaegeuk@...nel.org, chao@...nel.org
Cc: linux-f2fs-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, Yangtao Li <frank.li@...o.com>
Subject: [PATCH] f2fs: stop issue discard if has fsck tag
Under the current logic, after the fsck flag is set,
the discard thread will still run periodically.
Fixes: d618477473eb ("f2fs: stop issue discard if something wrong with f2fs")
Signed-off-by: Yangtao Li <frank.li@...o.com>
---
fs/f2fs/segment.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 7786351de429..b3600bcadfc7 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -1716,8 +1716,8 @@ static int issue_discard_thread(void *data)
if (kthread_should_stop())
return 0;
if (is_sbi_flag_set(sbi, SBI_NEED_FSCK)) {
- wait_ms = dpolicy.max_interval;
- continue;
+ dcc->f2fs_issue_discard = NULL;
+ return 0;
}
if (!atomic_read(&dcc->discard_cmd_cnt))
continue;
--
2.25.1
Powered by blists - more mailing lists