summaryrefslogtreecommitdiffstats
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-06-12 14:42:56 +0200
committerJens Axboe <jens.axboe@oracle.com>2009-06-16 08:21:03 +0200
commit0989a025d2f4f9f51ea641bd26c563c53dc63f55 (patch)
tree5b4f29d3b1a3d09d3052e0c18d63dba8a946da86 /block/blk-core.c
parent81be834713a7d6b9463663145d493fe9daee2d61 (diff)
downloadblackbird-op-linux-0989a025d2f4f9f51ea641bd26c563c53dc63f55.tar.gz
blackbird-op-linux-0989a025d2f4f9f51ea641bd26c563c53dc63f55.zip
block: don't overwrite bdi->state after bdi_init() has been run
Move the defaults to where we do the init of the backing_dev_info. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index f6452f692501..94d88fabc4bd 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -498,6 +498,11 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)
q->backing_dev_info.unplug_io_fn = blk_backing_dev_unplug;
q->backing_dev_info.unplug_io_data = q;
+ q->backing_dev_info.ra_pages =
+ (VM_MAX_READAHEAD * 1024) / PAGE_CACHE_SIZE;
+ q->backing_dev_info.state = 0;
+ q->backing_dev_info.capabilities = BDI_CAP_MAP_COPY;
+
err = bdi_init(&q->backing_dev_info);
if (err) {
kmem_cache_free(blk_requestq_cachep, q);
OpenPOWER on IntegriCloud