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 /drivers/scsi | |
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 'drivers/scsi')
-rw-r--r-- | drivers/scsi/sg.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 82312df9b0bf..49c98730bb8d 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -1065,6 +1065,7 @@ sg_ioctl(struct inode *inode, struct file *filp, | |||
1065 | return blk_trace_setup(sdp->device->request_queue, | 1065 | return blk_trace_setup(sdp->device->request_queue, |
1066 | sdp->disk->disk_name, | 1066 | sdp->disk->disk_name, |
1067 | MKDEV(SCSI_GENERIC_MAJOR, sdp->index), | 1067 | MKDEV(SCSI_GENERIC_MAJOR, sdp->index), |
1068 | NULL, | ||
1068 | (char *)arg); | 1069 | (char *)arg); |
1069 | case BLKTRACESTART: | 1070 | case BLKTRACESTART: |
1070 | return blk_trace_startstop(sdp->device->request_queue, 1); | 1071 | return blk_trace_startstop(sdp->device->request_queue, 1); |