aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/blktrace_api.h2
-rw-r--r--include/trace/events/block.h33
2 files changed, 34 insertions, 1 deletions
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h
index 622939a23299..3b73b9992b26 100644
--- a/include/linux/blktrace_api.h
+++ b/include/linux/blktrace_api.h
@@ -212,7 +212,7 @@ extern struct attribute_group blk_trace_attr_group;
212# define blk_trace_startstop(q, start) (-ENOTTY) 212# define blk_trace_startstop(q, start) (-ENOTTY)
213# define blk_trace_remove(q) (-ENOTTY) 213# define blk_trace_remove(q) (-ENOTTY)
214# define blk_add_trace_msg(q, fmt, ...) do { } while (0) 214# define blk_add_trace_msg(q, fmt, ...) do { } while (0)
215# define blk_trace_remove_sysfs(struct device *dev) do { } while (0) 215# define blk_trace_remove_sysfs(dev) do { } while (0)
216static inline int blk_trace_init_sysfs(struct device *dev) 216static inline int blk_trace_init_sysfs(struct device *dev)
217{ 217{
218 return 0; 218 return 0;
diff --git a/include/trace/events/block.h b/include/trace/events/block.h
index d86af94691c2..00405b5f624a 100644
--- a/include/trace/events/block.h
+++ b/include/trace/events/block.h
@@ -488,6 +488,39 @@ TRACE_EVENT(block_remap,
488 (unsigned long long)__entry->old_sector) 488 (unsigned long long)__entry->old_sector)
489); 489);
490 490
491TRACE_EVENT(block_rq_remap,
492
493 TP_PROTO(struct request_queue *q, struct request *rq, dev_t dev,
494 sector_t from),
495
496 TP_ARGS(q, rq, dev, from),
497
498 TP_STRUCT__entry(
499 __field( dev_t, dev )
500 __field( sector_t, sector )
501 __field( unsigned int, nr_sector )
502 __field( dev_t, old_dev )
503 __field( sector_t, old_sector )
504 __array( char, rwbs, 6 )
505 ),
506
507 TP_fast_assign(
508 __entry->dev = disk_devt(rq->rq_disk);
509 __entry->sector = blk_rq_pos(rq);
510 __entry->nr_sector = blk_rq_sectors(rq);
511 __entry->old_dev = dev;
512 __entry->old_sector = from;
513 blk_fill_rwbs_rq(__entry->rwbs, rq);
514 ),
515
516 TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu",
517 MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
518 (unsigned long long)__entry->sector,
519 __entry->nr_sector,
520 MAJOR(__entry->old_dev), MINOR(__entry->old_dev),
521 (unsigned long long)__entry->old_sector)
522);
523
491#endif /* _TRACE_BLOCK_H */ 524#endif /* _TRACE_BLOCK_H */
492 525
493/* This part must be outside protection */ 526/* This part must be outside protection */