f2fs: support hot file extension
authorChao Yu <yuchao0@huawei.com>
Wed, 28 Feb 2018 09:07:27 +0000 (17:07 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Sun, 8 Apr 2018 11:11:39 +0000 (04:11 -0700)
commitea34734357a9df8760cc0708c5777bf7213cd971
tree8c30d938d88b65f2a3d0a73d9018986f2b9a8e9d
parent2189c2e464686588e5d5592a10d4d4590c9f7894
f2fs: support hot file extension

This patch supports to recognize hot file extension in f2fs, so that we
can allocate proper hot segment location for its data, which can lead to
better hot/cold seperation in filesystem.

In addition, we changes a bit on query/add/del operation method for
extension_list sysfs entry as below:

- Query: cat /sys/fs/f2fs/<disk>/extension_list
- Add: echo 'extension' > /sys/fs/f2fs/<disk>/extension_list
- Del: echo '!extension' > /sys/fs/f2fs/<disk>/extension_list
- Add: echo '[h/c]extension' > /sys/fs/f2fs/<disk>/extension_list
- Del: echo '[h/c]!extension' > /sys/fs/f2fs/<disk>/extension_list
- [h] means add/del hot file extension
- [c] means add/del cold file extension

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Documentation/ABI/testing/sysfs-fs-f2fs
fs/f2fs/f2fs.h
fs/f2fs/namei.c
fs/f2fs/segment.c
fs/f2fs/sysfs.c
include/linux/f2fs_fs.h