Skip to content

scsi: scsi_debug: fix zone reset with virtual_gb and DIX

Tal Zussman linux-scsi lkml 2 versions – Applied

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

Get series with b4
b4 am [email protected] change-id 20261109-scsi-debug-zone-reset-14fc587c9d45

Versions newest first

  1. v2 Latest2 patches 2 repliesApplied
  2. v12 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Zero the at most two ranges with two memset() calls rather than a
loop, per Damien
- Point the Fixes tags to 2d62253eb1b6, per Sashiko
- Link to v1: https://patch.msgid.link/[email protected]

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2scsi: scsi_debug: wrap around the store when zeroing a reset zonedrivers/scsi/scsi_debug.c+23 -20 replies
2/2scsi: scsi_debug: reset protection information on zone resetdrivers/scsi/scsi_debug.c+11 -20 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDamien Le Moal
SeriesR-b
1/2
2/2

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

Read the v2 thread

Cover letter [PATCH v2 0/2] scsi: scsi_debug: fix zone reset with virtual_gb and DIX

Resetting a written zone on scsi_debug zeroes the zone's blocks in the store, but does so with a raw offset that doesn't wrap around the store like writes do, and without resetting the blocks' protection information. With virtual_gb set, resetting a zone that starts past the end of the store oopses. With DIX enabled, a reset zone can't be read back. The first patch makes the reset wrap around the end of the store like writes do. The second resets the protection information of the zeroed blocks.

The fixes were proposed by an LLM.

---
Changes in v2:
- Zero the at most two ranges with two memset() calls rather than a
loop, per Damien
- Point the Fixes tags to 2d62253eb1b6, per Sashiko
- Link to v1: https://patch.msgid.link/[email protected]

---
Tal Zussman (2):
scsi: scsi_debug: wrap around the store when zeroing a reset zone
scsi: scsi_debug: reset protection information on zone reset

 drivers/scsi/scsi_debug.c | 34 ++++++++++++++++++++++++++++++++--
 1 file changed, 32 insertions(+), 2 deletions(-)

---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261109-scsi-debug-zone-reset-14fc587c9d45

Best regards,

Signature · 1 line
Tal Zussman <[email protected]>