linux/fs/f2fs
Shin'ichiro Kawasaki a97c0590bd f2fs: Prevent swap file in LFS mode
commit d927ccfccb upstream.

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: 4969c06a0d ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2021-07-14 17:06:13 +02:00
..
acl.c f2fs: clean up build warnings 2021-04-10 10:36:39 -07:00
acl.h fs: make helpers idmap mount aware 2021-01-24 14:27:20 +01:00
checkpoint.c f2fs-for-5.13-rc1 2021-05-04 18:03:38 -07:00
compress.c f2fs: compress: fix to assign cc.cluster_idx correctly 2021-05-11 14:48:12 -07:00
data.c f2fs: Prevent swap file in LFS mode 2021-07-14 17:06:13 +02:00
debug.c f2fs: clean up build warnings 2021-04-10 10:36:39 -07:00
dir.c f2fs-for-5.13-rc1 2021-05-04 18:03:38 -07:00
extent_cache.c f2fs: support 64-bits key in f2fs rb-tree node entry 2020-09-10 14:03:30 -07:00
f2fs.h f2fs: compress: fix to assign cc.cluster_idx correctly 2021-05-11 14:48:12 -07:00
file.c f2fs: support iflag change given the mask 2021-05-11 14:48:11 -07:00
gc.c f2fs: clean up build warnings 2021-04-10 10:36:39 -07:00
gc.h f2fs: introduce gc_merge mount option 2021-03-30 18:48:56 -07:00
hash.c f2fs: Handle casefolding with Encryption 2020-12-02 22:00:21 -08:00
inline.c f2fs: fix a redundant call to f2fs_balance_fs if an error occurs 2021-03-12 13:16:44 -08:00
inode.c f2fs: clean up build warnings 2021-04-10 10:36:39 -07:00
Kconfig f2fs: compress: Allow modular (de)compression algorithms 2021-03-12 13:16:42 -08:00
Makefile f2fs: deprecate f2fs_trace_io 2021-01-27 15:20:07 -08:00
namei.c f2fs-for-5.13-rc1 2021-05-04 18:03:38 -07:00
node.c f2fs: clean up build warnings 2021-04-10 10:36:39 -07:00
node.h f2fs: allow to change discard policy based on cached discard cmds 2021-03-26 10:27:44 -07:00
recovery.c f2fs: clean up build warnings 2021-04-10 10:36:39 -07:00
segment.c f2fs: avoid null pointer access when handling IPU error 2021-05-11 14:48:07 -07:00
segment.h f2fs-for-5.13-rc1 2021-05-04 18:03:38 -07:00
shrinker.c f2fs: avoid race condition for shrinker count 2020-12-03 00:59:26 -08:00
super.c f2fs-for-5.13-rc1 2021-05-04 18:03:38 -07:00
sysfs.c f2fs: Advertise encrypted casefolding in sysfs 2021-07-14 17:06:13 +02:00
verity.c f2fs-for-5.13-rc1 2021-05-04 18:03:38 -07:00
xattr.c f2fs: clean up build warnings 2021-04-10 10:36:39 -07:00
xattr.h f2fs: code cleanup by removing ifdef macro surrounding 2020-05-26 18:56:10 -07:00