diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-28 22:51:56 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-28 22:51:56 +0100 |
commit | 8d01eddf292dcd78b640418c80fb300532799cd4 (patch) | |
tree | dd7f816423463e5ad10f15af22fdbd5b75cc6184 /drivers | |
parent | Merge branch 'blk-end-request' of git://git.kernel.dk/linux-2.6-block (diff) | |
parent | block: implement drain buffers (diff) | |
download | linux-8d01eddf292dcd78b640418c80fb300532799cd4.tar.xz linux-8d01eddf292dcd78b640418c80fb300532799cd4.zip |
Merge branch 'for-2.6.25' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.25' of git://git.kernel.dk/linux-2.6-block:
block: implement drain buffers
__bio_clone: don't calculate hw/phys segment counts
block: allow queue dma_alignment of zero
blktrace: Add blktrace ioctls to SCSI generic devices
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/sg.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 17216b76efdc..aba28f335b88 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -48,6 +48,7 @@ static int sg_version_num = 30534; /* 2 digits for each component */ #include <linux/blkdev.h> #include <linux/delay.h> #include <linux/scatterlist.h> +#include <linux/blktrace_api.h> #include "scsi.h" #include <scsi/scsi_dbg.h> @@ -1067,6 +1068,17 @@ sg_ioctl(struct inode *inode, struct file *filp, case BLKSECTGET: return put_user(sdp->device->request_queue->max_sectors * 512, ip); + case BLKTRACESETUP: + return blk_trace_setup(sdp->device->request_queue, + sdp->disk->disk_name, + sdp->device->sdev_gendev.devt, + (char *)arg); + case BLKTRACESTART: + return blk_trace_startstop(sdp->device->request_queue, 1); + case BLKTRACESTOP: + return blk_trace_startstop(sdp->device->request_queue, 0); + case BLKTRACETEARDOWN: + return blk_trace_remove(sdp->device->request_queue); default: if (read_only) return -EPERM; /* don't know so take safe approach */ |