diff options
author | Jan Kara <jack@suse.cz> | 2017-02-02 09:56:50 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-02-02 10:20:48 -0500 |
commit | dc3b17cc8bf21307c7e076e7c778d5db756f7871 (patch) | |
tree | 63a1e6c9b6c70579e9cdabf60147484c0b2f0add /block/blk-sysfs.c | |
parent | f44f1ab5a2dcd4e16eab850fd08e40ff2d0c28d4 (diff) |
block: Use pointer to backing_dev_info from request_queue
We will want to have struct backing_dev_info allocated separately from
struct request_queue. As the first step add pointer to backing_dev_info
to request_queue and convert all users touching it. No functional
changes in this patch.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r-- | block/blk-sysfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 894f77342fd4..05841be1f30f 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c | |||
@@ -89,7 +89,7 @@ queue_requests_store(struct request_queue *q, const char *page, size_t count) | |||
89 | 89 | ||
90 | static ssize_t queue_ra_show(struct request_queue *q, char *page) | 90 | static ssize_t queue_ra_show(struct request_queue *q, char *page) |
91 | { | 91 | { |
92 | unsigned long ra_kb = q->backing_dev_info.ra_pages << | 92 | unsigned long ra_kb = q->backing_dev_info->ra_pages << |
93 | (PAGE_SHIFT - 10); | 93 | (PAGE_SHIFT - 10); |
94 | 94 | ||
95 | return queue_var_show(ra_kb, (page)); | 95 | return queue_var_show(ra_kb, (page)); |
@@ -104,7 +104,7 @@ queue_ra_store(struct request_queue *q, const char *page, size_t count) | |||
104 | if (ret < 0) | 104 | if (ret < 0) |
105 | return ret; | 105 | return ret; |
106 | 106 | ||
107 | q->backing_dev_info.ra_pages = ra_kb >> (PAGE_SHIFT - 10); | 107 | q->backing_dev_info->ra_pages = ra_kb >> (PAGE_SHIFT - 10); |
108 | 108 | ||
109 | return ret; | 109 | return ret; |
110 | } | 110 | } |
@@ -236,7 +236,7 @@ queue_max_sectors_store(struct request_queue *q, const char *page, size_t count) | |||
236 | 236 | ||
237 | spin_lock_irq(q->queue_lock); | 237 | spin_lock_irq(q->queue_lock); |
238 | q->limits.max_sectors = max_sectors_kb << 1; | 238 | q->limits.max_sectors = max_sectors_kb << 1; |
239 | q->backing_dev_info.io_pages = max_sectors_kb >> (PAGE_SHIFT - 10); | 239 | q->backing_dev_info->io_pages = max_sectors_kb >> (PAGE_SHIFT - 10); |
240 | spin_unlock_irq(q->queue_lock); | 240 | spin_unlock_irq(q->queue_lock); |
241 | 241 | ||
242 | return ret; | 242 | return ret; |
@@ -799,7 +799,7 @@ static void blk_release_queue(struct kobject *kobj) | |||
799 | container_of(kobj, struct request_queue, kobj); | 799 | container_of(kobj, struct request_queue, kobj); |
800 | 800 | ||
801 | wbt_exit(q); | 801 | wbt_exit(q); |
802 | bdi_exit(&q->backing_dev_info); | 802 | bdi_exit(q->backing_dev_info); |
803 | blkcg_exit_queue(q); | 803 | blkcg_exit_queue(q); |
804 | 804 | ||
805 | if (q->elevator) { | 805 | if (q->elevator) { |