]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - block/blktrace.c
Added in MESSAGE notes for blktraces
[linux-2.6-omap-h63xx.git] / block / blktrace.c
index b2cbb4e5d7673c7a49ea557d962022f7ba3594f9..20e11f354f117d83e4c83356a99b09c70a87939e 100644 (file)
@@ -75,6 +75,20 @@ static void trace_note_time(struct blk_trace *bt)
        local_irq_restore(flags);
 }
 
+void __trace_note_message(struct blk_trace *bt, const char *fmt, ...)
+{
+       int n;
+       va_list args;
+       static char bt_msg_buf[BLK_TN_MAX_MSG];
+
+       va_start(args, fmt);
+       n = vscnprintf(bt_msg_buf, BLK_TN_MAX_MSG, fmt, args);
+       va_end(args);
+
+       trace_note(bt, 0, BLK_TN_MESSAGE, bt_msg_buf, n);
+}
+EXPORT_SYMBOL_GPL(__trace_note_message);
+
 static int act_log_check(struct blk_trace *bt, u32 what, sector_t sector,
                         pid_t pid)
 {