]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - fs/f2fs/f2fs.h
f2fs: avoid readahead race condition
authorJaegeuk Kim <jaegeuk@kernel.org>
Tue, 23 Jun 2020 06:01:05 +0000 (23:01 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 8 Jul 2020 04:51:48 +0000 (21:51 -0700)
commit6b12367da22f1c9d4d0073f8d802f616c735f95b
tree6a060b33ae2a0f02b145ab925714d2ecfd81008a
parentd7cd3702ca95b1e957493de8f962b47a87b4c6aa
f2fs: avoid readahead race condition

If two readahead threads having same offset enter in readpages, every read
IOs are split and issued to the disk which giving lower bandwidth.

This patch tries to avoid redundant readahead calls.

Fixes one build error reported by Randy.
Fix build error when F2FS_FS_COMPRESSION is not set/enabled.
This label is needed in either case.

../fs/f2fs/data.c: In function ‘f2fs_mpage_readpages’:
../fs/f2fs/data.c:2327:5: error: label ‘next_page’ used but not defined
     goto next_page;

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/super.c