summaryrefslogtreecommitdiff
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-04-18 16:13:31 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:02 -0400
commit4575c9cceeca2f51c50536850e15e1dc5187f3d9 (patch)
tree4ae487b1cc5ad469505577de1035fbf71e330658 /fs/btrfs/disk-io.c
parent9ad6b7bc2e00ba02f915cffd5b6bcd6564bb2c75 (diff)
downloadlwn-4575c9cceeca2f51c50536850e15e1dc5187f3d9.tar.gz
lwn-4575c9cceeca2f51c50536850e15e1dc5187f3d9.zip
Btrfs: Scale the bdi ra_pages by the number of devices in the FS
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index b479cdfe3ee8..46188ee16623 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -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)
bdi_init(bdi);
#endif
- bdi->ra_pages = default_backing_dev_info.ra_pages * 4;
+ bdi->ra_pages = default_backing_dev_info.ra_pages;
bdi->state = 0;
bdi->capabilities = default_backing_dev_info.capabilities;
bdi->unplug_io_fn = btrfs_unplug_io_fn;
@@ -1214,6 +1214,8 @@ struct btrfs_root *open_ctree(struct super_block *sb,
(unsigned long long)fs_devices->num_devices);
goto fail_sb_buffer;
}
+ fs_info->bdi.ra_pages *= btrfs_super_num_devices(disk_super);
+
nodesize = btrfs_super_nodesize(disk_super);
leafsize = btrfs_super_leafsize(disk_super);
sectorsize = btrfs_super_sectorsize(disk_super);