From 4f0fd955cd13bd94166099db7b31065479d884ed Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Wed, 27 Mar 2013 11:09:23 -0700 Subject: bcache: Set ra_pages based on backing device's ra_pages Signed-off-by: Kent Overstreet --- drivers/md/bcache/super.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/md/bcache') diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index f1e69f2fad37..6817ea46cf0a 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -1067,6 +1067,10 @@ static const char *register_bdev(struct cache_sb *sb, struct page *sb_page, set_capacity(g, dc->bdev->bd_part->nr_sects - dc->sb.data_offset); + g->queue->backing_dev_info.ra_pages = + max(g->queue->backing_dev_info.ra_pages, + bdev->bd_queue->backing_dev_info.ra_pages); + bch_cached_dev_request_init(dc); err = "error creating kobject"; -- cgit v1.2.3