From: Mike Snitzer Date: Sat, 22 Mar 2014 17:45:46 +0000 (-0400) Subject: dm thin: use on-stack plugging when submitting bios in process_thin_deferred_bios X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=0fcceac892d7ff529cc43045bd4f81bc2bb4791b;p=linux-dmdedup.git dm thin: use on-stack plugging when submitting bios in process_thin_deferred_bios --- 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)