diff options
author | Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> | 2021-05-10 20:24:44 +0900 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-05-14 11:22:08 -0700 |
commit | d927ccfccb009ede24448d69c08b12e7c8a6979b (patch) | |
tree | 9066ad0a4da1b9828ef376056af7e41cb6e20dea /fs/f2fs/file.c | |
parent | cad83c968c2ebe97905f900326988ed37146c347 (diff) |
f2fs: Prevent swap file in LFS mode
The kernel writes to swap files on f2fs directly without the assistance
of the filesystem. This direct write by kernel can be non-sequential
even when the f2fs is in LFS mode. Such non-sequential write conflicts
with the LFS semantics. Especially when f2fs is set up on zoned block
devices, the non-sequential write causes unaligned write command errors.
To avoid the non-sequential writes to swap files, prevent swap file
activation when the filesystem is in LFS mode.
Fixes: 4969c06a0d83 ("f2fs: support swap file w/ DIO")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: stable@vger.kernel.org # v5.10+
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/file.c')
0 files changed, 0 insertions, 0 deletions