[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180125105727.50357-3-yuchao0@huawei.com>
Date: Thu, 25 Jan 2018 18:57:27 +0800
From: Chao Yu <yuchao0@...wei.com>
To: <jaegeuk@...nel.org>
CC: <linux-f2fs-devel@...ts.sourceforge.net>,
<linux-kernel@...r.kernel.org>, <chao@...nel.org>,
Chao Yu <yuchao0@...wei.com>
Subject: [PATCH 3/3] f2fs: stop issuing discard if fs is readonly
If filesystem is readonly, stop to issue discard in daemon.
Signed-off-by: Chao Yu <yuchao0@...wei.com>
---
fs/f2fs/segment.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 34206acb883b..7b5d0634d29b 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -1406,6 +1406,8 @@ static int issue_discard_thread(void *data)
msecs_to_jiffies(wait_ms));
if (try_to_freeze())
continue;
+ if (f2fs_readonly(sbi->sb))
+ continue;
if (kthread_should_stop())
return 0;
--
2.15.0.55.gc2ece9dc4de6
Powered by blists - more mailing lists