From 0fcceac892d7ff529cc43045bd4f81bc2bb4791b Mon Sep 17 00:00:00 2001 From: Mike Snitzer Date: Sat, 22 Mar 2014 13:45:46 -0400 Subject: [PATCH] dm thin: use on-stack plugging when submitting bios in process_thin_deferred_bios --- drivers/md/dm-thin.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index c5e098b316b..1b853d57f4a 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -1440,6 +1440,7 @@ static void process_thin_deferred_bios(struct thin_c *tc) unsigned long flags; struct bio *bio; struct bio_list bios; + struct blk_plug plug; if (tc->requeue_mode) { requeue_bio_list(tc, &tc->deferred_bio_list); @@ -1466,6 +1467,7 @@ static void process_thin_deferred_bios(struct thin_c *tc) spin_unlock_irqrestore(&tc->lock, flags); + blk_start_plug(&plug); while ((bio = bio_list_pop(&bios))) { /* * If we've got no free new_mapping structs, and processing @@ -1484,6 +1486,7 @@ static void process_thin_deferred_bios(struct thin_c *tc) else pool->process_bio(tc, bio); } + blk_finish_plug(&plug); } static void process_deferred_bios(struct pool *pool) -- 2.43.0