diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-06-04 05:29:38 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-06-13 21:55:21 +0300 |
commit | 36abef4e796d382e81a0c2d21ea5327481dd7154 (patch) | |
tree | 64ddad32e0f684ef7a5b5d734bbc7a4684c8bafa /fs/f2fs/data.c | |
parent | aa987273290d206b298e9d09db83e32ead661098 (diff) | |
download | linux-36abef4e796d382e81a0c2d21ea5327481dd7154.tar.xz |
f2fs: introduce mode=lfs mount option
This mount option is to enable original log-structured filesystem forcefully.
So, there should be no random writes for main area.
Especially, this supports host-managed SMR device.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r-- | fs/f2fs/data.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 5f655d0c5b1f..607ef4397330 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1710,6 +1710,8 @@ static ssize_t f2fs_direct_IO(struct kiocb *iocb, struct iov_iter *iter) if (f2fs_encrypted_inode(inode) && S_ISREG(inode->i_mode)) return 0; + if (test_opt(F2FS_I_SB(inode), LFS)) + return 0; trace_f2fs_direct_IO_enter(inode, offset, count, iov_iter_rw(iter)); |