Commit 185f203a authored by Jianan Huang's avatar Jianan Huang Committed by Jaegeuk Kim
Browse files

f2fs: avoid splitting bio when reading multiple pages



When fewer pages are read, nr_pages may be smaller than nr_cpages. Due
to the nr_vecs limit, the compressed pages will be split into multiple
bios and then merged at the block level. In this case, nr_cpages should
be used to pre-allocate bvecs.
To handle this case, align max_nr_pages to cluster_size, which should be
enough for all compressed pages.

Signed-off-by: default avatarJianan Huang <huangjianan@xiaomi.com>
Signed-off-by: default avatarSheng Yong <shengyong1@xiaomi.com>
Reviewed-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent e23ab802
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment