aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDouglas Gilbert <dougg@torque.net>2005-09-09 06:07:32 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-09-09 17:42:44 -0400
commit942fc2fb73f2cac53484ebaf1c4f9af7aefaca83 (patch)
tree7d399d5847dd3be95368cf66860439ae0954ae19 /drivers
parent1c8e71d72026ed4c6ba0fdfd7eebd865f4fd1415 (diff)
[SCSI] permit READ DEFECT DATA in block/scsi_ioctl
The soon to be released smartmontools 5.34 uses the READ DEFECT DATA command on SCSI disks. A disk that has defect list entries (or worse, an increasing number of them) is at risk. Currently the first invocation of smartctl causes this: scsi: unknown opcode 0x37 message to appear the console and in the log. The READ DEFECT DATA SCSI command does not change the state of a disk. Its opcode (0x37) is valid for SBC devices (e.g. disks) and SMC-2 devices (media changers) where it is called INITIALIZE STATUS ELEMENT WITH RANGE and again doesn't change the external state of the device. Changelog: - mark SCSI opcode 0x37 (READ DEFECT DATA) as safe_for_read Signed-off-by: Douglas Gilbert <dougg@torque.net> Acked-by: Jens Axboe <axboe@suse.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/scsi_ioctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/scsi_ioctl.c b/drivers/block/scsi_ioctl.c
index abb2df249fd3..856c2278e9d0 100644
--- a/drivers/block/scsi_ioctl.c
+++ b/drivers/block/scsi_ioctl.c
@@ -123,6 +123,7 @@ static int verify_command(struct file *file, unsigned char *cmd)
123 safe_for_read(READ_12), 123 safe_for_read(READ_12),
124 safe_for_read(READ_16), 124 safe_for_read(READ_16),
125 safe_for_read(READ_BUFFER), 125 safe_for_read(READ_BUFFER),
126 safe_for_read(READ_DEFECT_DATA),
126 safe_for_read(READ_LONG), 127 safe_for_read(READ_LONG),
127 safe_for_read(INQUIRY), 128 safe_for_read(INQUIRY),
128 safe_for_read(MODE_SENSE), 129 safe_for_read(MODE_SENSE),