diff options
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r-- | block/blk-cgroup.h | 24 |
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 { | |||
46 | extern bool blkiocg_css_tryget(struct blkio_cgroup *blkcg); | 46 | extern bool blkiocg_css_tryget(struct blkio_cgroup *blkcg); |
47 | extern void blkiocg_css_put(struct blkio_cgroup *blkcg); | 47 | extern void blkiocg_css_put(struct blkio_cgroup *blkcg); |
48 | 48 | ||
49 | typedef void (blkio_unlink_group_fn) (void *key, struct blkio_group *blkg); | ||
50 | typedef void (blkio_update_group_weight_fn) (struct blkio_group *blkg, | ||
51 | unsigned int weight); | ||
52 | |||
53 | struct 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 | |||
58 | struct blkio_policy_type { | ||
59 | struct list_head list; | ||
60 | struct blkio_policy_ops ops; | ||
61 | }; | ||
62 | |||
63 | /* Blkio controller policy registration */ | ||
64 | extern void blkio_policy_register(struct blkio_policy_type *); | ||
65 | extern void blkio_policy_unregister(struct blkio_policy_type *); | ||
66 | |||
49 | #else | 67 | #else |
50 | 68 | ||
51 | struct blkio_group { | 69 | struct blkio_group { |
52 | }; | 70 | }; |
53 | 71 | ||
72 | struct blkio_policy_type { | ||
73 | }; | ||
74 | |||
75 | static inline void blkio_policy_register(struct blkio_policy_type *blkiop) { } | ||
76 | static 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 |