From a37244e4cc5766af68004ad6249fcd0e4694b441 Mon Sep 17 00:00:00 2001 From: Stephen Bates Date: Thu, 20 Apr 2017 15:29:16 -0600 Subject: blk-stat: convert blk-stat bucket callback to signed In order to allow for filtering of IO based on some other properties of the request than direction we allow the bucket function to return an int. If the bucket callback returns a negative do no count it in the stats accumulation. Signed-off-by: Stephen Bates Fixed up Kyber scheduler stat callback. Signed-off-by: Jens Axboe --- block/kyber-iosched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/kyber-iosched.c') diff --git a/block/kyber-iosched.c b/block/kyber-iosched.c index fe4af5b97c0e..3b0090bc5dd1 100644 --- a/block/kyber-iosched.c +++ b/block/kyber-iosched.c @@ -102,7 +102,7 @@ struct kyber_hctx_data { atomic_t wait_index[KYBER_NUM_DOMAINS]; }; -static unsigned int rq_sched_domain(const struct request *rq) +static int rq_sched_domain(const struct request *rq) { unsigned int op = rq->cmd_flags; -- cgit v1.2.3