summaryrefslogtreecommitdiff
path: root/fs/f2fs/segment.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2014-07-23 20:57:31 +0400
committerJaegeuk Kim <jaegeuk@kernel.org>2014-07-29 16:27:48 +0400
commit0f7b2abd188089a44f60e2bf8521d1363ada9e12 (patch)
treeb03702e8aadcf265bb796c3ec31413ea081fb136 /fs/f2fs/segment.c
parent9d847950770da7102d4efc02d0939ce28e3a7dd0 (diff)
downloadlinux-0f7b2abd188089a44f60e2bf8521d1363ada9e12.tar.xz
f2fs: add nobarrier mount option
This patch adds a mount option, nobarrier, in f2fs. The assumption in here is that file system keeps the IO ordering, but doesn't care about cache flushes inside the storages. Reviewed-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r--fs/f2fs/segment.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 8a6e57d83c79..9fce0f47eb35 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -239,6 +239,9 @@ int f2fs_issue_flush(struct f2fs_sb_info *sbi)
struct flush_cmd_control *fcc = SM_I(sbi)->cmd_control_info;
struct flush_cmd cmd;
+ if (test_opt(sbi, NOBARRIER))
+ return 0;
+
if (!test_opt(sbi, FLUSH_MERGE))
return blkdev_issue_flush(sbi->sb->s_bdev, GFP_KERNEL, NULL);