Skip to content

Commit 6e54f3c

Browse files
author
Herton R. Krzesinski
committed
Merge: blk-cgroup: don't update io stat for root cgroup
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/2021 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2167245 Signed-off-by: Ming Lei <ming.lei@redhat.com> Approved-by: Waiman Long <longman@redhat.com> Approved-by: Xiao Ni <xni@redhat.com> Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
2 parents 3905325 + 7a12029 commit 6e54f3c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

block/blk-cgroup.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1996,6 +1996,10 @@ void blk_cgroup_bio_start(struct bio *bio)
19961996
struct blkg_iostat_set *bis;
19971997
unsigned long flags;
19981998

1999+
/* Root-level stats are sourced from system-wide IO stats */
2000+
if (!cgroup_parent(blkcg->css.cgroup))
2001+
return;
2002+
19992003
cpu = get_cpu();
20002004
bis = per_cpu_ptr(bio->bi_blkg->iostat_cpu, cpu);
20012005
flags = u64_stats_update_begin_irqsave(&bis->sync);

0 commit comments

Comments
 (0)