mbox series

[v2,0/2] target: core: Fix sense key for invalid XCOPY request

Message ID 20210726151646.32631-1-s.samoylenko@yadro.com
Headers show
Series target: core: Fix sense key for invalid XCOPY request | expand

Message

Sergey Samoylenko July 26, 2021, 3:16 p.m. UTC
EXTENDED COPY tests in libiscsi [1] show that TCM doesn't
follow SPC4 when detects invalid parameters in a XCOPY
command or IO errors. The replies from TCM contain wrong sense
key or ASCQ for incorrect request.

The series fixes the following tests from libiscsi:

  SCSI.ExtendedCopy.DescrType
  SCSI.ExtendedCopy.DescrLimits
  SCSI.ExtendedCopy.ParamHdr
  SCSI.ExtendedCopy.ValidSegDescr
  SCSI.ExtendedCopy.ValidTgtDescr

1. https://github.com/sahlberg/libiscsi

Sergey Samoylenko (2):
  target: allows backend drivers to fail with specific sense codes
  target: core: Fix sense key for invalid XCOPY request

 drivers/target/target_core_transport.c | 21 ++++++++++++++++++---
 drivers/target/target_core_xcopy.c     | 26 +++++++++++++++-----------
 include/target/target_core_backend.h   |  1 +
 include/target/target_core_base.h      |  2 ++
 4 files changed, 36 insertions(+), 14 deletions(-)