cfq-iosched: fix compile problem with !CONFIG_CGROUP
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
72f924f62a
commit
2f5ea47712
|
@ -15,6 +15,8 @@
|
||||||
|
|
||||||
#include <linux/cgroup.h>
|
#include <linux/cgroup.h>
|
||||||
|
|
||||||
|
#ifdef CONFIG_BLK_CGROUP
|
||||||
|
|
||||||
struct blkio_cgroup {
|
struct blkio_cgroup {
|
||||||
struct cgroup_subsys_state css;
|
struct cgroup_subsys_state css;
|
||||||
unsigned int weight;
|
unsigned int weight;
|
||||||
|
@ -41,6 +43,13 @@ struct blkio_group {
|
||||||
unsigned long sectors;
|
unsigned long sectors;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
struct blkio_group {
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#define BLKIO_WEIGHT_MIN 100
|
#define BLKIO_WEIGHT_MIN 100
|
||||||
#define BLKIO_WEIGHT_MAX 1000
|
#define BLKIO_WEIGHT_MAX 1000
|
||||||
#define BLKIO_WEIGHT_DEFAULT 500
|
#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,
|
void blkiocg_update_blkio_group_stats(struct blkio_group *blkg,
|
||||||
unsigned long time, unsigned long sectors);
|
unsigned long time, unsigned long sectors);
|
||||||
#else
|
#else
|
||||||
|
struct cgroup;
|
||||||
static inline struct blkio_cgroup *
|
static inline struct blkio_cgroup *
|
||||||
cgroup_to_blkio_cgroup(struct cgroup *cgroup) { return NULL; }
|
cgroup_to_blkio_cgroup(struct cgroup *cgroup) { return NULL; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue