summaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.h
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-12-03 21:06:43 +0100
committerJens Axboe <jens.axboe@oracle.com>2009-12-03 21:07:17 +0100
commit2f5ea47712489a9d2d3cb832eb06062e4e64e0ec (patch)
tree49c943cf46b83b4fc7da1a38d65cc7914e8ddbfb /block/blk-cgroup.h
parent72f924f62a6eb375c7c237ecc911f95be0531d1a (diff)
downloadop-kernel-dev-2f5ea47712489a9d2d3cb832eb06062e4e64e0ec.zip
op-kernel-dev-2f5ea47712489a9d2d3cb832eb06062e4e64e0ec.tar.gz
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 b24ab71..257dc6a 100644
--- a/block/blk-cgroup.h
+++ b/block/blk-cgroup.h
@@ -15,6 +15,8 @@
#include <linux/cgroup.h>
+#ifdef CONFIG_BLK_CGROUP
+
struct blkio_cgroup {
struct cgroup_subsys_state css;
unsigned int weight;
@@ -41,6 +43,13 @@ struct blkio_group {
unsigned long sectors;
};
+#else
+
+struct blkio_group {
+};
+
+#endif
+
#define BLKIO_WEIGHT_MIN 100
#define BLKIO_WEIGHT_MAX 1000
#define BLKIO_WEIGHT_DEFAULT 500
@@ -69,6 +78,7 @@ extern struct blkio_group *blkiocg_lookup_group(struct blkio_cgroup *blkcg,
void blkiocg_update_blkio_group_stats(struct blkio_group *blkg,
unsigned long time, unsigned long sectors);
#else
+struct cgroup;
static inline struct blkio_cgroup *
cgroup_to_blkio_cgroup(struct cgroup *cgroup) { return NULL; }
OpenPOWER on IntegriCloud