Bläddra i källkod

[PATCH] blktrace: only add a bounce trace when we really bounce

Currently we issue a bounce trace when __blk_queue_bounce() is called,
but that merely means that the device has a lower dma mask than the
higher pages in the system. The bio itself may still be lower pages. So
move the bounce trace into __blk_queue_bounce(), when we know there will
actually be page bouncing.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jens Axboe 18 år sedan
förälder
incheckning
c43a5082a6
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      mm/bounce.c

+ 2 - 2
mm/bounce.c

@@ -237,6 +237,8 @@ static void __blk_queue_bounce(request_queue_t *q, struct bio **bio_orig,
 	if (!bio)
 	if (!bio)
 		return;
 		return;
 
 
+	blk_add_trace_bio(q, *bio_orig, BLK_TA_BOUNCE);
+
 	/*
 	/*
 	 * at least one page was bounced, fill in possible non-highmem
 	 * at least one page was bounced, fill in possible non-highmem
 	 * pages
 	 * pages
@@ -291,8 +293,6 @@ void blk_queue_bounce(request_queue_t *q, struct bio **bio_orig)
 		pool = isa_page_pool;
 		pool = isa_page_pool;
 	}
 	}
 
 
-	blk_add_trace_bio(q, *bio_orig, BLK_TA_BOUNCE);
-
 	/*
 	/*
 	 * slow path
 	 * slow path
 	 */
 	 */