Skip to content

scsi: target: COMPARE AND WRITE miscompare sense

David Disseldorp linux-scsi target-devel 2 versions – Applied

Status from this message: Applied to 5.11/scsi-staging, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 2 repliesApplied
  2. v34 patches 2 repliesSuperseded

Changes in v4 from the cover letter

- (4/4) optimize for equality, as suggested by Doug
+ perform byte-by-byte offset check only after memcmp() failure
+ drop Mike's RB tag due to this rework

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/4scsi: target: rename struct sense_info to sense_detaildrivers/target/target_core_transport.c+11 -110 replies
2/4scsi: target: rename cmd.bad_sector to cmd.sense_infodrivers/infiniband/ulp/isert/ib_isert.c drivers/target/target_core_sbc.c drivers/target/target_core_transport.c +1 more+10 -100 replies
3/4scsi: target: split out COMPARE AND WRITE memcmp into helperdrivers/target/target_core_sbc.c+68 -530 replies
4/4scsi: target: return COMPARE AND WRITE miscompare offsetsdrivers/target/target_core_sbc.c drivers/target/target_core_transport.c+26 -100 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchMike Christie
1/4R-b
2/4R-b
3/4R-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/4] scsi: target: COMPARE AND WRITE miscompare sense

This patchset adds missing functionality to return the offset of non-matching read/compare data in the sense INFORMATION field on COMPARE AND WRITE miscompare.

The functionality can be tested using the libiscsi CompareAndWrite.MiscompareSense test proposed via:
https://github.com/sahlberg/libiscsi/pull/344

Changes since v3:
- (4/4) optimize for equality, as suggested by Doug
+ perform byte-by-byte offset check only after memcmp() failure
+ drop Mike's RB tag due to this rework

Changes since v2:
- perform bad_sector->sense_info rename in overlooked ib_isert
- drop scatterlist change queued via Jens' tree
- add Mike's reviewed-by tag
- rebase against Martin's 5.11/scsi-queue branch

Changes since v1:
- drop unnecessary WARN_ON()
- fix two checkpatch warnings
- drop single-use nlbas variable
- avoid compare_len recalculation

Cheers, David

 drivers/infiniband/ulp/isert/ib_isert.c |   4 +-
 drivers/target/target_core_sbc.c        | 138 ++++++++++++++----------
 drivers/target/target_core_transport.c  |  33 +++---
 include/target/target_core_base.h       |   2 +-
 4 files changed, 104 insertions(+), 73 deletions(-)