Commit 7165cb45 authored by Zhang Wensheng's avatar Zhang Wensheng Committed by Yang Yingliang
Browse files

block: account inflight from blk_account_io_start() if 'precise_iostat' is set

hulk inclusion
category: bugfix
bugzilla: 39265, https://gitee.com/openeuler/kernel/issues/I4WC06


CVE: NA

-----------------------------------------------

When 'precise_iostat' is set, io_tick and time_in_queue will be updated
if io is inflight. However, mq will not account io as inflight until
getting driver tag, while sq will account it after getting sched tag.

On the other hand, if io scheduler is none, blk_mq_get_tag() will get
driver tag directly, and such io will be accounted as inflight. The
consequences is that 'io_tick' will be miscalculated in
part_round_stats().

Thus revert to sq's implementation if 'precise_iostat' is set.

Signed-off-by: default avatarZhang Wensheng <zhangwensheng5@huawei.com>
Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 69e55430
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment