diff options
-rw-r--r-- | block/cfq-iosched.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index d43145cc0088..f8b34bbbd372 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -688,11 +688,9 @@ static inline void cfqg_stats_update_completion(struct cfq_group *cfqg, | |||
688 | io_start_time - start_time); | 688 | io_start_time - start_time); |
689 | } | 689 | } |
690 | 690 | ||
691 | static void cfq_pd_reset_stats(struct blkcg_gq *blkg) | 691 | /* @stats = 0 */ |
692 | static void cfqg_stats_reset(struct cfqg_stats *stats) | ||
692 | { | 693 | { |
693 | struct cfq_group *cfqg = blkg_to_cfqg(blkg); | ||
694 | struct cfqg_stats *stats = &cfqg->stats; | ||
695 | |||
696 | /* queued stats shouldn't be cleared */ | 694 | /* queued stats shouldn't be cleared */ |
697 | blkg_rwstat_reset(&stats->service_bytes); | 695 | blkg_rwstat_reset(&stats->service_bytes); |
698 | blkg_rwstat_reset(&stats->serviced); | 696 | blkg_rwstat_reset(&stats->serviced); |
@@ -1477,6 +1475,13 @@ static void cfq_pd_init(struct blkcg_gq *blkg) | |||
1477 | cfqg->leaf_weight = blkg->blkcg->cfq_leaf_weight; | 1475 | cfqg->leaf_weight = blkg->blkcg->cfq_leaf_weight; |
1478 | } | 1476 | } |
1479 | 1477 | ||
1478 | static void cfq_pd_reset_stats(struct blkcg_gq *blkg) | ||
1479 | { | ||
1480 | struct cfq_group *cfqg = blkg_to_cfqg(blkg); | ||
1481 | |||
1482 | cfqg_stats_reset(&cfqg->stats); | ||
1483 | } | ||
1484 | |||
1480 | /* | 1485 | /* |
1481 | * Search for the cfq group current task belongs to. request_queue lock must | 1486 | * Search for the cfq group current task belongs to. request_queue lock must |
1482 | * be held. | 1487 | * be held. |