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 /fs/nfs | |
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 'fs/nfs')
-rw-r--r-- | fs/nfs/super.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 7a70287f21a2..f943e37853fa 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -1200,13 +1200,6 @@ static void nfs_get_cache_cookie(struct super_block *sb, } #endif -static void nfs_set_readahead(struct backing_dev_info *bdi, - unsigned long iomax_pages) -{ - bdi->ra_pages = VM_READAHEAD_PAGES; - bdi->io_pages = iomax_pages; -} - int nfs_get_tree_common(struct fs_context *fc) { struct nfs_fs_context *ctx = nfs_fc2context(fc); @@ -1251,7 +1244,7 @@ int nfs_get_tree_common(struct fs_context *fc) MINOR(server->s_dev)); if (error) goto error_splat_super; - nfs_set_readahead(s->s_bdi, server->rpages); + s->s_bdi->io_pages = server->rpages; server->super = s; } |