aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe2009-12-03 14:06:43 -0600
committerJens Axboe2009-12-03 14:07:17 -0600
commit2f5ea47712489a9d2d3cb832eb06062e4e64e0ec (patch)
tree49c943cf46b83b4fc7da1a38d65cc7914e8ddbfb /block/blk-cgroup.h
parent72f924f62a6eb375c7c237ecc911f95be0531d1a (diff)
downloadkernel-common-2f5ea47712489a9d2d3cb832eb06062e4e64e0ec.tar.gz
kernel-common-2f5ea47712489a9d2d3cb832eb06062e4e64e0ec.tar.xz
kernel-common-2f5ea47712489a9d2d3cb832eb06062e4e64e0ec.zip
cfq-iosched: fix compile problem with !CONFIG_CGROUP
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
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 b24ab71db82..257dc6a956b 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