diff options
author | Jan Kara <jack@suse.cz> | 2017-04-19 12:33:27 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-04-19 17:49:03 +0300 |
commit | 8330cdb0fe55c9a9a8e440e56c19233229e0e259 (patch) | |
tree | 644af58ba64f8cb431d01abaff81113b4ed6a835 /block/blk-sysfs.c | |
parent | ea25da48086d3bbebf3a2eeff387ea00ed96f5c4 (diff) | |
download | linux-8330cdb0fe55c9a9a8e440e56c19233229e0e259.tar.xz |
block: Make writeback throttling defaults consistent for SQ devices
When CFQ is used as an elevator, it disables writeback throttling
because they don't play well together. Later when a different elevator
is chosen for the device, writeback throttling doesn't get enabled
again as it should. Make sure CFQ enables writeback throttling (if it
should be enabled by default) when we switch from it to another IO
scheduler.
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 | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index fc20489f0d2b..f85723332288 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -844,23 +844,6 @@ struct kobj_type blk_queue_ktype = { .release = blk_release_queue, }; -static void blk_wb_init(struct request_queue *q) -{ -#ifndef CONFIG_BLK_WBT_MQ - if (q->mq_ops) - return; -#endif -#ifndef CONFIG_BLK_WBT_SQ - if (q->request_fn) - return; -#endif - - /* - * If this fails, we don't get throttling - */ - wbt_init(q); -} - int blk_register_queue(struct gendisk *disk) { int ret; @@ -908,7 +891,7 @@ int blk_register_queue(struct gendisk *disk) kobject_uevent(&q->kobj, KOBJ_ADD); - blk_wb_init(q); + wbt_enable_default(q); blk_throtl_register_queue(q); |