blktrace: fix the original blktrace
authorLi Zefan <lizf@cn.fujitsu.com>
Wed, 25 Mar 2009 09:21:26 +0000 (17:21 +0800)
committerIngo Molnar <mingo@elte.hu>
Tue, 31 Mar 2009 15:27:08 +0000 (17:27 +0200)
commit5554720482a631702146a959db22fe417740e0a6
treefd7a304638269e3b3826faeb5dbc35f04af4deeb
parentb5230b56ee6caeb27cedb7753c0c319646383bb4
blktrace: fix the original blktrace

Currently the original blktrace, which is using relay and is used via
ioctl, is broken. You can use ftrace to see the output of blktrace,
but user-space blktrace is unusable.

It's broken by "blktrace: add ftrace plugin"
(c71a896154119f4ca9e89d6078f5f63ad60ef199)

 - if (unlikely(bt->trace_state != Blktrace_running))
 + if (unlikely(bt->trace_state != Blktrace_running || !blk_tracer_enabled))
return;

With this patch, both ioctl and ftrace can be used, but of course you
can't use both of them at the same time.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/blktrace.c