aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.h
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r--block/blk-cgroup.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h
index 4f89b967467f..4d316df863b4 100644
--- a/block/blk-cgroup.h
+++ b/block/blk-cgroup.h
@@ -46,11 +46,35 @@ struct blkio_group {
46extern bool blkiocg_css_tryget(struct blkio_cgroup *blkcg); 46extern bool blkiocg_css_tryget(struct blkio_cgroup *blkcg);
47extern void blkiocg_css_put(struct blkio_cgroup *blkcg); 47extern void blkiocg_css_put(struct blkio_cgroup *blkcg);
48 48
49typedef void (blkio_unlink_group_fn) (void *key, struct blkio_group *blkg);
50typedef void (blkio_update_group_weight_fn) (struct blkio_group *blkg,
51 unsigned int weight);
52
53struct blkio_policy_ops {
54 blkio_unlink_group_fn *blkio_unlink_group_fn;
55 blkio_update_group_weight_fn *blkio_update_group_weight_fn;
56};
57
58struct blkio_policy_type {
59 struct list_head list;
60 struct blkio_policy_ops ops;
61};
62
63/* Blkio controller policy registration */
64extern void blkio_policy_register(struct blkio_policy_type *);
65extern void blkio_policy_unregister(struct blkio_policy_type *);
66
49#else 67#else
50 68
51struct blkio_group { 69struct blkio_group {
52}; 70};
53 71
72struct blkio_policy_type {
73};
74
75static inline void blkio_policy_register(struct blkio_policy_type *blkiop) { }
76static inline void blkio_policy_unregister(struct blkio_policy_type *blkiop) { }
77
54#endif 78#endif
55 79
56#define BLKIO_WEIGHT_MIN 100 80#define BLKIO_WEIGHT_MIN 100