aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r--block/blk-cgroup.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 649b05d7f291..25cc7514d817 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -202,7 +202,7 @@ void blkiocg_update_idle_time_stats(struct blkio_group *blkg)
202} 202}
203EXPORT_SYMBOL_GPL(blkiocg_update_idle_time_stats); 203EXPORT_SYMBOL_GPL(blkiocg_update_idle_time_stats);
204 204
205void blkiocg_update_set_active_queue_stats(struct blkio_group *blkg) 205void blkiocg_update_avg_queue_size_stats(struct blkio_group *blkg)
206{ 206{
207 unsigned long flags; 207 unsigned long flags;
208 struct blkio_group_stats *stats; 208 struct blkio_group_stats *stats;
@@ -216,14 +216,21 @@ void blkiocg_update_set_active_queue_stats(struct blkio_group *blkg)
216 blkio_update_group_wait_time(stats); 216 blkio_update_group_wait_time(stats);
217 spin_unlock_irqrestore(&blkg->stats_lock, flags); 217 spin_unlock_irqrestore(&blkg->stats_lock, flags);
218} 218}
219EXPORT_SYMBOL_GPL(blkiocg_update_set_active_queue_stats); 219EXPORT_SYMBOL_GPL(blkiocg_update_avg_queue_size_stats);
220
221void blkiocg_update_dequeue_stats(struct blkio_group *blkg,
222 unsigned long dequeue)
223{
224 blkg->stats.dequeue += dequeue;
225}
226EXPORT_SYMBOL_GPL(blkiocg_update_dequeue_stats);
220#else 227#else
221static inline void blkio_set_start_group_wait_time(struct blkio_group *blkg, 228static inline void blkio_set_start_group_wait_time(struct blkio_group *blkg,
222 struct blkio_group *curr_blkg) {} 229 struct blkio_group *curr_blkg) {}
223static inline void blkio_end_empty_time(struct blkio_group_stats *stats) {} 230static inline void blkio_end_empty_time(struct blkio_group_stats *stats) {}
224#endif 231#endif
225 232
226void blkiocg_update_request_add_stats(struct blkio_group *blkg, 233void blkiocg_update_io_add_stats(struct blkio_group *blkg,
227 struct blkio_group *curr_blkg, bool direction, 234 struct blkio_group *curr_blkg, bool direction,
228 bool sync) 235 bool sync)
229{ 236{
@@ -236,9 +243,9 @@ void blkiocg_update_request_add_stats(struct blkio_group *blkg,
236 blkio_set_start_group_wait_time(blkg, curr_blkg); 243 blkio_set_start_group_wait_time(blkg, curr_blkg);
237 spin_unlock_irqrestore(&blkg->stats_lock, flags); 244 spin_unlock_irqrestore(&blkg->stats_lock, flags);
238} 245}
239EXPORT_SYMBOL_GPL(blkiocg_update_request_add_stats); 246EXPORT_SYMBOL_GPL(blkiocg_update_io_add_stats);
240 247
241void blkiocg_update_request_remove_stats(struct blkio_group *blkg, 248void blkiocg_update_io_remove_stats(struct blkio_group *blkg,
242 bool direction, bool sync) 249 bool direction, bool sync)
243{ 250{
244 unsigned long flags; 251 unsigned long flags;
@@ -248,7 +255,7 @@ void blkiocg_update_request_remove_stats(struct blkio_group *blkg,
248 direction, sync); 255 direction, sync);
249 spin_unlock_irqrestore(&blkg->stats_lock, flags); 256 spin_unlock_irqrestore(&blkg->stats_lock, flags);
250} 257}
251EXPORT_SYMBOL_GPL(blkiocg_update_request_remove_stats); 258EXPORT_SYMBOL_GPL(blkiocg_update_io_remove_stats);
252 259
253void blkiocg_update_timeslice_used(struct blkio_group *blkg, unsigned long time) 260void blkiocg_update_timeslice_used(struct blkio_group *blkg, unsigned long time)
254{ 261{
@@ -636,15 +643,6 @@ SHOW_FUNCTION_PER_GROUP(empty_time, BLKIO_STAT_EMPTY_TIME, 0);
636#endif 643#endif
637#undef SHOW_FUNCTION_PER_GROUP 644#undef SHOW_FUNCTION_PER_GROUP
638 645
639#ifdef CONFIG_DEBUG_BLK_CGROUP
640void blkiocg_update_dequeue_stats(struct blkio_group *blkg,
641 unsigned long dequeue)
642{
643 blkg->stats.dequeue += dequeue;
644}
645EXPORT_SYMBOL_GPL(blkiocg_update_dequeue_stats);
646#endif
647
648static int blkio_check_dev_num(dev_t dev) 646static int blkio_check_dev_num(dev_t dev)
649{ 647{
650 int part = 0; 648 int part = 0;