Message ID | 20170504225102.8931-8-bart.vanassche@sandisk.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 05/05/2017 12:50 AM, Bart Van Assche wrote: > Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> > Cc: Hannes Reinecke <hare@suse.com> > Cc: 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(+) > Reviewed-by: Hannes Reinecke <hare@suse.com> Cheers, Hannes
Looks fine to me (although it would need adjustments for my version
of patch 6):
Reviewed-by: Christoph Hellwig <hch@lst.de>
--
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
On Fri, 2017-05-05 at 11:43 +0200, Christoph Hellwig wrote: > Looks fine to me (although it would need adjustments for my version > of patch 6): Hello Christoph, Thanks for the review. BTW, if you have a look at sbc_parse_verify() you will see that if that function succeeds that it sets 'size'. So I think this patch is fine even with your version of patch 6. Bart.-- 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 --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, §ors, &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, §ors, &size); if (ret)
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Hannes Reinecke <hare@suse.com> Cc: 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(+)