Commit 8c1f67fa authored by Jens Axboe's avatar Jens Axboe

[PATCH] make blk_dump_rq_flags a bit more useful

Add some missing bits, and make it generally a bit more useful outside
of REQ_PC requests.
parent 86b9d08b
...@@ -655,14 +655,19 @@ static char *rq_flags[] = { ...@@ -655,14 +655,19 @@ static char *rq_flags[] = {
"REQ_PC", "REQ_PC",
"REQ_BLOCK_PC", "REQ_BLOCK_PC",
"REQ_SENSE", "REQ_SENSE",
"REQ_FAILED",
"REQ_QUIET",
"REQ_SPECIAL" "REQ_SPECIAL"
"REQ_DRIVE_CMD",
"REQ_DRIVE_TASK",
"REQ_DRIVE_TASKFILE",
}; };
void blk_dump_rq_flags(struct request *rq, char *msg) void blk_dump_rq_flags(struct request *rq, char *msg)
{ {
int bit; int bit;
printk("%s: dev %02x:%02x: ", msg, major(rq->rq_dev), minor(rq->rq_dev)); printk("%s: dev %02x:%02x: flags = ", msg, major(rq->rq_dev), minor(rq->rq_dev));
bit = 0; bit = 0;
do { do {
if (rq->flags & (1 << bit)) if (rq->flags & (1 << bit))
...@@ -670,10 +675,17 @@ void blk_dump_rq_flags(struct request *rq, char *msg) ...@@ -670,10 +675,17 @@ void blk_dump_rq_flags(struct request *rq, char *msg)
bit++; bit++;
} while (bit < __REQ_NR_BITS); } while (bit < __REQ_NR_BITS);
printk("sector %llu, nr/cnr %lu/%u\n", (unsigned long long)rq->sector, printk("\nsector %llu, nr/cnr %lu/%u\n", (unsigned long long)rq->sector,
rq->nr_sectors, rq->nr_sectors,
rq->current_nr_sectors); rq->current_nr_sectors);
printk("bio %p, biotail %p\n", rq->bio, rq->biotail); printk("bio %p, biotail %p, buffer %p, data %p, len %u\n", rq->bio, rq->biotail, rq->buffer, rq->data, rq->data_len);
if (rq->flags & (REQ_BLOCK_PC | REQ_PC)) {
printk("cdb: ");
for (bit = 0; bit < sizeof(rq->cmd); bit++)
printk("%02x ", rq->cmd[bit]);
printk("\n");
}
} }
void blk_recount_segments(request_queue_t *q, struct bio *bio) void blk_recount_segments(request_queue_t *q, struct bio *bio)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment