mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-22 21:21:28 +00:00
Cleanup and fix of data overrite with WRITE SAME
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4319 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1156,9 +1156,17 @@ static bool vdisk_parse_offset(struct vdisk_cmd_params *p, struct scst_cmd *cmd)
|
||||
TRACE_ENTRY();
|
||||
|
||||
if (unlikely(!(cmd->op_flags & SCST_INFO_VALID))) {
|
||||
PRINT_ERROR("Unknown opcode 0x%02x", cmd->cdb[0]);
|
||||
scst_set_cmd_error(cmd,
|
||||
SCST_LOAD_SENSE(scst_sense_invalid_opcode));
|
||||
/*
|
||||
* Let's ignore reporting T10/04-262r7 16-byte and 12-byte ATA
|
||||
* pass-thru commands to not pollute logs (udev(?) checks them
|
||||
* for some reason). If somebody has their description, please,
|
||||
* update scst_scsi_op_table.
|
||||
*/
|
||||
if ((cmd->cdb[0] != 0x85) && (cmd->cdb[0] != 0xa1))
|
||||
PRINT_ERROR("Unknown opcode 0x%02x", cmd->cdb[0]);
|
||||
else
|
||||
TRACE(TRACE_MINOR, "Unknown opcode 0x%02x", cmd->cdb[0]);
|
||||
scst_set_cmd_error(cmd, SCST_LOAD_SENSE(scst_sense_invalid_opcode));
|
||||
res = false;
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -4495,7 +4495,8 @@ static int scst_ws_push_single_write(struct scst_write_same_priv *wsp,
|
||||
if ((ws_cmd->cdb[1] & 0x6) == 0) {
|
||||
TRACE_DBG("Using direct ws_sg %p (cnt %d)", ws_sg, ws_sg_cnt);
|
||||
sg = ws_sg;
|
||||
sg_cnt = ws_sg_cnt;
|
||||
EXTRACHECKS_BUG_ON(blocks > ws_sg_cnt);
|
||||
sg_cnt = blocks;
|
||||
goto set_add;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user