summaryrefslogtreecommitdiff
path: root/block/kyber-iosched.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-12-14 17:23:05 -0700
committerJens Axboe <axboe@kernel.dk>2021-12-14 17:23:05 -0700
commit68497092bde9f53e35cafeb52fa9a267ebe0d9b1 (patch)
tree085ae66e07a24ccf023c3fdd0e784708f9341fdc /block/kyber-iosched.c
parent0ba4566cd8a4e645b542e6ddbe3dd26c85ad2408 (diff)
block: make queue stat accounting a reference
kyber turns on IO statistics when it is loaded on a queue, which means that even if kyber is then later unloaded, we're still stuck with stats enabled on the queue. Change the account enabled from a bool to an int, and pair the enable call with the equivalent disable call. This ensures that stats gets turned off again appropriately. Reviewed-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/kyber-iosched.c')
-rw-r--r--block/kyber-iosched.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/kyber-iosched.c b/block/kyber-iosched.c
index fdd74a4df56f..70ff2a599ef6 100644
--- a/block/kyber-iosched.c
+++ b/block/kyber-iosched.c
@@ -433,6 +433,7 @@ static void kyber_exit_sched(struct elevator_queue *e)
int i;
del_timer_sync(&kqd->timer);
+ blk_stat_disable_accounting(kqd->q);
for (i = 0; i < KYBER_NUM_DOMAINS; i++)
sbitmap_queue_free(&kqd->domain_tokens[i]);