summaryrefslogtreecommitdiff
path: root/fs/f2fs/data.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2016-06-13 16:47:48 (GMT)
committerJaegeuk Kim <jaegeuk@kernel.org>2016-07-06 17:44:07 (GMT)
commit52763a4b7a2112743745c5bbfe43fe6f54d4b39a (patch)
tree42b1ca3efc444ed16b29796fd13d7054737ab20c /fs/f2fs/data.c
parent67c3758d2267de589ee9a8856fe637cce85993d9 (diff)
downloadlinux-52763a4b7a2112743745c5bbfe43fe6f54d4b39a.tar.xz
f2fs: detect host-managed SMR by feature flag
If mkfs.f2fs gives a feature flag for host-managed SMR, we can set mode=lfs by default. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r--fs/f2fs/data.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 607ef43..0832528 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -102,7 +102,8 @@ static inline void __submit_bio(struct f2fs_sb_info *sbi, int rw,
{
if (!is_read_io(rw)) {
atomic_inc(&sbi->nr_wb_bios);
- if (current->plug && (type == DATA || type == NODE))
+ if (f2fs_sb_mounted_hmsmr(sbi->sb) &&
+ current->plug && (type == DATA || type == NODE))
blk_finish_plug(current->plug);
}
submit_bio(rw, bio);