aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 8c63419a7f70..1afb18226da8 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1715,12 +1715,11 @@ static int setup_bdi(struct btrfs_fs_info *info, struct backing_dev_info *bdi)
1715{ 1715{
1716 int err; 1716 int err;
1717 1717
1718 bdi->capabilities = BDI_CAP_MAP_COPY; 1718 err = bdi_setup_and_register(bdi, "btrfs");
1719 err = bdi_setup_and_register(bdi, "btrfs", BDI_CAP_MAP_COPY);
1720 if (err) 1719 if (err)
1721 return err; 1720 return err;
1722 1721
1723 bdi->ra_pages = default_backing_dev_info.ra_pages; 1722 bdi->ra_pages = VM_MAX_READAHEAD * 1024 / PAGE_CACHE_SIZE;
1724 bdi->congested_fn = btrfs_congested_fn; 1723 bdi->congested_fn = btrfs_congested_fn;
1725 bdi->congested_data = info; 1724 bdi->congested_data = info;
1726 return 0; 1725 return 0;
@@ -2319,7 +2318,6 @@ int open_ctree(struct super_block *sb,
2319 */ 2318 */
2320 fs_info->btree_inode->i_size = OFFSET_MAX; 2319 fs_info->btree_inode->i_size = OFFSET_MAX;
2321 fs_info->btree_inode->i_mapping->a_ops = &btree_aops; 2320 fs_info->btree_inode->i_mapping->a_ops = &btree_aops;
2322 fs_info->btree_inode->i_mapping->backing_dev_info = &fs_info->bdi;
2323 2321
2324 RB_CLEAR_NODE(&BTRFS_I(fs_info->btree_inode)->rb_node); 2322 RB_CLEAR_NODE(&BTRFS_I(fs_info->btree_inode)->rb_node);
2325 extent_io_tree_init(&BTRFS_I(fs_info->btree_inode)->io_tree, 2323 extent_io_tree_init(&BTRFS_I(fs_info->btree_inode)->io_tree,