29 lines
825 B
Diff
29 lines
825 B
Diff
--- kernel/block-io.c.orig 2011-05-20 19:03:02.570704797 -0400
|
|
+++ kernel/block-io.c 2011-05-20 19:06:10.260395174 -0400
|
|
@@ -56,6 +56,7 @@
|
|
struct request_queue *bdev_q = bdev_get_queue(bio_data->bdev);
|
|
struct tio_work *tio_work;
|
|
struct bio *tio_bio = NULL, *bio = NULL, *biotail = NULL;
|
|
+ struct blk_plug plug;
|
|
|
|
u32 offset = tio->offset;
|
|
u32 size = tio->size;
|
|
@@ -77,6 +78,7 @@
|
|
atomic_set(&tio_work->error, 0);
|
|
atomic_set(&tio_work->bios_remaining, 0);
|
|
init_completion(&tio_work->tio_complete);
|
|
+ blk_start_plug(&plug);
|
|
|
|
/* Main processing loop, allocate and fill all bios */
|
|
while (tio_index < tio->pg_cnt) {
|
|
@@ -127,8 +129,7 @@
|
|
submit_bio(rw, bio);
|
|
}
|
|
|
|
- if (bdev_q && bdev_q->unplug_fn)
|
|
- bdev_q->unplug_fn(bdev_q);
|
|
+ blk_finish_plug(&plug);
|
|
|
|
wait_for_completion(&tio_work->tio_complete);
|
|
|