mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
blk-throttle: make blkio.reset_stats reset I/O counts
blkio.throttle.io_service_bytes and io_serviced were reset by
blkcg_reset_stats() while the counters were part of the blkg. Now that
they live in the throtl_grp, add a pd_reset_stats_fn for them.
Fixes: 7ca464383a ("blk-throtl: stop using blkg->stat_bytes and ->stat_ios")
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://patch.msgid.link/20261028164415.1262013-27-axboe@kernel.dk
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
587edb931f
commit
ac81a07a0b
|
|
@ -1684,6 +1684,14 @@ static void throtl_pd_offline(struct blkg_policy_data *pd)
|
|||
}
|
||||
}
|
||||
|
||||
static void throtl_pd_reset_stats(struct blkg_policy_data *pd)
|
||||
{
|
||||
struct throtl_grp *tg = pd_to_tg(pd);
|
||||
|
||||
blkg_rwstat_reset(&tg->stat_bytes);
|
||||
blkg_rwstat_reset(&tg->stat_ios);
|
||||
}
|
||||
|
||||
struct blkcg_policy blkcg_policy_throtl = {
|
||||
.dfl_cftypes = throtl_files,
|
||||
.legacy_cftypes = throtl_legacy_files,
|
||||
|
|
@ -1693,6 +1701,7 @@ struct blkcg_policy blkcg_policy_throtl = {
|
|||
.pd_online_fn = throtl_pd_online,
|
||||
.pd_offline_fn = throtl_pd_offline,
|
||||
.pd_free_fn = throtl_pd_free,
|
||||
.pd_reset_stats_fn = throtl_pd_reset_stats,
|
||||
};
|
||||
|
||||
static void tg_cancel_writeback_bios(struct throtl_grp *tg,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user