diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-06-03 19:29:38 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-06-13 11:55:21 -0700 |
commit | 36abef4e796d382e81a0c2d21ea5327481dd7154 (patch) | |
tree | 64ddad32e0f684ef7a5b5d734bbc7a4684c8bafa /fs/f2fs/file.c | |
parent | aa987273290d206b298e9d09db83e32ead661098 (diff) | |
download | linux-36abef4e796d382e81a0c2d21ea5327481dd7154.tar.bz2 |
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/file.c')
-rw-r--r-- | fs/f2fs/file.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 7a8d262bc488..b9d745ef5b08 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -878,9 +878,15 @@ static int __exchange_data_block(struct inode *inode, pgoff_t src, return full ? truncate_hole(inode, dst, dst + 1) : 0; if (do_replace) { - struct page *ipage = get_node_page(sbi, inode->i_ino); + struct page *ipage; struct node_info ni; + if (test_opt(sbi, LFS)) { + ret = -ENOTSUPP; + goto err_out; + } + + ipage = get_node_page(sbi, inode->i_ino); if (IS_ERR(ipage)) { ret = PTR_ERR(ipage); goto err_out; |