summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-04-26 08:25:16 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-04-26 08:25:16 -0700
commitcb49f577879519d1bff5898d9eec72dd441286cb (patch)
tree25ac9515b139d1f84b4fbeb52135779286b277a3
parentf727a938ce1c92d7693e0a66cee2295f2f9ca6d3 (diff)
parent211588ad1902df57beeeadc9b44546540fa4bd81 (diff)
downloadop-kernel-dev-cb49f577879519d1bff5898d9eec72dd441286cb.zip
op-kernel-dev-cb49f577879519d1bff5898d9eec72dd441286cb.tar.gz
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: Btrfs: do some plugging in the submit_bio threads
-rw-r--r--fs/btrfs/volumes.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 309a57b..c7367ae 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -155,6 +155,15 @@ static noinline int run_scheduled_bios(struct btrfs_device *device)
unsigned long limit;
unsigned long last_waited = 0;
int force_reg = 0;
+ struct blk_plug plug;
+
+ /*
+ * this function runs all the bios we've collected for
+ * a particular device. We don't want to wander off to
+ * another device without first sending all of these down.
+ * So, setup a plug here and finish it off before we return
+ */
+ blk_start_plug(&plug);
bdi = blk_get_backing_dev_info(device->bdev);
fs_info = device->dev_root->fs_info;
@@ -294,6 +303,7 @@ loop_lock:
spin_unlock(&device->io_lock);
done:
+ blk_finish_plug(&plug);
return 0;
}
OpenPOWER on IntegriCloud