From: Jens Axboe Date: Fri, 12 Jan 2007 11:20:26 +0000 (+0100) Subject: [PATCH] blktrace: only add a bounce trace when we really bounce X-Git-Tag: v2.6.20-rc5~1 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c43a5082a61f351248c5f015ee5d4641309bd96e;p=linux-2.6-omap-h63xx.git [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 Signed-off-by: Linus Torvalds --- diff --git a/mm/bounce.c b/mm/bounce.c index e4b62d2a402..643efbe8240 100644 --- a/mm/bounce.c +++ b/mm/bounce.c @@ -237,6 +237,8 @@ static void __blk_queue_bounce(request_queue_t *q, struct bio **bio_orig, if (!bio) return; + blk_add_trace_bio(q, *bio_orig, BLK_TA_BOUNCE); + /* * at least one page was bounced, fill in possible non-highmem * pages @@ -291,8 +293,6 @@ void blk_queue_bounce(request_queue_t *q, struct bio **bio_orig) pool = isa_page_pool; } - blk_add_trace_bio(q, *bio_orig, BLK_TA_BOUNCE); - /* * slow path */