aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2011-12-21 15:59:45 -0500
committerRafael J. Wysocki <rjw@sisk.pl>2011-12-21 15:59:45 -0500
commitb00f4dc5ff022cb9cbaffd376d9454d7fa1e496f (patch)
tree40f1b232e2f1e8ac365317a14fdcbcb331722b46 /fs/btrfs/disk-io.c
parent1eac8111e0763853266a171ce11214da3a347a0a (diff)
parentb9e26dfdad5a4f9cbdaacafac6998614cc9c41bc (diff)
Merge branch 'master' into pm-sleep
* master: (848 commits) SELinux: Fix RCU deref check warning in sel_netport_insert() binary_sysctl(): fix memory leak mm/vmalloc.c: remove static declaration of va from __get_vm_area_node ipmi_watchdog: restore settings when BMC reset oom: fix integer overflow of points in oom_badness memcg: keep root group unchanged if creation fails nilfs2: potential integer overflow in nilfs_ioctl_clean_segments() nilfs2: unbreak compat ioctl cpusets: stall when updating mems_allowed for mempolicy or disjoint nodemask evm: prevent racing during tfm allocation evm: key must be set once during initialization mmc: vub300: fix type of firmware_rom_wait_states module parameter Revert "mmc: enable runtime PM by default" mmc: sdhci: remove "state" argument from sdhci_suspend_host x86, dumpstack: Fix code bytes breakage due to missing KERN_CONT IB/qib: Correct sense on freectxts increment and decrement RDMA/cma: Verify private data length cgroups: fix a css_set not found bug in cgroup_attach_proc oprofile: Fix uninitialized memory access when writing to writing to oprofilefs Revert "xen/pv-on-hvm kexec: add xs_reset_watches to shutdown watches from old kernel" ... Conflicts: kernel/cgroup_freezer.c
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index b09175901521..f99a099a7747 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2190,19 +2190,27 @@ struct btrfs_root *open_ctree(struct super_block *sb,
2190 fs_info->endio_meta_write_workers.idle_thresh = 2; 2190 fs_info->endio_meta_write_workers.idle_thresh = 2;
2191 fs_info->readahead_workers.idle_thresh = 2; 2191 fs_info->readahead_workers.idle_thresh = 2;
2192 2192
2193 btrfs_start_workers(&fs_info->workers, 1); 2193 /*
2194 btrfs_start_workers(&fs_info->generic_worker, 1); 2194 * btrfs_start_workers can really only fail because of ENOMEM so just
2195 btrfs_start_workers(&fs_info->submit_workers, 1); 2195 * return -ENOMEM if any of these fail.
2196 btrfs_start_workers(&fs_info->delalloc_workers, 1); 2196 */
2197 btrfs_start_workers(&fs_info->fixup_workers, 1); 2197 ret = btrfs_start_workers(&fs_info->workers);
2198 btrfs_start_workers(&fs_info->endio_workers, 1); 2198 ret |= btrfs_start_workers(&fs_info->generic_worker);
2199 btrfs_start_workers(&fs_info->endio_meta_workers, 1); 2199 ret |= btrfs_start_workers(&fs_info->submit_workers);
2200 btrfs_start_workers(&fs_info->endio_meta_write_workers, 1); 2200 ret |= btrfs_start_workers(&fs_info->delalloc_workers);
2201 btrfs_start_workers(&fs_info->endio_write_workers, 1); 2201 ret |= btrfs_start_workers(&fs_info->fixup_workers);
2202 btrfs_start_workers(&fs_info->endio_freespace_worker, 1); 2202 ret |= btrfs_start_workers(&fs_info->endio_workers);
2203 btrfs_start_workers(&fs_info->delayed_workers, 1); 2203 ret |= btrfs_start_workers(&fs_info->endio_meta_workers);
2204 btrfs_start_workers(&fs_info->caching_workers, 1); 2204 ret |= btrfs_start_workers(&fs_info->endio_meta_write_workers);
2205 btrfs_start_workers(&fs_info->readahead_workers, 1); 2205 ret |= btrfs_start_workers(&fs_info->endio_write_workers);
2206 ret |= btrfs_start_workers(&fs_info->endio_freespace_worker);
2207 ret |= btrfs_start_workers(&fs_info->delayed_workers);
2208 ret |= btrfs_start_workers(&fs_info->caching_workers);
2209 ret |= btrfs_start_workers(&fs_info->readahead_workers);
2210 if (ret) {
2211 ret = -ENOMEM;
2212 goto fail_sb_buffer;
2213 }
2206 2214
2207 fs_info->bdi.ra_pages *= btrfs_super_num_devices(disk_super); 2215 fs_info->bdi.ra_pages *= btrfs_super_num_devices(disk_super);
2208 fs_info->bdi.ra_pages = max(fs_info->bdi.ra_pages, 2216 fs_info->bdi.ra_pages = max(fs_info->bdi.ra_pages,