]> git.karo-electronics.de Git - linux-beck.git/commit
blktrace: add trace/ to /sys/block/sda
authorLi Zefan <lizf@cn.fujitsu.com>
Tue, 14 Apr 2009 06:00:05 +0000 (14:00 +0800)
committerIngo Molnar <mingo@elte.hu>
Thu, 16 Apr 2009 08:10:59 +0000 (10:10 +0200)
commit1d54ad6da9192fed5dd3b60224d9f2dfea0dcd82
treefd5917f144ec820b933795bedd7eddea96bee374
parent9908c30997b8a73c95f836170b9998dae9aa3f4a
blktrace: add trace/ to /sys/block/sda

Impact: allow ftrace-plugin blktrace to trace device-mapper devices

To trace a single partition:
  # echo 1 > /sys/block/sda/sda1/enable

To trace the whole sda instead:
  # echo 1 > /sys/block/sda/enable

Thus we also fix an issue reported by Ted, that ftrace-plugin blktrace
can't be used to trace device-mapper devices.

Now:

  # echo 1 > /sys/block/dm-0/trace/enable
  echo: write error: No such device or address
  # mount -t ext4 /dev/dm-0 /mnt
  # echo 1 > /sys/block/dm-0/trace/enable
  # echo blk > /debug/tracing/current_tracer

Reported-by: Theodore Tso <tytso@mit.edu>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Shawn Du <duyuyang@gmail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
LKML-Reference: <49E42665.6020506@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
block/blk-sysfs.c
include/linux/blktrace_api.h
kernel/trace/blktrace.c