f2fs: allocate hot_data for atomic write more strictly
authorYunlei He <heyunlei@huawei.com>
Wed, 18 Apr 2018 03:06:39 +0000 (11:06 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 28 Jun 2018 22:49:24 +0000 (15:49 -0700)
commit318a9d5ae78c34b89444ab6a1c9230ebaf5fb050
tree0c43d840c33ff74d9001e80f9364329ea2a3d24d
parentbd5f1c23a7d0223c66ffc670bec16d20732e80f0
f2fs: allocate hot_data for atomic write more strictly

If a file not set type as hot, has dirty pages more than
threshold 64 before starting atomic write, may be lose hot
flag.

v1->v2: move set FI_ATOMIC_FILE flag behind flush dirty pages too,
in case of dirty pages before starting atomic use atomic mode to
write back.

Signed-off-by: Yunlei He <heyunlei@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c