mbox series

[v3,0/2] scsi: target: fix sense key for invalid XCOPY request

Message ID 20210803145410.80147-1-s.samoylenko@yadro.com (mailing list archive)
Headers show
Series scsi: target: fix sense key for invalid XCOPY request | expand

Message

Sergey Samoylenko Aug. 3, 2021, 2:54 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):
  scsi: target: allows backend drivers to fail with specific sense codes
  scsi: target: fix sense key for invalid XCOPY request

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

Comments

Martin K. Petersen Aug. 17, 2021, 3:09 a.m. UTC | #1
Sergey,

> 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.

Applied to 5.15/scsi-staging, thanks!
Martin K. Petersen Aug. 24, 2021, 4:03 a.m. UTC | #2
On Tue, 3 Aug 2021 17:54:08 +0300, Sergey Samoylenko wrote:

> 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:
> 
> [...]

Applied to 5.15/scsi-queue, thanks!

[1/2] scsi: target: allows backend drivers to fail with specific sense codes
      https://git.kernel.org/mkp/scsi/c/44678553ad7e
[2/2] scsi: target: fix sense key for invalid XCOPY request
      https://git.kernel.org/mkp/scsi/c/0394b5048efd