diff options
author | Shawn Du <duyuyang@gmail.com> | 2009-04-14 01:58:56 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-16 04:10:57 -0400 |
commit | d0deef5b14af7d5bbd0003a0a2a1a32326e20a6d (patch) | |
tree | de1d438935a4cc50dd9d7e0ccccc3cfc5c7e6c06 /block | |
parent | 9cfe06f8cd5c8c3ad6ab323973e87dde670642b8 (diff) |
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>
Diffstat (limited to 'block')
-rw-r--r-- | block/compat_ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c index f87615dea46b..f8c218cd08e1 100644 --- a/block/compat_ioctl.c +++ b/block/compat_ioctl.c | |||
@@ -568,7 +568,7 @@ static int compat_blk_trace_setup(struct block_device *bdev, char __user *arg) | |||
568 | memcpy(&buts.name, &cbuts.name, 32); | 568 | memcpy(&buts.name, &cbuts.name, 32); |
569 | 569 | ||
570 | mutex_lock(&bdev->bd_mutex); | 570 | mutex_lock(&bdev->bd_mutex); |
571 | ret = do_blk_trace_setup(q, b, bdev->bd_dev, &buts); | 571 | ret = do_blk_trace_setup(q, b, bdev->bd_dev, bdev, &buts); |
572 | mutex_unlock(&bdev->bd_mutex); | 572 | mutex_unlock(&bdev->bd_mutex); |
573 | if (ret) | 573 | if (ret) |
574 | return ret; | 574 | return ret; |