|
|
| version 1.1, 2005/08/29 15:19:41 | version 1.2, 2005/09/07 15:13:10 |
|---|---|
| Line 53 enum { | Line 53 enum { |
| #define BLK_TA_COMPLETE (__BLK_TA_COMPLETE| BLK_TC_ACT(BLK_TC_COMPLETE)) | #define BLK_TA_COMPLETE (__BLK_TA_COMPLETE| BLK_TC_ACT(BLK_TC_COMPLETE)) |
| #define BLK_IO_TRACE_MAGIC 0x65617400 | #define BLK_IO_TRACE_MAGIC 0x65617400 |
| #define BLK_IO_TRACE_VERSION 0x02 | #define BLK_IO_TRACE_VERSION 0x03 |
| /* | /* |
| * The trace itself | * The trace itself |
| Line 66 struct blk_io_trace { | Line 66 struct blk_io_trace { |
| u32 bytes; /* transfer length */ | u32 bytes; /* transfer length */ |
| u32 action; /* what happened */ | u32 action; /* what happened */ |
| u32 pid; /* who did it */ | u32 pid; /* who did it */ |
| u16 cpu; /* on what cpu did it happen */ | |
| u16 error; /* completion error */ | u16 error; /* completion error */ |
| u16 pdu_len; /* length of data after this trace */ | u16 pdu_len; /* length of data after this trace */ |
| }; | }; |
| struct blk_trace { | struct blk_trace { |
| struct dentry *dir; | |
| struct rchan *rchan; | struct rchan *rchan; |
| atomic_t sequence; | atomic_t sequence; |
| u16 act_mask; | u16 act_mask; |
| Line 89 struct blk_user_trace_setup { | Line 91 struct blk_user_trace_setup { |
| #if defined(CONFIG_BLK_DEV_IO_TRACE) | #if defined(CONFIG_BLK_DEV_IO_TRACE) |
| extern int blk_start_trace(struct block_device *, char __user *); | extern int blk_start_trace(struct block_device *, char __user *); |
| extern int blk_stop_trace(struct block_device *); | extern int blk_stop_trace(struct block_device *); |
| extern void blk_cleanup_trace(struct blk_trace *); | |
| extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, char *); | extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, char *); |
| static inline void blk_add_trace_rq(struct request_queue *q, struct request *rq, | static inline void blk_add_trace_rq(struct request_queue *q, struct request *rq, |
| Line 137 static inline void blk_add_trace_generic | Line 140 static inline void blk_add_trace_generic |
| #else /* !CONFIG_BLK_DEV_IO_TRACE */ | #else /* !CONFIG_BLK_DEV_IO_TRACE */ |
| #define blk_start_trace(bdev, arg) (-EINVAL) | #define blk_start_trace(bdev, arg) (-EINVAL) |
| #define blk_stop_trace(bdev) (-EINVAL) | #define blk_stop_trace(bdev) (-EINVAL) |
| #define blk_cleanup_trace(bt) do { } while (0) | |
| #define blk_add_trace_rq(q, rq, what) do { } while (0) | #define blk_add_trace_rq(q, rq, what) do { } while (0) |
| #define blk_add_trace_bio(q, rq, what) do { } while (0) | #define blk_add_trace_bio(q, rq, what) do { } while (0) |
| #define blk_add_trace_generic(q, rq, rw, what) do { } while (0) | #define blk_add_trace_generic(q, rq, rw, what) do { } while (0) |