From c665b394b9e8c534e220da876adbd4db990b4c1b Mon Sep 17 00:00:00 2001 From: Jeffle Xu Date: Mon, 25 Apr 2022 20:21:42 +0800 Subject: erofs: implement fscache-based data readahead Implement fscache-based data readahead. Also registers an individual bdi for each erofs instance to enable readahead. Signed-off-by: Jeffle Xu Reviewed-by: Gao Xiang Link: https://lore.kernel.org/r/20220425122143.56815-21-jefflexu@linux.alibaba.com Acked-by: Chao Yu Signed-off-by: Gao Xiang --- fs/erofs/super.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fs/erofs/super.c') diff --git a/fs/erofs/super.c b/fs/erofs/super.c index a67c19dc0620..046708440366 100644 --- a/fs/erofs/super.c +++ b/fs/erofs/super.c @@ -658,6 +658,10 @@ static int erofs_fc_fill_super(struct super_block *sb, struct fs_context *fc) sbi->opt.fsid, true); if (err) return err; + + err = super_setup_bdi(sb); + if (err) + return err; } else { if (!sb_set_blocksize(sb, EROFS_BLKSIZ)) { erofs_err(sb, "failed to set erofs blksize"); -- cgit v1.2.3