f2fs: add mount option for segment allocation policy
authorJaegeuk Kim <jaegeuk@kernel.org>
Sun, 18 Feb 2018 16:50:49 +0000 (08:50 -0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Sun, 8 Apr 2018 11:11:28 +0000 (04:11 -0700)
commit073c145d5bef370801f66b3451ee7a9097f10107
tree1b2c8e163afcffe5a612eb24039db565d0642a7e
parente7efe40d7aa5b2f6ecbabf6afef20702ed539411
f2fs: add mount option for segment allocation policy

This patch adds an mount option, "alloc_mode=%s" having two options, "default"
and "reuse".

In "alloc_mode=reuse" case, f2fs starts to allocate segments from 0'th segment
all the time to reassign segments. It'd be useful for small-sized eMMC parts.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Documentation/filesystems/f2fs.txt
fs/f2fs/f2fs.h
fs/f2fs/segment.c
fs/f2fs/super.c