diff options
Diffstat (limited to 'include/linux/blktrace_api.h')
| -rw-r--r-- | include/linux/blktrace_api.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index 416bf62d6d46..3395cf7130f5 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #ifdef __KERNEL__ | 5 | #ifdef __KERNEL__ |
| 6 | #include <linux/blkdev.h> | 6 | #include <linux/blkdev.h> |
| 7 | #include <linux/relay.h> | 7 | #include <linux/relay.h> |
| 8 | #include <linux/compat.h> | ||
| 8 | #endif | 9 | #endif |
| 9 | 10 | ||
| 10 | /* | 11 | /* |
| @@ -220,11 +221,26 @@ static inline int blk_trace_init_sysfs(struct device *dev) | |||
| 220 | 221 | ||
| 221 | #endif /* CONFIG_BLK_DEV_IO_TRACE */ | 222 | #endif /* CONFIG_BLK_DEV_IO_TRACE */ |
| 222 | 223 | ||
| 224 | #ifdef CONFIG_COMPAT | ||
| 225 | |||
| 226 | struct compat_blk_user_trace_setup { | ||
| 227 | char name[32]; | ||
| 228 | u16 act_mask; | ||
| 229 | u32 buf_size; | ||
| 230 | u32 buf_nr; | ||
| 231 | compat_u64 start_lba; | ||
| 232 | compat_u64 end_lba; | ||
| 233 | u32 pid; | ||
| 234 | }; | ||
| 235 | #define BLKTRACESETUP32 _IOWR(0x12, 115, struct compat_blk_user_trace_setup) | ||
| 236 | |||
| 237 | #endif | ||
| 238 | |||
| 223 | #if defined(CONFIG_EVENT_TRACING) && defined(CONFIG_BLOCK) | 239 | #if defined(CONFIG_EVENT_TRACING) && defined(CONFIG_BLOCK) |
| 224 | 240 | ||
| 225 | static inline int blk_cmd_buf_len(struct request *rq) | 241 | static inline int blk_cmd_buf_len(struct request *rq) |
| 226 | { | 242 | { |
| 227 | return blk_pc_request(rq) ? rq->cmd_len * 3 : 1; | 243 | return (rq->cmd_type == REQ_TYPE_BLOCK_PC) ? rq->cmd_len * 3 : 1; |
| 228 | } | 244 | } |
| 229 | 245 | ||
| 230 | extern void blk_dump_cmd(char *buf, struct request *rq); | 246 | extern void blk_dump_cmd(char *buf, struct request *rq); |
