summaryrefslogtreecommitdiff
path: root/fs/f2fs/segment.c
diff options
context:
space:
mode:
authorGu Zheng <guz.fnst@cn.fujitsu.com>2014-04-11 17:49:55 +0800
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2014-05-07 10:21:54 +0900
commitb270ad6f0aedd27bdc689fc15f26bc650a59b12b (patch)
tree118bc6580c235fc4553dde45e19d3fcdb980f354 /fs/f2fs/segment.c
parent197d46476c3ba5f8595209025d20953a0c851748 (diff)
f2fs: enable flush_merge only in f2fs is not read-only
Enable flush_merge only in f2fs is not read-only, so does the mount option show. Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r--fs/f2fs/segment.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index ba067b1b8107..1e264e761f71 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -1859,10 +1859,9 @@ int build_segment_manager(struct f2fs_sb_info *sbi)
sm_info->nr_discards = 0;
sm_info->max_discards = 0;
- if (test_opt(sbi, FLUSH_MERGE)) {
+ if (test_opt(sbi, FLUSH_MERGE) && !f2fs_readonly(sbi->sb)) {
spin_lock_init(&sm_info->issue_lock);
init_waitqueue_head(&sm_info->flush_wait_queue);
-
sm_info->f2fs_issue_flush = kthread_run(issue_flush_thread, sbi,
"f2fs_flush-%u:%u", MAJOR(dev), MINOR(dev));
if (IS_ERR(sm_info->f2fs_issue_flush))