summaryrefslogtreecommitdiff
path: root/block/scsi_ioctl.c
diff options
context:
space:
mode:
authorxiphmont@xiph.org <xiphmont@xiph.org>2008-08-22 09:12:21 (GMT)
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 06:56:00 (GMT)
commit35e396cd100489dfe8f5a76e3613fb8049ffdff3 (patch)
treefa300923172de62123a42bbb0d94104ca65cbb78 /block/scsi_ioctl.c
parent69849375d6b13e94d08cdc94b49b11fbab454a0e (diff)
downloadlinux-fsl-qoriq-35e396cd100489dfe8f5a76e3613fb8049ffdff3.tar.xz
SG_IO block filter whitelist missing MMC SET READ AHEAD command
I have another request for the block filter SG_IO command whitelist, specifically the MMC streaming command set SET READ AHEAD command. The command applies only to MMC CDROM/DVDROM drives with the streaming optional feature set. The command is useful to cdparanoia in that it allows explicit cache control side effects that are, on many drives, cdparanoia's most efficient way to flush/disable the media cache on cdrom drives. I am aware of no reason why it should not be accessible from usespace. Also note that the command is already fully accessible through the SCSI-native version of the SG_IO ioctl as well as the traditional SG interface. The command is only being refused on block devices. That means that on a typical stock distro, the command is available through /dev/sg* but not /dev/scd* although both are typically available and accessible. Filtering the command is not providing any protection, only a confusing inconsistency. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/scsi_ioctl.c')
-rw-r--r--block/scsi_ioctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
index ec4b7f2..3aab80a 100644
--- a/block/scsi_ioctl.c
+++ b/block/scsi_ioctl.c
@@ -185,6 +185,7 @@ void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter)
__set_bit(GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL, filter->write_ok);
__set_bit(GPCMD_LOAD_UNLOAD, filter->write_ok);
__set_bit(GPCMD_SET_STREAMING, filter->write_ok);
+ __set_bit(GPCMD_SET_READ_AHEAD, filter->write_ok);
}
EXPORT_SYMBOL_GPL(blk_set_cmd_filter_defaults);