diff options
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r-- | block/cfq-iosched.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 7f3f343b0c65..78f4829895bd 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/ioprio.h> | 14 | #include <linux/ioprio.h> |
15 | #include <linux/blktrace_api.h> | 15 | #include <linux/blktrace_api.h> |
16 | #include "blk-cgroup.h" | 16 | #include "blk-cgroup.h" |
17 | #include "cfq-iosched.h" | ||
18 | 17 | ||
19 | /* | 18 | /* |
20 | * tunables | 19 | * tunables |
@@ -3855,6 +3854,17 @@ static struct elevator_type iosched_cfq = { | |||
3855 | .elevator_owner = THIS_MODULE, | 3854 | .elevator_owner = THIS_MODULE, |
3856 | }; | 3855 | }; |
3857 | 3856 | ||
3857 | #ifdef CONFIG_CFQ_GROUP_IOSCHED | ||
3858 | static struct blkio_policy_type blkio_policy_cfq = { | ||
3859 | .ops = { | ||
3860 | .blkio_unlink_group_fn = cfq_unlink_blkio_group, | ||
3861 | .blkio_update_group_weight_fn = cfq_update_blkio_group_weight, | ||
3862 | }, | ||
3863 | }; | ||
3864 | #else | ||
3865 | static struct blkio_policy_type blkio_policy_cfq; | ||
3866 | #endif | ||
3867 | |||
3858 | static int __init cfq_init(void) | 3868 | static int __init cfq_init(void) |
3859 | { | 3869 | { |
3860 | /* | 3870 | /* |
@@ -3869,6 +3879,7 @@ static int __init cfq_init(void) | |||
3869 | return -ENOMEM; | 3879 | return -ENOMEM; |
3870 | 3880 | ||
3871 | elv_register(&iosched_cfq); | 3881 | elv_register(&iosched_cfq); |
3882 | blkio_policy_register(&blkio_policy_cfq); | ||
3872 | 3883 | ||
3873 | return 0; | 3884 | return 0; |
3874 | } | 3885 | } |
@@ -3876,6 +3887,7 @@ static int __init cfq_init(void) | |||
3876 | static void __exit cfq_exit(void) | 3887 | static void __exit cfq_exit(void) |
3877 | { | 3888 | { |
3878 | DECLARE_COMPLETION_ONSTACK(all_gone); | 3889 | DECLARE_COMPLETION_ONSTACK(all_gone); |
3890 | blkio_policy_unregister(&blkio_policy_cfq); | ||
3879 | elv_unregister(&iosched_cfq); | 3891 | elv_unregister(&iosched_cfq); |
3880 | ioc_gone = &all_gone; | 3892 | ioc_gone = &all_gone; |
3881 | /* ioc_gone's update must be visible before reading ioc_count */ | 3893 | /* ioc_gone's update must be visible before reading ioc_count */ |