mbox series

[0/3] scsi: target: Set correct residual data

Message ID 20201022172011.42367-1-a.kovaleva@yadro.com (mailing list archive)
Headers show
Series scsi: target: Set correct residual data | expand

Message

Anastasia Kovaleva Oct. 22, 2020, 5:20 p.m. UTC
Hi Martin,
Please apply the changes to 5.10/scsi-queue at your earliest
convenience.

Tne series changes the behavior of the target in regard to processing
commands with overflow/underflow in accordance with the standarts.

The target driver used to process the DMA_TO_DEVICE commands with
residuals (in particular, WRITE command) incorrectly. The target
response contained neither a residual count, nor an OVERFLOW/UNDERFLOW
bit. Such behavior did not comply with the RFC 7143. Also the
returned ASC and ASCQ were incorrect according to FCP-4,
and residuals were not set for the 4Kn devices.

This patches fix the major inconsistances in processing these kind of
commands.

This patch series has been tested with a modified libiscsi testing
library.
The link to the pull request:
https://github.com/sahlberg/libiscsi/pull/345

Write10Residuals, Write12Residuals, Write16Residuals tests have passed.

Thanks,
Anastasia

Anastasia Kovaleva (2):
  scsi: target: core: Signal WRITE residuals
  scsi: target: core: Change ASCQ for residual write

Roman Bolshakov (1):
  scsi: target: core: Set residuals for 4Kn devices

 drivers/target/target_core_transport.c | 53 +++++++++++++-------------
 include/target/target_core_base.h      |  1 +
 2 files changed, 28 insertions(+), 26 deletions(-)

Comments

Bart Van Assche Oct. 24, 2020, 3:54 a.m. UTC | #1
On 10/22/20 10:20 AM, Anastasia Kovaleva wrote:
> The link to the pull request:
> https://github.com/sahlberg/libiscsi/pull/345

I'm not going to merge that pull request without significant changes.
See also the comment that I added on the pull request on github.

Bart.