[PATCH 0/2] scsi: scsi_debug: fix protection information for writes
From: Tal Zussman
Date: Tue Nov 10 2026 - 13:40:56 EST
With DIX enabled, blocks written by WRITE SAME or WRITE ATOMIC(16) on
scsi_debug fail the guard check when they are read back. A filesystem
made by mkfs.xfs on a previously formatted device can't be mounted, and
xfstests generic/770 fails on XFS.
The first patch makes WRITE ATOMIC(16) verify and store the protection
information it is sent, like WRITE. The second patch generates
protection information for writes that come without it, such as WRITE
SAME, as a device formatted with protection information does.
This was found while testing the atomic write bounce series [1]. The
fixes were proposed by an LLM.
[1] https://lore.kernel.org/r/20261107-blkdev-atomic-bounce-v1-0-f66344262096@xxxxxxxxxxxx
---
Tal Zussman (2):
scsi: scsi_debug: handle protection information for WRITE ATOMIC(16)
scsi: scsi_debug: generate protection information for writes without it
drivers/scsi/scsi_debug.c | 61 +++++++++++++++++++++++++++++++++++++----------
1 file changed, 49 insertions(+), 12 deletions(-)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261107-scsi-debug-pi-f51019c898a0
Best regards,
--
Tal Zussman <tz2294@xxxxxxxxxxxx>