diff options
author | Alan D. Brunelle <Alan.Brunelle@hp.com> | 2008-05-27 08:54:41 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-05-28 08:49:27 -0400 |
commit | 9d5f09a424a67ddb959829894efb4c71cbf6d600 (patch) | |
tree | 9d5cd1736003591193479a98d4b67fe8cfa2e7f3 /block | |
parent | be754d2c2161c0cce11d62727016985ecb76831b (diff) |
Added in MESSAGE notes for blktraces
Allows messages to be inserted into blktrace streams.
Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/blktrace.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/block/blktrace.c b/block/blktrace.c index b2cbb4e5d767..20e11f354f11 100644 --- a/block/blktrace.c +++ b/block/blktrace.c | |||
@@ -75,6 +75,20 @@ static void trace_note_time(struct blk_trace *bt) | |||
75 | local_irq_restore(flags); | 75 | local_irq_restore(flags); |
76 | } | 76 | } |
77 | 77 | ||
78 | void __trace_note_message(struct blk_trace *bt, const char *fmt, ...) | ||
79 | { | ||
80 | int n; | ||
81 | va_list args; | ||
82 | static char bt_msg_buf[BLK_TN_MAX_MSG]; | ||
83 | |||
84 | va_start(args, fmt); | ||
85 | n = vscnprintf(bt_msg_buf, BLK_TN_MAX_MSG, fmt, args); | ||
86 | va_end(args); | ||
87 | |||
88 | trace_note(bt, 0, BLK_TN_MESSAGE, bt_msg_buf, n); | ||
89 | } | ||
90 | EXPORT_SYMBOL_GPL(__trace_note_message); | ||
91 | |||
78 | static int act_log_check(struct blk_trace *bt, u32 what, sector_t sector, | 92 | static int act_log_check(struct blk_trace *bt, u32 what, sector_t sector, |
79 | pid_t pid) | 93 | pid_t pid) |
80 | { | 94 | { |