Merge branch 'for-2.6.30' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.30' of git://git.kernel.dk/linux-2.6-block: Get rid of pdflush_operation() in emergency sync and remount btrfs: get rid of current_is_pdflush() in btrfs_btree_balance_dirty Move the default_backing_dev_info out of readahead.c and into backing-dev.c block: Repeated lines in switching-sched.txt bsg: Remove bogus check against request_queue->max_sectors block: WARN in __blk_put_request() for potential bio leak loop: fix circular locking in loop_clr_fd() loop: support barrier writes bsg: add support for tail queuing cpqarray: enable bus mastering block: genhd.h cleanup patch block: add private bio_set for bio integrity allocations block: genhd.h comment needs updating block: get rid of unused blkdev_free_rq() define block: remove various blk_queue_*() setting functions in blk_init_queue_node() cciss: add BUILD_BUG_ON() for catching bad CommandList_struct alignment block: don't create bio_vec slabs of less than the inline number block: cleanup bio_alloc_bioset()
This commit is contained in:
@ -2,11 +2,24 @@
|
||||
#include <linux/wait.h>
|
||||
#include <linux/backing-dev.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/pagemap.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/writeback.h>
|
||||
#include <linux/device.h>
|
||||
|
||||
void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page)
|
||||
{
|
||||
}
|
||||
EXPORT_SYMBOL(default_unplug_io_fn);
|
||||
|
||||
struct backing_dev_info default_backing_dev_info = {
|
||||
.ra_pages = VM_MAX_READAHEAD * 1024 / PAGE_CACHE_SIZE,
|
||||
.state = 0,
|
||||
.capabilities = BDI_CAP_MAP_COPY,
|
||||
.unplug_io_fn = default_unplug_io_fn,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(default_backing_dev_info);
|
||||
|
||||
static struct class *bdi_class;
|
||||
|
||||
@ -166,9 +179,20 @@ static __init int bdi_class_init(void)
|
||||
bdi_debug_init();
|
||||
return 0;
|
||||
}
|
||||
|
||||
postcore_initcall(bdi_class_init);
|
||||
|
||||
static int __init default_bdi_init(void)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = bdi_init(&default_backing_dev_info);
|
||||
if (!err)
|
||||
bdi_register(&default_backing_dev_info, NULL, "default");
|
||||
|
||||
return err;
|
||||
}
|
||||
subsys_initcall(default_bdi_init);
|
||||
|
||||
int bdi_register(struct backing_dev_info *bdi, struct device *parent,
|
||||
const char *fmt, ...)
|
||||
{
|
||||
|
@ -17,19 +17,6 @@
|
||||
#include <linux/pagevec.h>
|
||||
#include <linux/pagemap.h>
|
||||
|
||||
void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page)
|
||||
{
|
||||
}
|
||||
EXPORT_SYMBOL(default_unplug_io_fn);
|
||||
|
||||
struct backing_dev_info default_backing_dev_info = {
|
||||
.ra_pages = VM_MAX_READAHEAD * 1024 / PAGE_CACHE_SIZE,
|
||||
.state = 0,
|
||||
.capabilities = BDI_CAP_MAP_COPY,
|
||||
.unplug_io_fn = default_unplug_io_fn,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(default_backing_dev_info);
|
||||
|
||||
/*
|
||||
* Initialise a struct file's readahead state. Assumes that the caller has
|
||||
* memset *ra to zero.
|
||||
@ -233,18 +220,6 @@ unsigned long max_sane_readahead(unsigned long nr)
|
||||
+ node_page_state(numa_node_id(), NR_FREE_PAGES)) / 2);
|
||||
}
|
||||
|
||||
static int __init readahead_init(void)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = bdi_init(&default_backing_dev_info);
|
||||
if (!err)
|
||||
bdi_register(&default_backing_dev_info, NULL, "default");
|
||||
|
||||
return err;
|
||||
}
|
||||
subsys_initcall(readahead_init);
|
||||
|
||||
/*
|
||||
* Submit IO for the read-ahead request in file_ra_state.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user