]> git.baikalelectronics.ru Git - kernel.git/commit
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>
Sat, 10 May 2014 21:43:14 +0000 (15:43 -0600)
commit7336f00b6a0fa40b0b4b4371bc5b2155b9f24733
tree18b1306aa0a86c1c987bab5d3f2e9610f47bbb8b
parenta8f398998825fb80fd03491cdc5619cb6921a0e5
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