Skip to contentSkip to conversation

block: fix aux stat accumulation destination

PATCH Superseded shechenglong 3 participants 5 messages Dec 22, 2025 – Dec 28, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: fix aux stat accumulation destination

Route bfqg_stats_add_aux() time accumulation into the destination stats object instead of the source, aligning with other stat fields.

---
 block/bfq-cgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/bfq-cgroup.c +1 -1
index 9fb9f3533150..6a75fe1c7a5c 100644
@@ -380,7 +380,7 @@ static void bfqg_stats_add_aux(struct bfqg_stats *to, struct bfqg_stats *from)
 	blkg_rwstat_add_aux(&to->merged, &from->merged);
 	blkg_rwstat_add_aux(&to->service_time, &from->service_time);
 	blkg_rwstat_add_aux(&to->wait_time, &from->wait_time);
-	bfq_stat_add_aux(&from->time, &from->time);
+	bfq_stat_add_aux(&to->time, &from->time);
 	bfq_stat_add_aux(&to->avg_queue_size_sum, &from->avg_queue_size_sum);
 	bfq_stat_add_aux(&to->avg_queue_size_samples,
 			  &from->avg_queue_size_samples);
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 7 lines · shechenglong

Route bfqg_stats_add_aux() time accumulation into the destination stats object instead of the source, aligning with other stat fields.

---
  block/bfq-cgroup.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Please change the title and follow existing prefix:

block, bfq: fix aux stat accumulation destination

Otherwise, feel free to add:

Quoted 14 lines
block/bfq-cgroup.c +1 -1
index 9fb9f3533150..6a75fe1c7a5c 100644
@@ -380,7 +380,7 @@ static void bfqg_stats_add_aux(struct bfqg_stats *to, struct bfqg_stats *from)
  	blkg_rwstat_add_aux(&to->merged, &from->merged);
  	blkg_rwstat_add_aux(&to->service_time, &from->service_time);
  	blkg_rwstat_add_aux(&to->wait_time, &from->wait_time);
-	bfq_stat_add_aux(&from->time, &from->time);
+	bfq_stat_add_aux(&to->time, &from->time);
  	bfq_stat_add_aux(&to->avg_queue_size_sum, &from->avg_queue_size_sum);
  	bfq_stat_add_aux(&to->avg_queue_size_samples,
  			  &from->avg_queue_size_samples);
Signature · 2 lines
Thansk,
Kuai
#2 lore raw

v2 cover block,bfq: fix aux stat accumulation destination

Quoted 4 lines

Please change the title and follow existing prefix:
block, bfq: fix aux stat accumulation destination Otherwise, feel free to add:

Thanks to Yu Kuai for the review and helpful feedback.

shechenglong (1):
block,bfq: fix aux stat accumulation destination

 block/bfq-cgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Best regards,

shechenglong

Signature · 1 line
2.43.0
#3 lore raw

PATCH v2 1/1 block,bfq: fix aux stat accumulation destination

Route bfqg_stats_add_aux() time accumulation into the destination stats object instead of the source, aligning with other stat fields.

---
 block/bfq-cgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/bfq-cgroup.c +1 -1
index 9fb9f3533150..6a75fe1c7a5c 100644
@@ -380,7 +380,7 @@ static void bfqg_stats_add_aux(struct bfqg_stats *to, struct bfqg_stats *from)
 	blkg_rwstat_add_aux(&to->merged, &from->merged);
 	blkg_rwstat_add_aux(&to->service_time, &from->service_time);
 	blkg_rwstat_add_aux(&to->wait_time, &from->wait_time);
-	bfq_stat_add_aux(&from->time, &from->time);
+	bfq_stat_add_aux(&to->time, &from->time);
 	bfq_stat_add_aux(&to->avg_queue_size_sum, &from->avg_queue_size_sum);
 	bfq_stat_add_aux(&to->avg_queue_size_samples,
 			  &from->avg_queue_size_samples);
Signature · 1 line
2.43.0
maintainer Applied
#4 lore raw

Re: [PATCH v2 0/1] block,bfq: fix aux stat accumulation destination

In reply to shechenglong
Quoted 8 lines · shechenglong
Quoted 4 lines

Please change the title and follow existing prefix:
block, bfq: fix aux stat accumulation destination Otherwise, feel free to add:

Thanks to Yu Kuai for the review and helpful feedback.

[...]

Applied, thanks!

[1/1] block,bfq: fix aux stat accumulation destination

      commit: 04bdb1a04d8a2a89df504c1e34250cd3c6e31a1c

Best regards,

Signature · 1 line
Jens Axboe