|
@@ -453,3 +453,53 @@ static inline uint64_t blkg_rwstat_sum(struct blkg_rwstat *rwstat)
|
|
* @rwstat: blkg_rwstat to reset
|
|
* @rwstat: blkg_rwstat to reset
|
|
*/
|
|
*/
|
|
static inline void blkg_rwstat_reset(struct blkg_rwstat *rwstat)
|
|
static inline void blkg_rwstat_reset(struct blkg_rwstat *rwstat)
|
|
|
|
+{
|
|
|
|
+ memset(rwstat->cnt, 0, sizeof(rwstat->cnt));
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+#else /* CONFIG_BLK_CGROUP */
|
|
|
|
+
|
|
|
|
+struct cgroup;
|
|
|
|
+struct blkcg;
|
|
|
|
+
|
|
|
|
+struct blkg_policy_data {
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+struct blkcg_gq {
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+struct blkcg_policy {
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static inline struct blkcg_gq *blkg_lookup(struct blkcg *blkcg, void *key) { return NULL; }
|
|
|
|
+static inline int blkcg_init_queue(struct request_queue *q) { return 0; }
|
|
|
|
+static inline void blkcg_drain_queue(struct request_queue *q) { }
|
|
|
|
+static inline void blkcg_exit_queue(struct request_queue *q) { }
|
|
|
|
+static inline int blkcg_policy_register(struct blkcg_policy *pol) { return 0; }
|
|
|
|
+static inline void blkcg_policy_unregister(struct blkcg_policy *pol) { }
|
|
|
|
+static inline int blkcg_activate_policy(struct request_queue *q,
|
|
|
|
+ const struct blkcg_policy *pol) { return 0; }
|
|
|
|
+static inline void blkcg_deactivate_policy(struct request_queue *q,
|
|
|
|
+ const struct blkcg_policy *pol) { }
|
|
|
|
+
|
|
|
|
+static inline struct blkcg *cgroup_to_blkcg(struct cgroup *cgroup) { return NULL; }
|
|
|
|
+static inline struct blkcg *bio_blkcg(struct bio *bio) { return NULL; }
|
|
|
|
+
|
|
|
|
+static inline struct blkg_policy_data *blkg_to_pd(struct blkcg_gq *blkg,
|
|
|
|
+ struct blkcg_policy *pol) { return NULL; }
|
|
|
|
+static inline struct blkcg_gq *pd_to_blkg(struct blkg_policy_data *pd) { return NULL; }
|
|
|
|
+static inline char *blkg_path(struct blkcg_gq *blkg) { return NULL; }
|
|
|
|
+static inline void blkg_get(struct blkcg_gq *blkg) { }
|
|
|
|
+static inline void blkg_put(struct blkcg_gq *blkg) { }
|
|
|
|
+
|
|
|
|
+static inline struct request_list *blk_get_rl(struct request_queue *q,
|
|
|
|
+ struct bio *bio) { return &q->root_rl; }
|
|
|
|
+static inline void blk_put_rl(struct request_list *rl) { }
|
|
|
|
+static inline void blk_rq_set_rl(struct request *rq, struct request_list *rl) { }
|
|
|
|
+static inline struct request_list *blk_rq_rl(struct request *rq) { return &rq->q->root_rl; }
|
|
|
|
+
|
|
|
|
+#define blk_queue_for_each_rl(rl, q) \
|
|
|
|
+ for ((rl) = &(q)->root_rl; (rl); (rl) = NULL)
|
|
|
|
+
|
|
|
|
+#endif /* CONFIG_BLK_CGROUP */
|
|
|
|
+#endif /* _BLK_CGROUP_H */
|