diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-03-17 04:35:06 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-03-26 06:01:33 -0400 |
commit | 26160158d3d3df548f4ee046cc6147fe048cfa9c (patch) | |
tree | 19affc0b08f00ac22e8881d6ec73061a8764cc5d /mm/backing-dev.c | |
parent | 07e86f405addc6436eb969b8279bb14a6dcacce4 (diff) |
Move the default_backing_dev_info out of readahead.c and into backing-dev.c
It really makes no sense to have it in readahead.c, so move it where
it belongs.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'mm/backing-dev.c')
-rw-r--r-- | mm/backing-dev.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 8e8587444132..be68c956a660 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c | |||
@@ -2,11 +2,24 @@ | |||
2 | #include <linux/wait.h> | 2 | #include <linux/wait.h> |
3 | #include <linux/backing-dev.h> | 3 | #include <linux/backing-dev.h> |
4 | #include <linux/fs.h> | 4 | #include <linux/fs.h> |
5 | #include <linux/pagemap.h> | ||
5 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
6 | #include <linux/module.h> | 7 | #include <linux/module.h> |
7 | #include <linux/writeback.h> | 8 | #include <linux/writeback.h> |
8 | #include <linux/device.h> | 9 | #include <linux/device.h> |
9 | 10 | ||
11 | void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page) | ||
12 | { | ||
13 | } | ||
14 | EXPORT_SYMBOL(default_unplug_io_fn); | ||
15 | |||
16 | struct backing_dev_info default_backing_dev_info = { | ||
17 | .ra_pages = VM_MAX_READAHEAD * 1024 / PAGE_CACHE_SIZE, | ||
18 | .state = 0, | ||
19 | .capabilities = BDI_CAP_MAP_COPY, | ||
20 | .unplug_io_fn = default_unplug_io_fn, | ||
21 | }; | ||
22 | EXPORT_SYMBOL_GPL(default_backing_dev_info); | ||
10 | 23 | ||
11 | static struct class *bdi_class; | 24 | static struct class *bdi_class; |
12 | 25 | ||
@@ -166,9 +179,20 @@ static __init int bdi_class_init(void) | |||
166 | bdi_debug_init(); | 179 | bdi_debug_init(); |
167 | return 0; | 180 | return 0; |
168 | } | 181 | } |
169 | |||
170 | postcore_initcall(bdi_class_init); | 182 | postcore_initcall(bdi_class_init); |
171 | 183 | ||
184 | static int __init default_bdi_init(void) | ||
185 | { | ||
186 | int err; | ||
187 | |||
188 | err = bdi_init(&default_backing_dev_info); | ||
189 | if (!err) | ||
190 | bdi_register(&default_backing_dev_info, NULL, "default"); | ||
191 | |||
192 | return err; | ||
193 | } | ||
194 | subsys_initcall(default_bdi_init); | ||
195 | |||
172 | int bdi_register(struct backing_dev_info *bdi, struct device *parent, | 196 | int bdi_register(struct backing_dev_info *bdi, struct device *parent, |
173 | const char *fmt, ...) | 197 | const char *fmt, ...) |
174 | { | 198 | { |