blktrace: support per-partition tracing
authorShawn Du <duyuyang@gmail.com>
Tue, 14 Apr 2009 05:58:56 +0000 (13:58 +0800)
committerIngo Molnar <mingo@elte.hu>
Thu, 16 Apr 2009 08:10:57 +0000 (10:10 +0200)
commitd0deef5b14af7d5bbd0003a0a2a1a32326e20a6d
treede1d438935a4cc50dd9d7e0ccccc3cfc5c7e6c06
parent9cfe06f8cd5c8c3ad6ab323973e87dde670642b8
blktrace: support per-partition tracing

Though one can specify '-d /dev/sda1' when using blktrace, it still
traces the whole sda.

To support per-partition tracing, when we start tracing, we initialize
bt->start_lba and bt->end_lba to the start and end sector of that
partition.

Note some actions are per device, thus we don't filter 0-sector events.

The original patch and discussion can be found here:
http://marc.info/?l=linux-btrace&m=122949374214540&w=2

Signed-off-by: Shawn Du <duyuyang@gmail.com>
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: Jens Axboe <jens.axboe@oracle.com>
LKML-Reference: <49E42620.4050701@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
block/compat_ioctl.c
drivers/scsi/sg.c
include/linux/blktrace_api.h
kernel/trace/blktrace.c