f2fs: avoid swapon failure by giving a warning first
authorJaegeuk Kim <jaegeuk@kernel.org>
Tue, 11 May 2021 21:38:47 +0000 (14:38 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 12 May 2021 03:51:53 +0000 (20:51 -0700)
commitca298241bc229303ff683db7265a2c625a9c00fe
tree66f0a6d2b4f80acdae2945ef7a033a6a47befa15
parent8bfbfb0ddd706b1ce2e89259ecc45f192c0ec2bf
f2fs: avoid swapon failure by giving a warning first

The final solution can be migrating blocks to form a section-aligned file
internally. Meanwhile, let's ask users to do that when preparing the swap
file initially like:
1) create()
2) ioctl(F2FS_IOC_SET_PIN_FILE)
3) fallocate()

Reported-by: kernel test robot <oliver.sang@intel.com>
Fixes: 36e4d95891ed ("f2fs: check if swapfile is section-alligned")
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c