Commit 4575c9cc authored by Chris Mason's avatar Chris Mason

Btrfs: Scale the bdi ra_pages by the number of devices in the FS

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 9ad6b7bc
...@@ -932,7 +932,7 @@ static int setup_bdi(struct btrfs_fs_info *info, struct backing_dev_info *bdi) ...@@ -932,7 +932,7 @@ static int setup_bdi(struct btrfs_fs_info *info, struct backing_dev_info *bdi)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
bdi_init(bdi); bdi_init(bdi);
#endif #endif
bdi->ra_pages = default_backing_dev_info.ra_pages * 4; bdi->ra_pages = default_backing_dev_info.ra_pages;
bdi->state = 0; bdi->state = 0;
bdi->capabilities = default_backing_dev_info.capabilities; bdi->capabilities = default_backing_dev_info.capabilities;
bdi->unplug_io_fn = btrfs_unplug_io_fn; bdi->unplug_io_fn = btrfs_unplug_io_fn;
...@@ -1214,6 +1214,8 @@ struct btrfs_root *open_ctree(struct super_block *sb, ...@@ -1214,6 +1214,8 @@ struct btrfs_root *open_ctree(struct super_block *sb,
(unsigned long long)fs_devices->num_devices); (unsigned long long)fs_devices->num_devices);
goto fail_sb_buffer; goto fail_sb_buffer;
} }
fs_info->bdi.ra_pages *= btrfs_super_num_devices(disk_super);
nodesize = btrfs_super_nodesize(disk_super); nodesize = btrfs_super_nodesize(disk_super);
leafsize = btrfs_super_leafsize(disk_super); leafsize = btrfs_super_leafsize(disk_super);
sectorsize = btrfs_super_sectorsize(disk_super); sectorsize = btrfs_super_sectorsize(disk_super);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment