• Li Zefan's avatar
    blktrace: fix the original blktrace · 55547204
    Li Zefan authored
    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"
    (c71a8961)
    
     -	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: default avatarLi Zefan <lizf@cn.fujitsu.com>
    Acked-by: default avatarJens 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: default avatarIngo Molnar <mingo@elte.hu>
    55547204
blktrace.c 35.8 KB