]> git.baikalelectronics.ru Git - kernel.git/commit
block: make queue stat accounting a reference
authorJens Axboe <axboe@kernel.dk>
Wed, 15 Dec 2021 00:23:05 +0000 (17:23 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 15 Dec 2021 00:23:05 +0000 (17:23 -0700)
commitfc56fe3e3be825175052058f72e68c96064887ef
tree085ae66e07a24ccf023c3fdd0e784708f9341fdc
parentd4faf799a0384ed6eafa77eb6f4586a6eaf48db6
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>
block/blk-stat.c
block/blk-stat.h
block/kyber-iosched.c