f2fs: adjust readahead block number during recovery
authorChao Yu <chao@kernel.org>
Fri, 4 Feb 2022 00:34:10 +0000 (08:34 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 4 Feb 2022 06:21:28 +0000 (22:21 -0800)
commit430f163b01888dc26696365d9c1053ba9d6c7d92
tree076333f82610ab1c0ea54be69b4a12cb23009e58
parent6d18762ed5cd549fde74fd0e05d4d87bac5a3beb
f2fs: adjust readahead block number during recovery

In a fragmented image, entries in dnode block list may locate in
incontiguous physical block address space, however, in recovery flow,
we will always readahead BIO_MAX_VECS size blocks, so in such case,
current readahead policy is low efficient, let's adjust readahead
window size dynamically based on consecutiveness of dnode blocks.

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/checkpoint.c
fs/f2fs/f2fs.h
fs/f2fs/recovery.c