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, 31 May 2018 18:31:46 +0000 (11:31 -0700)
commit054afda9991786ead2c2b57cdf3b28d4dd3709f2
tree93d71cc38ebdd79e73f618afd235215095e573f9
parentd0891e84e1e61938aa8a3b75cb10a34769de022a
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