]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - block/blk-cgroup.h
io-controller: Add a new interface "weight_device" for IO-Controller
[net-next-2.6.git] / block / blk-cgroup.h
index bfce085b19629ab6f47eccb5507987c80a603c90..3c27bdfc97b94f77d169d59c22ba6d2b2fe312e0 100644 (file)
@@ -70,6 +70,7 @@ struct blkio_cgroup {
        unsigned int weight;
        spinlock_t lock;
        struct hlist_head blkg_list;
+       struct list_head policy_list; /* list of blkio_policy_node */
 };
 
 struct blkio_group_stats {
@@ -119,6 +120,15 @@ struct blkio_group {
        struct blkio_group_stats stats;
 };
 
+struct blkio_policy_node {
+       struct list_head node;
+       dev_t dev;
+       unsigned int weight;
+};
+
+extern unsigned int blkcg_get_weight(struct blkio_cgroup *blkcg,
+                                    dev_t dev);
+
 typedef void (blkio_unlink_group_fn) (void *key, struct blkio_group *blkg);
 typedef void (blkio_update_group_weight_fn) (struct blkio_group *blkg,
                                                unsigned int weight);