diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-06-04 04:29:38 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-06-13 20:55:21 +0200 |
commit | 36abef4e796d382e81a0c2d21ea5327481dd7154 (patch) | |
tree | 64ddad32e0f684ef7a5b5d734bbc7a4684c8bafa /fs/f2fs/recovery.c | |
parent | f2fs: skip clean segment for gc (diff) | |
download | linux-36abef4e796d382e81a0c2d21ea5327481dd7154.tar.xz linux-36abef4e796d382e81a0c2d21ea5327481dd7154.zip |
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/recovery.c')
-rw-r--r-- | fs/f2fs/recovery.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index b568b28c74f2..a39d84ab66b2 100644 --- a/fs/f2fs/recovery.c +++ b/fs/f2fs/recovery.c @@ -624,8 +624,12 @@ out: if (err) { bool invalidate = false; - if (discard_next_dnode(sbi, blkaddr)) + if (test_opt(sbi, LFS)) { + update_meta_page(sbi, NULL, blkaddr); invalidate = true; + } else if (discard_next_dnode(sbi, blkaddr)) { + invalidate = true; + } /* Flush all the NAT/SIT pages */ while (get_pages(sbi, F2FS_DIRTY_META)) |