]> git.karo-electronics.de Git - karo-tx-linux.git/commit
blk-stat: fix blk_stat_sum() if all samples are batched
authorOmar Sandoval <osandov@fb.com>
Thu, 16 Mar 2017 15:46:14 +0000 (09:46 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 21 Mar 2017 16:00:55 +0000 (10:00 -0600)
commit7d8d00140715a115193bf502fa3b0cfe620f0dd9
treed4a2c36663631ca44d278a346f7f9e994c1be5fb
parent97da3854c526d3a6ee05c849c96e48d21527606c
blk-stat: fix blk_stat_sum() if all samples are batched

We need to flush the batch _before_ we check the number of samples,
otherwise we'll miss all of the batched samples.

Fixes: cf43e6b ("block: add scalable completion tracking of requests")
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-stat.c