summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2011-03-09 10:27:37 +0300
committerJens Axboe <jaxboe@fusionio.com>2011-03-10 10:52:27 +0300
commit69d60eb96ae8a73cf9b79cf28051caf973006011 (patch)
tree254be7302abbd6a21d4f54cfdad6a0af6db282d0 /block
parent721a9602e6607417c6bc15b18e97a2f35266c690 (diff)
downloadlinux-69d60eb96ae8a73cf9b79cf28051caf973006011.tar.xz
blk-throttle: Use blk_plug in throttle dispatch
Use plug in throttle dispatch also as we are dispatching a bunch of bios in throttle context and some of them might merge. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block')
-rw-r--r--block/blk-throttle.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index b8dcdc2663a1..658ee505315b 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -770,6 +770,7 @@ static int throtl_dispatch(struct request_queue *q)
unsigned int nr_disp = 0;
struct bio_list bio_list_on_stack;
struct bio *bio;
+ struct blk_plug plug;
spin_lock_irq(q->queue_lock);
@@ -798,8 +799,10 @@ out:
* immediate dispatch
*/
if (nr_disp) {
+ blk_start_plug(&plug);
while((bio = bio_list_pop(&bio_list_on_stack)))
generic_make_request(bio);
+ blk_finish_plug(&plug);
}
return nr_disp;
}