Re: [f2fs-dev] [PATCH v2 3/3] f2fs: check if swapfile is section-alligned

From: Chao Yu
Date: Mon Mar 01 2021 - 09:16:57 EST


On 2021/3/1 12:58, Huang Jianan via Linux-f2fs-devel wrote:
If the swapfile isn't created by pin and fallocate, it can't be
guaranteed section-aligned, so it may be selected by f2fs gc. When
gc_pin_file_threshold is reached, the address of swapfile may change,
but won't be synchronized to swap_extent, so swap will write to wrong
address, which will cause data corruption.

Signed-off-by: Huang Jianan <huangjianan@xxxxxxxx>
Signed-off-by: Guo Weichao <guoweichao@xxxxxxxx>

Reviewed-by: Chao Yu <yuchao0@xxxxxxxxxx>

Thanks,