diff options
author | Chris Mason <chris.mason@oracle.com> | 2010-03-10 15:33:32 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-03-15 11:00:09 -0400 |
commit | 51684082b11c304829ea22193d4d96a5b1663b97 (patch) | |
tree | cfe13e6789c90a817392af490b23a89e7924cbaf /fs/btrfs/volumes.c | |
parent | 4849f01d153be0f52b8191ee1be0ce492aa96811 (diff) | |
download | kernel_samsung_smdk4412-51684082b11c304829ea22193d4d96a5b1663b97.zip kernel_samsung_smdk4412-51684082b11c304829ea22193d4d96a5b1663b97.tar.gz kernel_samsung_smdk4412-51684082b11c304829ea22193d4d96a5b1663b97.tar.bz2 |
Btrfs: run the backing dev more often in the submit_bio helper
The submit_bio helper thread can decide to loop back around to
service more bios. This commit forces it to unplug first, which helps
reduce the latency seen by submitters.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 41ecbb2..ace2e8d 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -325,16 +325,6 @@ loop_lock: num_sync_run = 0; blk_run_backing_dev(bdi, NULL); } - - cond_resched(); - if (again) - goto loop; - - spin_lock(&device->io_lock); - if (device->pending_bios.head || device->pending_sync_bios.head) - goto loop_lock; - spin_unlock(&device->io_lock); - /* * IO has already been through a long path to get here. Checksumming, * async helper threads, perhaps compression. We've done a pretty @@ -346,6 +336,16 @@ loop_lock: * cared about found its way down here. */ blk_run_backing_dev(bdi, NULL); + + cond_resched(); + if (again) + goto loop; + + spin_lock(&device->io_lock); + if (device->pending_bios.head || device->pending_sync_bios.head) + goto loop_lock; + spin_unlock(&device->io_lock); + done: return 0; } |