aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/blktrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/blktrace.c')
-rw-r--r--kernel/trace/blktrace.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 153562d0b93c..cbafed7d4f38 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -138,6 +138,13 @@ void __trace_note_message(struct blk_trace *bt, const char *fmt, ...)
138 !blk_tracer_enabled)) 138 !blk_tracer_enabled))
139 return; 139 return;
140 140
141 /*
142 * If the BLK_TC_NOTIFY action mask isn't set, don't send any note
143 * message to the trace.
144 */
145 if (!(bt->act_mask & BLK_TC_NOTIFY))
146 return;
147
141 local_irq_save(flags); 148 local_irq_save(flags);
142 buf = per_cpu_ptr(bt->msg_data, smp_processor_id()); 149 buf = per_cpu_ptr(bt->msg_data, smp_processor_id());
143 va_start(args, fmt); 150 va_start(args, fmt);
@@ -1820,21 +1827,5 @@ void blk_fill_rwbs(char *rwbs, u32 rw, int bytes)
1820 rwbs[i] = '\0'; 1827 rwbs[i] = '\0';
1821} 1828}
1822 1829
1823void blk_fill_rwbs_rq(char *rwbs, struct request *rq)
1824{
1825 int rw = rq->cmd_flags & 0x03;
1826 int bytes;
1827
1828 if (rq->cmd_flags & REQ_DISCARD)
1829 rw |= REQ_DISCARD;
1830
1831 if (rq->cmd_flags & REQ_SECURE)
1832 rw |= REQ_SECURE;
1833
1834 bytes = blk_rq_bytes(rq);
1835
1836 blk_fill_rwbs(rwbs, rw, bytes);
1837}
1838
1839#endif /* CONFIG_EVENT_TRACING */ 1830#endif /* CONFIG_EVENT_TRACING */
1840 1831