diff options
author | Christoph Hellwig <hch@lst.de> | 2020-09-24 09:51:32 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-09-24 22:43:39 +0300 |
commit | 55b2598e84e97efc5d952958cb5e34236c43276b (patch) | |
tree | 7c73dedc9d9d3add3d3bd9ab94b1bbe69885aa57 /mm/backing-dev.c | |
parent | 9e82d35b95e55aa50d264caee64a17840e3981b7 (diff) | |
download | linux-55b2598e84e97efc5d952958cb5e34236c43276b.tar.xz |
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 <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Acked-by: David Sterba <dsterba@suse.com> [btrfs]
Acked-by: Richard Weinberger <richard@nod.at> [ubifs, mtd]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'mm/backing-dev.c')
-rw-r--r-- | mm/backing-dev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 8e8b00627bb2..2dac3be61271 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -746,6 +746,8 @@ struct backing_dev_info *bdi_alloc(int node_id) kfree(bdi); return NULL; } + bdi->ra_pages = VM_READAHEAD_PAGES; + bdi->io_pages = VM_READAHEAD_PAGES; return bdi; } EXPORT_SYMBOL(bdi_alloc); |