diff mbox

[05/33] target: Add support for VERIFY(12) and WRITE AND VERIFY(12)

Message ID 20170523234854.21452-6-bart.vanassche@sandisk.com (mailing list archive)
State New, archived
Headers show

Commit Message

Bart Van Assche May 23, 2017, 11:48 p.m. UTC
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Andy Grover <agrover@redhat.com>
Cc: David Disseldorp <ddiss@suse.de>
---
 drivers/target/target_core_sbc.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Nicholas A. Bellinger June 2, 2017, 4:15 a.m. UTC | #1
On Tue, 2017-05-23 at 16:48 -0700, Bart Van Assche wrote:
> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
> Reviewed-by: Hannes Reinecke <hare@suse.com>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Cc: Andy Grover <agrover@redhat.com>
> Cc: David Disseldorp <ddiss@suse.de>
> ---
>  drivers/target/target_core_sbc.c | 7 +++++++
>  1 file changed, 7 insertions(+)

Ignoring for now until #4 comments are addressed.

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c
index 51489d96cb31..6517ea2c3859 100644
--- a/drivers/target/target_core_sbc.c
+++ b/drivers/target/target_core_sbc.c
@@ -852,6 +852,11 @@  static sense_reason_t sbc_parse_verify(struct se_cmd *cmd, int *sectors,
 		*sectors = transport_get_sectors_10(cdb);
 		cmd->t_task_lba = transport_lba_32(cdb);
 		break;
+	case VERIFY_12:
+	case WRITE_VERIFY_12:
+		*sectors = transport_get_sectors_12(cdb);
+		cmd->t_task_lba = transport_lba_32(cdb);
+		break;
 	case VERIFY_16:
 	case WRITE_VERIFY_16:
 		*sectors = transport_get_sectors_16(cdb);
@@ -967,6 +972,7 @@  sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
 		cmd->execute_cmd = sbc_execute_rw;
 		break;
 	case WRITE_VERIFY:
+	case WRITE_VERIFY_12:
 	case WRITE_VERIFY_16:
 		ret = sbc_parse_verify(cmd, &sectors, &size);
 		if (ret)
@@ -1169,6 +1175,7 @@  sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
 			return ret;
 		break;
 	case VERIFY:
+	case VERIFY_12:
 	case VERIFY_16:
 		ret = sbc_parse_verify(cmd, &sectors, &size);
 		if (ret)