From d26969b21069332d6cf53b0850cda62421f345c7 Mon Sep 17 00:00:00 2001 From: Chris Mason Date: Tue, 9 Jun 2009 15:59:22 -0400 Subject: [PATCH] --- yaml --- r: 147769 b: refs/heads/master c: d644d8a1e30b88a93bcfb63cada2ae628462ddba h: refs/heads/master i: 147767: f241b756f310a329b8aeb75427199d0442a20456 v: v3 --- [refs] | 2 +- trunk/fs/btrfs/volumes.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 8f5c6da221cf..df047fcc5872 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d84275c938e1a5e2dc5b89eb9b878e0ddb2c55e0 +refs/heads/master: d644d8a1e30b88a93bcfb63cada2ae628462ddba diff --git a/trunk/fs/btrfs/volumes.c b/trunk/fs/btrfs/volumes.c index 9d3618192009..27d5f37b845f 100644 --- a/trunk/fs/btrfs/volumes.c +++ b/trunk/fs/btrfs/volumes.c @@ -161,6 +161,7 @@ static noinline int run_scheduled_bios(struct btrfs_device *device) int again = 0; unsigned long num_run; unsigned long num_sync_run; + unsigned long batch_run = 0; unsigned long limit; unsigned long last_waited = 0; int force_reg = 0; @@ -257,6 +258,8 @@ static noinline int run_scheduled_bios(struct btrfs_device *device) BUG_ON(atomic_read(&cur->bi_cnt) == 0); submit_bio(cur->bi_rw, cur); num_run++; + batch_run++; + if (bio_sync(cur)) num_sync_run++; @@ -273,7 +276,7 @@ static noinline int run_scheduled_bios(struct btrfs_device *device) * is now congested. Back off and let other work structs * run instead */ - if (pending && bdi_write_congested(bdi) && num_run > 16 && + if (pending && bdi_write_congested(bdi) && batch_run > 32 && fs_info->fs_devices->open_devices > 1) { struct io_context *ioc;