1414#include <linux/rbtree.h>
1515#include <linux/ioprio.h>
1616#include <linux/blktrace_api.h>
17- #include "blk-cgroup .h"
17+ #include "cfq .h"
1818
1919/*
2020 * tunables
@@ -879,7 +879,7 @@ cfq_group_service_tree_del(struct cfq_data *cfqd, struct cfq_group *cfqg)
879879 if (!RB_EMPTY_NODE (& cfqg -> rb_node ))
880880 cfq_rb_erase (& cfqg -> rb_node , st );
881881 cfqg -> saved_workload_slice = 0 ;
882- blkiocg_update_dequeue_stats (& cfqg -> blkg , 1 );
882+ cfq_blkiocg_update_dequeue_stats (& cfqg -> blkg , 1 );
883883}
884884
885885static inline unsigned int cfq_cfqq_slice_usage (struct cfq_queue * cfqq )
@@ -939,8 +939,8 @@ static void cfq_group_served(struct cfq_data *cfqd, struct cfq_group *cfqg,
939939
940940 cfq_log_cfqg (cfqd , cfqg , "served: vt=%llu min_vt=%llu" , cfqg -> vdisktime ,
941941 st -> min_vdisktime );
942- blkiocg_update_timeslice_used (& cfqg -> blkg , used_sl );
943- blkiocg_set_start_empty_time (& cfqg -> blkg );
942+ cfq_blkiocg_update_timeslice_used (& cfqg -> blkg , used_sl );
943+ cfq_blkiocg_set_start_empty_time (& cfqg -> blkg );
944944}
945945
946946#ifdef CONFIG_CFQ_GROUP_IOSCHED
@@ -995,7 +995,7 @@ cfq_find_alloc_cfqg(struct cfq_data *cfqd, struct cgroup *cgroup, int create)
995995
996996 /* Add group onto cgroup list */
997997 sscanf (dev_name (bdi -> dev ), "%u:%u" , & major , & minor );
998- blkiocg_add_blkio_group (blkcg , & cfqg -> blkg , (void * )cfqd ,
998+ cfq_blkiocg_add_blkio_group (blkcg , & cfqg -> blkg , (void * )cfqd ,
999999 MKDEV (major , minor ));
10001000 cfqg -> weight = blkcg_get_weight (blkcg , cfqg -> blkg .dev );
10011001
@@ -1079,7 +1079,7 @@ static void cfq_release_cfq_groups(struct cfq_data *cfqd)
10791079 * it from cgroup list, then it will take care of destroying
10801080 * cfqg also.
10811081 */
1082- if (!blkiocg_del_blkio_group (& cfqg -> blkg ))
1082+ if (!cfq_blkiocg_del_blkio_group (& cfqg -> blkg ))
10831083 cfq_destroy_cfqg (cfqd , cfqg );
10841084 }
10851085}
@@ -1421,10 +1421,10 @@ static void cfq_reposition_rq_rb(struct cfq_queue *cfqq, struct request *rq)
14211421{
14221422 elv_rb_del (& cfqq -> sort_list , rq );
14231423 cfqq -> queued [rq_is_sync (rq )]-- ;
1424- blkiocg_update_io_remove_stats (& (RQ_CFQG (rq ))-> blkg , rq_data_dir ( rq ) ,
1425- rq_is_sync (rq ));
1424+ cfq_blkiocg_update_io_remove_stats (& (RQ_CFQG (rq ))-> blkg ,
1425+ rq_data_dir ( rq ), rq_is_sync (rq ));
14261426 cfq_add_rq_rb (rq );
1427- blkiocg_update_io_add_stats (& (RQ_CFQG (rq ))-> blkg ,
1427+ cfq_blkiocg_update_io_add_stats (& (RQ_CFQG (rq ))-> blkg ,
14281428 & cfqq -> cfqd -> serving_group -> blkg , rq_data_dir (rq ),
14291429 rq_is_sync (rq ));
14301430}
@@ -1482,8 +1482,8 @@ static void cfq_remove_request(struct request *rq)
14821482 cfq_del_rq_rb (rq );
14831483
14841484 cfqq -> cfqd -> rq_queued -- ;
1485- blkiocg_update_io_remove_stats (& (RQ_CFQG (rq ))-> blkg , rq_data_dir ( rq ) ,
1486- rq_is_sync (rq ));
1485+ cfq_blkiocg_update_io_remove_stats (& (RQ_CFQG (rq ))-> blkg ,
1486+ rq_data_dir ( rq ), rq_is_sync (rq ));
14871487 if (rq_is_meta (rq )) {
14881488 WARN_ON (!cfqq -> meta_pending );
14891489 cfqq -> meta_pending -- ;
@@ -1518,8 +1518,8 @@ static void cfq_merged_request(struct request_queue *q, struct request *req,
15181518static void cfq_bio_merged (struct request_queue * q , struct request * req ,
15191519 struct bio * bio )
15201520{
1521- blkiocg_update_io_merged_stats (& (RQ_CFQG (req ))-> blkg , bio_data_dir ( bio ) ,
1522- cfq_bio_sync (bio ));
1521+ cfq_blkiocg_update_io_merged_stats (& (RQ_CFQG (req ))-> blkg ,
1522+ bio_data_dir ( bio ), cfq_bio_sync (bio ));
15231523}
15241524
15251525static void
@@ -1539,8 +1539,8 @@ cfq_merged_requests(struct request_queue *q, struct request *rq,
15391539 if (cfqq -> next_rq == next )
15401540 cfqq -> next_rq = rq ;
15411541 cfq_remove_request (next );
1542- blkiocg_update_io_merged_stats (& (RQ_CFQG (rq ))-> blkg , rq_data_dir ( next ) ,
1543- rq_is_sync (next ));
1542+ cfq_blkiocg_update_io_merged_stats (& (RQ_CFQG (rq ))-> blkg ,
1543+ rq_data_dir ( next ), rq_is_sync (next ));
15441544}
15451545
15461546static int cfq_allow_merge (struct request_queue * q , struct request * rq ,
@@ -1571,7 +1571,7 @@ static int cfq_allow_merge(struct request_queue *q, struct request *rq,
15711571static inline void cfq_del_timer (struct cfq_data * cfqd , struct cfq_queue * cfqq )
15721572{
15731573 del_timer (& cfqd -> idle_slice_timer );
1574- blkiocg_update_idle_time_stats (& cfqq -> cfqg -> blkg );
1574+ cfq_blkiocg_update_idle_time_stats (& cfqq -> cfqg -> blkg );
15751575}
15761576
15771577static void __cfq_set_active_queue (struct cfq_data * cfqd ,
@@ -1580,7 +1580,7 @@ static void __cfq_set_active_queue(struct cfq_data *cfqd,
15801580 if (cfqq ) {
15811581 cfq_log_cfqq (cfqd , cfqq , "set_active wl_prio:%d wl_type:%d" ,
15821582 cfqd -> serving_prio , cfqd -> serving_type );
1583- blkiocg_update_avg_queue_size_stats (& cfqq -> cfqg -> blkg );
1583+ cfq_blkiocg_update_avg_queue_size_stats (& cfqq -> cfqg -> blkg );
15841584 cfqq -> slice_start = 0 ;
15851585 cfqq -> dispatch_start = jiffies ;
15861586 cfqq -> allocated_slice = 0 ;
@@ -1911,7 +1911,7 @@ static void cfq_arm_slice_timer(struct cfq_data *cfqd)
19111911 sl = cfqd -> cfq_slice_idle ;
19121912
19131913 mod_timer (& cfqd -> idle_slice_timer , jiffies + sl );
1914- blkiocg_update_set_idle_time_stats (& cfqq -> cfqg -> blkg );
1914+ cfq_blkiocg_update_set_idle_time_stats (& cfqq -> cfqg -> blkg );
19151915 cfq_log_cfqq (cfqd , cfqq , "arm_idle: %lu" , sl );
19161916}
19171917
@@ -1931,7 +1931,7 @@ static void cfq_dispatch_insert(struct request_queue *q, struct request *rq)
19311931 elv_dispatch_sort (q , rq );
19321932
19331933 cfqd -> rq_in_flight [cfq_cfqq_sync (cfqq )]++ ;
1934- blkiocg_update_dispatch_stats (& cfqq -> cfqg -> blkg , blk_rq_bytes (rq ),
1934+ cfq_blkiocg_update_dispatch_stats (& cfqq -> cfqg -> blkg , blk_rq_bytes (rq ),
19351935 rq_data_dir (rq ), rq_is_sync (rq ));
19361936}
19371937
@@ -3257,7 +3257,7 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq,
32573257 cfq_clear_cfqq_wait_request (cfqq );
32583258 __blk_run_queue (cfqd -> queue );
32593259 } else {
3260- blkiocg_update_idle_time_stats (
3260+ cfq_blkiocg_update_idle_time_stats (
32613261 & cfqq -> cfqg -> blkg );
32623262 cfq_mark_cfqq_must_dispatch (cfqq );
32633263 }
@@ -3285,7 +3285,7 @@ static void cfq_insert_request(struct request_queue *q, struct request *rq)
32853285 rq_set_fifo_time (rq , jiffies + cfqd -> cfq_fifo_expire [rq_is_sync (rq )]);
32863286 list_add_tail (& rq -> queuelist , & cfqq -> fifo );
32873287 cfq_add_rq_rb (rq );
3288- blkiocg_update_io_add_stats (& (RQ_CFQG (rq ))-> blkg ,
3288+ cfq_blkiocg_update_io_add_stats (& (RQ_CFQG (rq ))-> blkg ,
32893289 & cfqd -> serving_group -> blkg , rq_data_dir (rq ),
32903290 rq_is_sync (rq ));
32913291 cfq_rq_enqueued (cfqd , cfqq , rq );
@@ -3373,9 +3373,9 @@ static void cfq_completed_request(struct request_queue *q, struct request *rq)
33733373 WARN_ON (!cfqq -> dispatched );
33743374 cfqd -> rq_in_driver -- ;
33753375 cfqq -> dispatched -- ;
3376- blkiocg_update_completion_stats (& cfqq -> cfqg -> blkg , rq_start_time_ns ( rq ) ,
3377- rq_io_start_time_ns (rq ), rq_data_dir (rq ),
3378- rq_is_sync (rq ));
3376+ cfq_blkiocg_update_completion_stats (& cfqq -> cfqg -> blkg ,
3377+ rq_start_time_ns (rq ), rq_io_start_time_ns (rq ),
3378+ rq_data_dir ( rq ), rq_is_sync (rq ));
33793379
33803380 cfqd -> rq_in_flight [cfq_cfqq_sync (cfqq )]-- ;
33813381
@@ -3739,7 +3739,7 @@ static void cfq_exit_queue(struct elevator_queue *e)
37393739
37403740 cfq_put_async_queues (cfqd );
37413741 cfq_release_cfq_groups (cfqd );
3742- blkiocg_del_blkio_group (& cfqd -> root_group .blkg );
3742+ cfq_blkiocg_del_blkio_group (& cfqd -> root_group .blkg );
37433743
37443744 spin_unlock_irq (q -> queue_lock );
37453745
@@ -3807,8 +3807,8 @@ static void *cfq_init_queue(struct request_queue *q)
38073807 */
38083808 atomic_set (& cfqg -> ref , 1 );
38093809 rcu_read_lock ();
3810- blkiocg_add_blkio_group (& blkio_root_cgroup , & cfqg -> blkg , ( void * ) cfqd ,
3811- 0 );
3810+ cfq_blkiocg_add_blkio_group (& blkio_root_cgroup , & cfqg -> blkg ,
3811+ ( void * ) cfqd , 0 );
38123812 rcu_read_unlock ();
38133813#endif
38143814 /*
0 commit comments