[dm-devel] [PATCH 5/8] dm: don't schedule delayed run of the queue if nothing to do

Mike Snitzer snitzer at redhat.com
Wed Mar 4 00:47:08 UTC 2015


In request-based DM's dm_request_fn(), if blk_peek_request() returns
NULL just return.  Avoids unnecessary blk_delay_queue().

Reported-by: Jens Axboe <axboe at fb.com>
Signed-off-by: Mike Snitzer <snitzer at redhat.com>
---
 drivers/md/dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 8e58df5..c13477a 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1960,7 +1960,7 @@ static void dm_request_fn(struct request_queue *q)
 	while (!blk_queue_stopped(q)) {
 		rq = blk_peek_request(q);
 		if (!rq)
-			goto delay_and_out;
+			goto out;
 
 		/* always use block 0 to find the target for flushes for now */
 		pos = 0;
-- 
1.9.3 (Apple Git-50)




More information about the dm-devel mailing list