summaryrefslogtreecommitdiff
path: root/fs/f2fs/file.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2018-05-25 18:02:58 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2018-05-29 12:04:08 -0700
commitd6290814b018aa9a81163b4c806935b315041833 (patch)
treeaa4a5b75437e501032d8e8fbc6409f7cb0a9929a /fs/f2fs/file.c
parent9a997188ff7ab2110c6fefa85977d1aa8005ae77 (diff)
downloadlwn-d6290814b018aa9a81163b4c806935b315041833.tar.gz
lwn-d6290814b018aa9a81163b4c806935b315041833.zip
f2fs: add fsync_mode=nobarrier for non-atomic files
For non-atomic files, this patch adds an option to give nobarrier which doesn't issue flush commands to the device. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r--fs/f2fs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index cc08956334a0..bd81207206d8 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -306,7 +306,7 @@ sync_nodes:
remove_ino_entry(sbi, ino, APPEND_INO);
clear_inode_flag(inode, FI_APPEND_WRITE);
flush_out:
- if (!atomic)
+ if (!atomic && F2FS_OPTION(sbi).fsync_mode != FSYNC_MODE_NOBARRIER)
ret = f2fs_issue_flush(sbi, inode->i_ino);
if (!ret) {
remove_ino_entry(sbi, ino, UPDATE_INO);