diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-05-26 03:02:58 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-05-29 21:04:08 +0200 |
commit | d6290814b018aa9a81163b4c806935b315041833 (patch) | |
tree | aa4a5b75437e501032d8e8fbc6409f7cb0a9929a /fs/f2fs/super.c | |
parent | f2fs: let fstrim issue discard commands in lower priority (diff) | |
download | linux-d6290814b018aa9a81163b4c806935b315041833.tar.xz linux-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 '')
-rw-r--r-- | fs/f2fs/super.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index f31643718c76..c724347eed42 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -740,6 +740,10 @@ static int parse_options(struct super_block *sb, char *options) } else if (strlen(name) == 6 && !strncmp(name, "strict", 6)) { F2FS_OPTION(sbi).fsync_mode = FSYNC_MODE_STRICT; + } else if (strlen(name) == 9 && + !strncmp(name, "nobarrier", 9)) { + F2FS_OPTION(sbi).fsync_mode = + FSYNC_MODE_NOBARRIER; } else { kfree(name); return -EINVAL; |