diff options
author | Christoph Hellwig <hch@lst.de> | 2017-01-27 03:35:54 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-01-27 17:08:35 -0500 |
commit | 48b77ad6084481ef9330a5d2bee289966da0975b (patch) | |
tree | ec332b20a788843320c1fed26820592793b13fe2 /include/linux/blktrace_api.h | |
parent | 6d247d7f71d1fa4b66a5f4da7b1daa21510d529b (diff) |
block: cleanup tracing
A couple tweaks to the tracing code:
- trace the request size for all requests
- trace request sector and nr_sectors only for fs requests, enforced by
helpers
- drop SCSI CDB tracing - we have SCSI tracing for this and are going
to me the CDB out of the generic struct request soon.
With this the tracing code stops to know about BLOCK_PC requests entirely,
it's just FS vs passthrough requests now, where the latter includes any
driver-private requests.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/blktrace_api.h')
-rw-r--r-- | include/linux/blktrace_api.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index e417f080219a..a143a67a6f33 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
@@ -110,16 +110,16 @@ struct compat_blk_user_trace_setup { | |||
110 | 110 | ||
111 | #endif | 111 | #endif |
112 | 112 | ||
113 | #if defined(CONFIG_EVENT_TRACING) && defined(CONFIG_BLOCK) | 113 | extern void blk_fill_rwbs(char *rwbs, unsigned int op, int bytes); |
114 | 114 | ||
115 | static inline int blk_cmd_buf_len(struct request *rq) | 115 | static inline sector_t blk_rq_trace_sector(struct request *rq) |
116 | { | 116 | { |
117 | return (rq->cmd_type == REQ_TYPE_BLOCK_PC) ? rq->cmd_len * 3 : 1; | 117 | return (rq->cmd_type != REQ_TYPE_FS) ? 0 : blk_rq_pos(rq); |
118 | } | 118 | } |
119 | 119 | ||
120 | extern void blk_dump_cmd(char *buf, struct request *rq); | 120 | static inline unsigned int blk_rq_trace_nr_sectors(struct request *rq) |
121 | extern void blk_fill_rwbs(char *rwbs, unsigned int op, int bytes); | 121 | { |
122 | 122 | return (rq->cmd_type != REQ_TYPE_FS) ? 0 : blk_rq_sectors(rq); | |
123 | #endif /* CONFIG_EVENT_TRACING && CONFIG_BLOCK */ | 123 | } |
124 | 124 | ||
125 | #endif | 125 | #endif |