summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/data.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2014-07-23 09:57:31 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2014-07-29 05:27:48 -0700
commit0f7b2abd188089a44f60e2bf8521d1363ada9e12 (patch)
treeb03702e8aadcf265bb796c3ec31413ea081fb136 /fs/f2fs/data.c
parent9d847950770da7102d4efc02d0939ce28e3a7dd0 (diff)
downloadop-kernel-dev-0f7b2abd188089a44f60e2bf8521d1363ada9e12.zip
op-kernel-dev-0f7b2abd188089a44f60e2bf8521d1363ada9e12.tar.gz
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/data.c')
-rw-r--r--fs/f2fs/data.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index c77c667..482313d 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -139,7 +139,10 @@ void f2fs_submit_merged_bio(struct f2fs_sb_info *sbi,
/* change META to META_FLUSH in the checkpoint procedure */
if (type >= META_FLUSH) {
io->fio.type = META_FLUSH;
- io->fio.rw = WRITE_FLUSH_FUA | REQ_META | REQ_PRIO;
+ if (test_opt(sbi, NOBARRIER))
+ io->fio.rw = WRITE_FLUSH | REQ_META | REQ_PRIO;
+ else
+ io->fio.rw = WRITE_FLUSH_FUA | REQ_META | REQ_PRIO;
}
__submit_merged_bio(io);
up_write(&io->io_rwsem);
OpenPOWER on IntegriCloud