blk-mq: bitmap tag: select random tag betweet 0 and (depth - 1)
authorMing Lei <tom.leiming@gmail.com>
Sat, 10 May 2014 21:43:14 +0000 (15:43 -0600)
committerJens Axboe <axboe@fb.com>
Mon, 30 Mar 2015 18:54:47 +0000 (12:54 -0600)
commita7aff37fd0e542ed8469763172d81660ac6cb513
tree02102b4950aef4ccdbe7fac544144a2a34e77604
parentd5d54e3af3007ef5a8586b9f4c73f2c891a37166
blk-mq: bitmap tag: select random tag betweet 0 and (depth - 1)

The selected tag should be selected at random between 0 and
(depth - 1) with probability 1/depth, instead between 0 and
(depth - 2) with probability 1/(depth - 1).

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq-tag.c