block: fixup block IO unplug trace call

It was removed with the on-stack plugging, readd it and track the
depth of requests added when flushing the plug.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
This commit is contained in:
Jens Axboe
2011-04-12 10:12:19 +02:00
parent d9c9783317
commit 94b5eb28b4
3 changed files with 22 additions and 10 deletions

View File

@ -850,13 +850,13 @@ static void blk_add_trace_plug(void *ignore, struct request_queue *q)
__blk_add_trace(bt, 0, 0, 0, BLK_TA_PLUG, 0, 0, NULL);
}
static void blk_add_trace_unplug_io(void *ignore, struct request_queue *q)
static void blk_add_trace_unplug_io(void *ignore, struct request_queue *q,
unsigned int depth)
{
struct blk_trace *bt = q->blk_trace;
if (bt) {
unsigned int pdu = q->rq.count[READ] + q->rq.count[WRITE];
__be64 rpdu = cpu_to_be64(pdu);
__be64 rpdu = cpu_to_be64(depth);
__blk_add_trace(bt, 0, 0, 0, BLK_TA_UNPLUG_IO, 0,
sizeof(rpdu), &rpdu);