aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2010-03-10 15:33:32 -0500
committerChris Mason <chris.mason@oracle.com>2010-03-15 11:00:09 -0400
commit51684082b11c304829ea22193d4d96a5b1663b97 (patch)
treecfe13e6789c90a817392af490b23a89e7924cbaf /fs/btrfs
parent4849f01d153be0f52b8191ee1be0ce492aa96811 (diff)
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')
-rw-r--r--fs/btrfs/volumes.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 41ecbb2347f2..ace2e8d7bbcd 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -325,16 +325,6 @@ loop_lock:
325 num_sync_run = 0; 325 num_sync_run = 0;
326 blk_run_backing_dev(bdi, NULL); 326 blk_run_backing_dev(bdi, NULL);
327 } 327 }
328
329 cond_resched();
330 if (again)
331 goto loop;
332
333 spin_lock(&device->io_lock);
334 if (device->pending_bios.head || device->pending_sync_bios.head)
335 goto loop_lock;
336 spin_unlock(&device->io_lock);
337
338 /* 328 /*
339 * IO has already been through a long path to get here. Checksumming, 329 * IO has already been through a long path to get here. Checksumming,
340 * async helper threads, perhaps compression. We've done a pretty 330 * async helper threads, perhaps compression. We've done a pretty
@@ -346,6 +336,16 @@ loop_lock:
346 * cared about found its way down here. 336 * cared about found its way down here.
347 */ 337 */
348 blk_run_backing_dev(bdi, NULL); 338 blk_run_backing_dev(bdi, NULL);
339
340 cond_resched();
341 if (again)
342 goto loop;
343
344 spin_lock(&device->io_lock);
345 if (device->pending_bios.head || device->pending_sync_bios.head)
346 goto loop_lock;
347 spin_unlock(&device->io_lock);
348
349done: 349done:
350 return 0; 350 return 0;
351} 351}