diff options
| author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-06-13 09:47:48 -0700 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-13 12:33:47 +0200 |
| commit | 7dfdc5d50d83903c2ab949a9f9f75e58caf80bbd (patch) | |
| tree | 56a35f0e8ffa83f2dba73918047e419e8fd6c379 /fs/f2fs/data.c | |
| parent | 141dc83414de5b74e9ce4832b864021e6f370a89 (diff) | |
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 42ee22270..bb7185bf3 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -103,7 +103,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); |
