mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-18 04:13:58 +00:00
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>
This commit is contained in:
parent
69eea5a4ab
commit
efd4b81abb
1 changed files with 2 additions and 2 deletions
|
@ -30,11 +30,11 @@ static void blk_stat_flush_batch(struct blk_rq_stat *stat)
|
||||||
|
|
||||||
static void blk_stat_sum(struct blk_rq_stat *dst, struct blk_rq_stat *src)
|
static void blk_stat_sum(struct blk_rq_stat *dst, struct blk_rq_stat *src)
|
||||||
{
|
{
|
||||||
|
blk_stat_flush_batch(src);
|
||||||
|
|
||||||
if (!src->nr_samples)
|
if (!src->nr_samples)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
blk_stat_flush_batch(src);
|
|
||||||
|
|
||||||
dst->min = min(dst->min, src->min);
|
dst->min = min(dst->min, src->min);
|
||||||
dst->max = max(dst->max, src->max);
|
dst->max = max(dst->max, src->max);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue