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.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h
index b24ab71db826..257dc6a956b6 100644
--- a/block/blk-cgroup.h
+++ b/block/blk-cgroup.h
@@ -15,6 +15,8 @@
15 15
16#include <linux/cgroup.h> 16#include <linux/cgroup.h>
17 17
18#ifdef CONFIG_BLK_CGROUP
19
18struct blkio_cgroup { 20struct blkio_cgroup {
19 struct cgroup_subsys_state css; 21 struct cgroup_subsys_state css;
20 unsigned int weight; 22 unsigned int weight;
@@ -41,6 +43,13 @@ struct blkio_group {
41 unsigned long sectors; 43 unsigned long sectors;
42}; 44};
43 45
46#else
47
48struct blkio_group {
49};
50
51#endif
52
44#define BLKIO_WEIGHT_MIN 100 53#define BLKIO_WEIGHT_MIN 100
45#define BLKIO_WEIGHT_MAX 1000 54#define BLKIO_WEIGHT_MAX 1000
46#define BLKIO_WEIGHT_DEFAULT 500 55#define BLKIO_WEIGHT_DEFAULT 500
@@ -69,6 +78,7 @@ extern struct blkio_group *blkiocg_lookup_group(struct blkio_cgroup *blkcg,
69void blkiocg_update_blkio_group_stats(struct blkio_group *blkg, 78void blkiocg_update_blkio_group_stats(struct blkio_group *blkg,
70 unsigned long time, unsigned long sectors); 79 unsigned long time, unsigned long sectors);
71#else 80#else
81struct cgroup;
72static inline struct blkio_cgroup * 82static inline struct blkio_cgroup *
73cgroup_to_blkio_cgroup(struct cgroup *cgroup) { return NULL; } 83cgroup_to_blkio_cgroup(struct cgroup *cgroup) { return NULL; }
74 84