VERIFY(6) is a tape command. T10 has never defined a VERIFY(6) command

for disk or CD-ROM devices, so make sure scst_vdisk rejects it.

+

added the corresponding cleanups in scst_lib.c and fileio/common.c + updated scst_scsi_op_table

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4156 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2012-03-07 19:50:10 +00:00
parent 91a790b57d
commit 7d1ba6a2b0
3 changed files with 1 additions and 8 deletions

View File

@@ -1086,7 +1086,6 @@ static const vdisk_op_fn fileio_ops[256] = {
[WRITE_VERIFY] = fileio_exec_write_verify,
[WRITE_VERIFY_12] = fileio_exec_write_verify,
[WRITE_VERIFY_16] = fileio_exec_write_verify,
[VERIFY_6] = fileio_exec_verify,
[VERIFY] = fileio_exec_verify,
[VERIFY_12] = fileio_exec_verify,
[VERIFY_16] = fileio_exec_verify,
@@ -1141,7 +1140,6 @@ static bool vdisk_parse_offset(struct vdisk_cmd_params *p, struct scst_cmd *cmd)
switch (opcode) {
case READ_6:
case WRITE_6:
case VERIFY_6:
lba_start = get_unaligned_be24(&cdb[1]) & 0x1f0000U;
data_len = cmd->bufflen;
break;

View File

@@ -265,7 +265,7 @@ static const struct scst_sdbops scst_scsi_op_table[] = {
SCST_REG_RESERVE_ALLOWED|
SCST_WRITE_EXCL_ALLOWED|SCST_EXCL_ACCESS_ALLOWED,
3, get_trans_len_2},
{0x13, "VOVVVV ", "VERIFY(6)",
{0x13, " O ", "VERIFY(6)",
SCST_DATA_UNKNOWN, SCST_TRANSFER_LEN_TYPE_FIXED|
SCST_WRITE_EXCL_ALLOWED,
2, get_verify_trans_len_3},
@@ -5416,7 +5416,6 @@ int scst_sbc_generic_parse(struct scst_cmd *cmd,
cmd->op_name, cmd->data_direction, cmd->op_flags, cmd->bufflen);
switch (cmd->cdb[0]) {
case VERIFY_6:
case VERIFY:
case VERIFY_12:
case VERIFY_16:
@@ -5481,7 +5480,6 @@ int scst_cdrom_generic_parse(struct scst_cmd *cmd,
cmd->cdb[1] &= 0x1f;
switch (cmd->cdb[0]) {
case VERIFY_6:
case VERIFY:
case VERIFY_12:
case VERIFY_16:
@@ -5541,7 +5539,6 @@ int scst_modisk_generic_parse(struct scst_cmd *cmd,
cmd->cdb[1] &= 0x1f;
switch (cmd->cdb[0]) {
case VERIFY_6:
case VERIFY:
case VERIFY_12:
case VERIFY_16:

View File

@@ -244,7 +244,6 @@ static int do_exec(struct vdisk_cmd *vcmd)
switch (opcode) {
case READ_6:
case WRITE_6:
case VERIFY_6:
lba_start = (((cdb[1] & 0x1f) << (BYTE * 2)) +
(cdb[2] << (BYTE * 1)) +
(cdb[3] << (BYTE * 0)));
@@ -394,7 +393,6 @@ static int do_exec(struct vdisk_cmd *vcmd)
break;
}
}
case VERIFY_6:
case VERIFY:
case VERIFY_12:
case VERIFY_16: