path: root/fs/vboxsf
diff options
authorChristoph Hellwig <>2020-09-24 08:51:32 +0200
committerJens Axboe <>2020-09-24 13:43:39 -0600
commit55b2598e84e97efc5d952958cb5e34236c43276b (patch)
tree7c73dedc9d9d3add3d3bd9ab94b1bbe69885aa57 /fs/vboxsf
parent9e82d35b95e55aa50d264caee64a17840e3981b7 (diff)
bdi: initialize ->ra_pages and ->io_pages in bdi_init
Set up a readahead size by default, as very few users have a good reason to change it. This means code, ecryptfs, and orangefs now set up the values while they were previously missing it, while ubifs, mtd and vboxsf manually set it to 0 to avoid readahead. Signed-off-by: Christoph Hellwig <> Reviewed-by: Jan Kara <> Acked-by: David Sterba <> [btrfs] Acked-by: Richard Weinberger <> [ubifs, mtd] Signed-off-by: Jens Axboe <>
Diffstat (limited to 'fs/vboxsf')
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/vboxsf/super.c b/fs/vboxsf/super.c
index 8fe03b4a0d2b..8e3792177a85 100644
--- a/fs/vboxsf/super.c
+++ b/fs/vboxsf/super.c
@@ -167,6 +167,8 @@ static int vboxsf_fill_super(struct super_block *sb, struct fs_context *fc)
err = super_setup_bdi_name(sb, "vboxsf-%d", sbi->bdi_id);
if (err)
goto fail_free;
+ sb->s_bdi->ra_pages = 0;
+ sb->s_bdi->io_pages = 0;
/* Turn source into a shfl_string and map the folder */
size = strlen(fc->source) + 1;