2 #define TRACE_SYSTEM block
4 #if !defined(_TRACE_BLOCK_H) || defined(TRACE_HEADER_MULTI_READ)
7 #include <linux/blktrace_api.h>
22 __field(
unsigned int, nr_sector )
29 __entry->dev = rq->rq_disk ? disk_devt(rq->rq_disk) : 0;
30 __entry->sector = (rq->cmd_type == REQ_TYPE_BLOCK_PC) ?
32 __entry->nr_sector = (rq->cmd_type == REQ_TYPE_BLOCK_PC) ?
33 0 : blk_rq_sectors(rq);
36 blk_fill_rwbs(
__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq));
107 __field(
unsigned int, nr_sector )
115 __entry->dev = rq->rq_disk ? disk_devt(rq->rq_disk) : 0;
116 __entry->sector = (rq->cmd_type == REQ_TYPE_BLOCK_PC) ?
118 __entry->nr_sector = (rq->cmd_type == REQ_TYPE_BLOCK_PC) ?
119 0 : blk_rq_sectors(rq);
120 __entry->bytes = (rq->cmd_type == REQ_TYPE_BLOCK_PC) ?
121 blk_rq_bytes(rq) : 0;
123 blk_fill_rwbs(
__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq));
128 TP_printk(
"%d,%d %s %u (%s) %llu + %u [%s]",
187 __field(
unsigned int, nr_sector )
194 bio->bi_bdev->bd_dev : 0;
195 __entry->sector = bio->bi_sector;
196 __entry->nr_sector = bio->bi_size >> 9;
197 blk_fill_rwbs(
__entry->rwbs, bio->bi_rw, bio->bi_size);
203 (
unsigned long long)
__entry->sector,
231 __entry->dev = bio->bi_bdev->bd_dev;
232 __entry->sector = bio->bi_sector;
233 __entry->nr_sector = bio->bi_size >> 9;
235 blk_fill_rwbs(
__entry->rwbs, bio->bi_rw, bio->bi_size);
240 (
unsigned long long)
__entry->sector,
253 __field(
unsigned int, nr_sector )
259 __entry->dev = bio->bi_bdev->bd_dev;
260 __entry->sector = bio->bi_sector;
261 __entry->nr_sector = bio->bi_size >> 9;
262 blk_fill_rwbs(
__entry->rwbs, bio->bi_rw, bio->bi_size);
268 (
unsigned long long)
__entry->sector,
325 __field(
unsigned int, nr_sector )
331 __entry->dev = bio ? bio->bi_bdev->bd_dev : 0;
332 __entry->sector = bio ? bio->bi_sector : 0;
333 __entry->nr_sector = bio ? bio->bi_size >> 9 : 0;
335 bio ? bio->bi_rw : 0,
__entry->nr_sector);
341 (
unsigned long long)
__entry->sector,
453 unsigned int new_sector),
466 __entry->dev = bio->bi_bdev->bd_dev;
467 __entry->sector = bio->bi_sector;
468 __entry->new_sector = new_sector;
469 blk_fill_rwbs(
__entry->rwbs, bio->bi_rw, bio->bi_size);
475 (
unsigned long long)
__entry->sector,
476 (
unsigned long long)
__entry->new_sector,
500 __field(
unsigned int, nr_sector )
507 __entry->dev = bio->bi_bdev->bd_dev;
508 __entry->sector = bio->bi_sector;
509 __entry->nr_sector = bio->bi_size >> 9;
512 blk_fill_rwbs(
__entry->rwbs, bio->bi_rw, bio->bi_size);
515 TP_printk(
"%d,%d %s %llu + %u <- (%d,%d) %llu",
517 (
unsigned long long)
__entry->sector,
520 (
unsigned long long)
__entry->old_sector)
544 __field(
unsigned int, nr_sector )
551 __entry->dev = disk_devt(rq->rq_disk);
552 __entry->sector = blk_rq_pos(rq);
553 __entry->nr_sector = blk_rq_sectors(rq);
556 blk_fill_rwbs(
__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq));
559 TP_printk(
"%d,%d %s %llu + %u <- (%d,%d) %llu",