10 BLK_TC_READ
= 1 << 0, /* reads */
11 BLK_TC_WRITE
= 1 << 1, /* writes */
12 BLK_TC_BARRIER
= 1 << 2, /* barrier */
13 BLK_TC_SYNC
= 1 << 3, /* sync */
14 BLK_TC_QUEUE
= 1 << 4, /* queueing/merging */
15 BLK_TC_REQUEUE
= 1 << 5, /* requeueing */
16 BLK_TC_ISSUE
= 1 << 6, /* issue */
17 BLK_TC_COMPLETE
= 1 << 7, /* completions */
18 BLK_TC_FS
= 1 << 8, /* fs requests */
19 BLK_TC_PC
= 1 << 9, /* pc requests */
20 BLK_TC_NOTIFY
= 1 << 10, /* special message */
21 BLK_TC_AHEAD
= 1 << 11, /* readahead */
22 BLK_TC_META
= 1 << 12, /* metadata */
24 BLK_TC_END
= 1 << 15, /* only 16-bits, reminder */
27 #define BLK_TC_SHIFT (16)
28 #define BLK_TC_ACT(act) ((act) << BLK_TC_SHIFT)
34 // __BLK_TA_QUEUE = 1, /* queued */
35 // __BLK_TA_BACKMERGE, /* back merged to existing rq */
36 // __BLK_TA_FRONTMERGE, /* front merge to existing rq */
37 // __BLK_TA_GETRQ, /* allocated new request */
38 // __BLK_TA_SLEEPRQ, /* sleeping on rq allocation */
39 // __BLK_TA_REQUEUE, /* request requeued */
40 // __BLK_TA_ISSUE, /* sent to driver */
41 // __BLK_TA_COMPLETE, /* completed by driver */
42 // __BLK_TA_PLUG, /* queue was plugged */
43 // __BLK_TA_UNPLUG_IO, /* queue was unplugged by io */
44 // __BLK_TA_UNPLUG_TIMER, /* queue was unplugged by timer */
45 // __BLK_TA_INSERT, /* insert request */
46 // __BLK_TA_SPLIT, /* bio was split */
47 // __BLK_TA_BOUNCE, /* bio was bounced */
48 // __BLK_TA_REMAP, /* bio was remapped */
54 //enum blktrace_notify {
55 // __BLK_TN_PROCESS = 0, /* establish pid/name mapping */
56 // __BLK_TN_TIMESTAMP, /* include system clock */
61 * Trace actions in full. Additionally, read or write is masked
63 #define BLK_TA_QUEUE (__BLK_TA_QUEUE | BLK_TC_ACT(BLK_TC_QUEUE))
64 #define BLK_TA_BACKMERGE (__BLK_TA_BACKMERGE | BLK_TC_ACT(BLK_TC_QUEUE))
65 #define BLK_TA_FRONTMERGE (__BLK_TA_FRONTMERGE | BLK_TC_ACT(BLK_TC_QUEUE))
66 #define BLK_TA_GETRQ (__BLK_TA_GETRQ | BLK_TC_ACT(BLK_TC_QUEUE))
67 #define BLK_TA_SLEEPRQ (__BLK_TA_SLEEPRQ | BLK_TC_ACT(BLK_TC_QUEUE))
68 #define BLK_TA_REQUEUE (__BLK_TA_REQUEUE | BLK_TC_ACT(BLK_TC_REQUEUE))
69 #define BLK_TA_ISSUE (__BLK_TA_ISSUE | BLK_TC_ACT(BLK_TC_ISSUE))
70 #define BLK_TA_COMPLETE (__BLK_TA_COMPLETE| BLK_TC_ACT(BLK_TC_COMPLETE))
71 #define BLK_TA_PLUG (__BLK_TA_PLUG | BLK_TC_ACT(BLK_TC_QUEUE))
72 #define BLK_TA_UNPLUG_IO (__BLK_TA_UNPLUG_IO | BLK_TC_ACT(BLK_TC_QUEUE))
73 #define BLK_TA_UNPLUG_TIMER (__BLK_TA_UNPLUG_TIMER | BLK_TC_ACT(BLK_TC_QUEUE))
74 #define BLK_TA_INSERT (__BLK_TA_INSERT | BLK_TC_ACT(BLK_TC_QUEUE))
75 #define BLK_TA_SPLIT (__BLK_TA_SPLIT)
76 #define BLK_TA_BOUNCE (__BLK_TA_BOUNCE)
77 #define BLK_TA_REMAP (__BLK_TA_REMAP | BLK_TC_ACT(BLK_TC_QUEUE))
79 #define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY))
80 #define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY))
82 #define BLK_IO_TRACE_MAGIC 0x65617400
83 #define BLK_IO_TRACE_VERSION 0x07
88 //struct blk_io_trace {
89 // u32 magic; /* MAGIC << 8 | version */
90 // u32 sequence; /* event number */
91 // u64 time; /* in microseconds */
92 // u64 sector; /* disk offset */
93 // u32 bytes; /* transfer length */
94 // u32 action; /* what happened */
95 // u32 pid; /* who did it */
96 // u32 device; /* device number */
97 // u32 cpu; /* on what cpu did it happen */
98 // u16 error; /* completion error */
99 // u16 pdu_len; /* length of data after this trace */
105 //struct blk_io_trace_remap {
107 // __be32 device_from;
119 // struct rchan *rchan;
120 // unsigned long *sequence;
126 // struct dentry *dir;
127 // struct dentry *dropped_file;
132 * User setup structure passed with BLKSTARTTRACE
134 struct blk_user_trace_setup
{
135 char name
[32]; /* output */
136 // __u16 act_mask; /* input */
137 // __u32 buf_size; /* input */
138 // __u32 buf_nr; /* input */
144 #define BLKTRACESETUP _IOWR(0x12,115,struct blk_user_trace_setup)
145 #define BLKTRACESTART _IO(0x12,116)
146 #define BLKTRACESTOP _IO(0x12,117)
147 #define BLKTRACETEARDOWN _IO(0x12,118)
This page took 0.031914 seconds and 4 git commands to generate.