diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2008-04-30 03:54:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 11:29:49 -0400 |
commit | cf0ca9fe5dd9e3693d935757a7b2fc50fc576554 (patch) | |
tree | c795c5271eda9fc67579fa3176c646b892dfdb41 /mm/readahead.c | |
parent | caafa4324335aeb11bc233d5f87aca8cce30beba (diff) |
mm: bdi: export BDI attributes in sysfs
Provide a place in sysfs (/sys/class/bdi) for the backing_dev_info object.
This allows us to see and set the various BDI specific variables.
In particular this properly exposes the read-ahead window for all relevant
users and /sys/block/<block>/queue/read_ahead_kb should be deprecated.
With patient help from Kay Sievers and Greg KH
[mszeredi@suse.cz]
- split off NFS and FUSE changes into separate patches
- document new sysfs attributes under Documentation/ABI
- do bdi_class_init as a core_initcall, otherwise the "default" BDI
won't be initialized
- remove bdi_init_fmt macro, it's not used very much
[akpm@linux-foundation.org: fix ia64 warning]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Acked-by: Greg KH <greg@kroah.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/readahead.c')
-rw-r--r-- | mm/readahead.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mm/readahead.c b/mm/readahead.c index 8762e8988972..d8723a5f6496 100644 --- a/mm/readahead.c +++ b/mm/readahead.c | |||
@@ -235,7 +235,13 @@ unsigned long max_sane_readahead(unsigned long nr) | |||
235 | 235 | ||
236 | static int __init readahead_init(void) | 236 | static int __init readahead_init(void) |
237 | { | 237 | { |
238 | return bdi_init(&default_backing_dev_info); | 238 | int err; |
239 | |||
240 | err = bdi_init(&default_backing_dev_info); | ||
241 | if (!err) | ||
242 | bdi_register(&default_backing_dev_info, NULL, "default"); | ||
243 | |||
244 | return err; | ||
239 | } | 245 | } |
240 | subsys_initcall(readahead_init); | 246 | subsys_initcall(readahead_init); |
241 | 247 | ||